Commit 1f4a8945 authored by Michal Berger's avatar Michal Berger Committed by Konrad Sztyber
Browse files

test/unit: Add verbose opt to valgrind and unset DEBUGINFOD_*



It looks like fedora intentionally sets $DEBUGINFOD_URLS inside the
environment as per the contents of /etc/debuginfod/. When set,
valgrind uses this URL list to fetch extra debuginfo from the target
servers. This is an unwanted behavior, since depending on the net
state it may block the tests leading to job timeouts under CI.

To mitigate, unset all DEBUGINFOD_* vars while running valgrind. Also,
enable verbose output to make sure we are aware what valgrind is
actually doing under the hood (e.g. info about fetching debuginfo
could not be seen without it).

Fixes issue #2767

Signed-off-by: default avatarMichal Berger <michal.berger@intel.com>
Change-Id: If7c3bf341bd78c1cb9a68c5f86379fd7d3682f4e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15774


Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent d82abf66
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -251,6 +251,9 @@ export AR_TOOL=$rootdir/scripts/ar-xnvme-fixer
# pass our valgrind desire on to unittest.sh
if [ $SPDK_RUN_VALGRIND -eq 0 ]; then
	export valgrind=''
else
	# unset all DEBUGINFOD_* vars that may affect our valgrind instance
	unset -v "${!DEBUGINFOD_@}"
fi

if [ "$(uname -s)" = "Linux" ]; then
+1 −1
Original line number Diff line number Diff line
@@ -152,7 +152,7 @@ fi
# the env variable to override the default shown below.
if [ -z ${valgrind+x} ]; then
	if grep -q '#undef SPDK_CONFIG_ASAN' $rootdir/include/spdk/config.h && hash valgrind; then
		valgrind='valgrind --leak-check=full --error-exitcode=2'
		valgrind='valgrind --leak-check=full --error-exitcode=2 --verbose'
	else
		valgrind=''
	fi