tests: Modernize valgrind infrastructure
The recent memleak fixes motivated me to look at the bitrotted code to
run invocations of `ostree` in the test suite underneath valgrind.
There are a few things here. First, update suppressions file from
libhif, since I recently worked on it.
When running *uninstalled* as we now support, we need
`libtool --mode=execute` in the mix so it expands out to
the uninstalled binary and we don't valgrind the intermediate shell.
However, it's harder than that because we chdir into a tmpdir,
which defeats the libtool logic. AFAICS, the only fix for this
is to determine the realbin path before we chdir, and then unfortunately
we need to change every use of `ostree` to `${OSTREE}` =(
Then this immediately breaks for me on RHEL7 because my ancient
copy of `valgrind-3.10.0-16.el7.x86_64` is unaware of syscall 306, i.e.
`syncfs`.
But let's do this first before I dive into that.
Closes: #292
Approved by: krnowak
This commit is contained in:
1 parent
c015fe13fb
commit
70af1d26b1
6 files changed
+547
-203
No files matched your search
@@ -1472,7 +1472,7 @@ ostree_repo_commit_transaction (OstreeRepo *self,
|
||||
/* FIXME: Added since valgrind in el7 doesn't know about
|
||||
* `syncfs`...we should delete this later.
|
||||
*/
|
||||
if (g_getenv ("OSTREE_SUPRESS_SYNCFS") == NULL)
|
||||
if (g_getenv ("OSTREE_SUPPRESS_SYNCFS") == NULL)
|
||||
{
|
||||
if (syncfs (self->tmp_dir_fd) < 0)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user