From 65d3e81ce8b98d0bde24f4d8c392c252981c7d8b Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 13 Sep 2023 00:44:50 +0200 Subject: tests/shell: ensure vgdb-pipe files are deleted from "nft-valgrind-wrapper.sh" When the valgrind process gets killed, those files can be left over. They are located in the original $TMPDIR (usually /tmp). They should be cleaned up. I tried to cleanup the files from withing "nft-valgrind-wrapper.sh" itself via a `trap`, but it doesn't work. Instead, let "run-tests.sh" delete all files with a matching pattern. Signed-off-by: Thomas Haller Signed-off-by: Florian Westphal --- tests/shell/helpers/nft-valgrind-wrapper.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/shell/helpers/nft-valgrind-wrapper.sh') diff --git a/tests/shell/helpers/nft-valgrind-wrapper.sh b/tests/shell/helpers/nft-valgrind-wrapper.sh index 6125dd0f..98bbdf43 100755 --- a/tests/shell/helpers/nft-valgrind-wrapper.sh +++ b/tests/shell/helpers/nft-valgrind-wrapper.sh @@ -1,6 +1,6 @@ #!/bin/bash -e -SUFFIX="$(date "+%Y%m%d-%H%M%S.%6N.$$")" +SUFFIX="$(date "+%H%M%S.%6N").$$" rc=0 libtool \ @@ -12,7 +12,7 @@ libtool \ --show-leak-kinds=all \ --num-callers=100 \ --error-exitcode=122 \ - --vgdb-prefix="$NFT_TEST_TMPDIR_ORIG/vgdb-pipe-nft-test-$SUFFIX" \ + --vgdb-prefix="$_NFT_TEST_VALGRIND_VGDB_PREFIX-$SUFFIX" \ $NFT_TEST_VALGRIND_OPTS \ "$NFT_REAL" \ "$@" \ -- cgit v1.2.3