patch rfc - valgrind vs. debuginfod

Frank Ch. Eigler fche@redhat.com
Thu Jun 17 02:34:13 GMT 2021


Hi -

The following patch appears to make valgrind consistently happy,
whether distcheck or check runs.  It siply arranges to make sure that
$VALGRIND_CMD is run without debuginfod client being enabled, even as
the $cmd it runs gets the necessary env var set.

I don't completely understand the connection to the weird symptoms
(32-bit backtraces on 64-bit hosts, missing suppressions?) that we
noticed earlier.

diff --git a/tests/test-subr.sh b/tests/test-subr.sh
index 411e5f288acd..2ea6398c0932 100644
--- a/tests/test-subr.sh
+++ b/tests/test-subr.sh
@@ -83,7 +83,7 @@ testrun()
 built_testrun()
 {
   LD_LIBRARY_PATH="${built_library_path}${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"\
-  $VALGRIND_CMD "$@"
+  env -u DEBUGINFOD_URLS $VALGRIND_CMD env DEBUGINFOD_URLS="$DEBUGINFOD_URLS" "$@"
 }
 
 installed_testrun()
@@ -104,9 +104,9 @@ installed_testrun()
   if [ "${libdir}" != /usr/lib ] && [ "${libdir}" != /usr/lib64 ]; then
     LD_LIBRARY_PATH="${libdir}:${libdir}/elfutils\
 ${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" \
-    $VALGRIND_CMD $program ${1+"$@"}
+    env -u DEBUGINFOD_URLS $VALGRIND_CMD env DEBUGINFOD_URLS="$DEBUGINFOD_URLS" $program ${1+"$@"}
   else
-    $VALGRIND_CMD $program ${1+"$@"}
+    env -u DEBUGINFOD_URLS $VALGRIND_CMD env DEBUGINFOD_URLS="$DEBUGINFOD_URLS" $program ${1+"$@"}
   fi
 }
 



More information about the Elfutils-devel mailing list