summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtests/shell/helpers/nft-valgrind-wrapper.sh1
-rwxr-xr-xtests/shell/run-tests.sh5
2 files changed, 6 insertions, 0 deletions
diff --git a/tests/shell/helpers/nft-valgrind-wrapper.sh b/tests/shell/helpers/nft-valgrind-wrapper.sh
index ad8cc74b..6125dd0f 100755
--- a/tests/shell/helpers/nft-valgrind-wrapper.sh
+++ b/tests/shell/helpers/nft-valgrind-wrapper.sh
@@ -12,6 +12,7 @@ libtool \
--show-leak-kinds=all \
--num-callers=100 \
--error-exitcode=122 \
+ --vgdb-prefix="$NFT_TEST_TMPDIR_ORIG/vgdb-pipe-nft-test-$SUFFIX" \
$NFT_TEST_VALGRIND_OPTS \
"$NFT_REAL" \
"$@" \
diff --git a/tests/shell/run-tests.sh b/tests/shell/run-tests.sh
index c622c150..5931b20e 100755
--- a/tests/shell/run-tests.sh
+++ b/tests/shell/run-tests.sh
@@ -257,6 +257,11 @@ START_TIME="$(cut -d ' ' -f1 /proc/uptime)"
_TMPDIR="${TMPDIR:-/tmp}"
+# Export the orignal TMPDIR for the tests. "test-wrapper.sh" sets TMPDIR to
+# NFT_TEST_TESTTMPDIR, so that temporary files are placed along side the
+# test data. In some cases, we may want to know the original TMPDIR.
+export NFT_TEST_TMPDIR_ORIG="$_TMPDIR"
+
if [ "$NFT_TEST_HAS_REALROOT" = "" ] ; then
# The caller didn't set NFT_TEST_HAS_REALROOT and didn't specify
# -R/--without-root option. Autodetect it based on `id -u`.