summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2023-09-06 13:52:22 +0200
committerFlorian Westphal <fw@strlen.de>2023-09-07 19:35:21 +0200
commit6de0a8f29ddb0be4dfaa5f86bc92433cf1713bc6 (patch)
tree680643c093f6b7d1f7fa9afcd985e66cddaa3b6a
parentf5f79773a6ad892f9f1a9f34ef2c5b9da69fc2f0 (diff)
tests/shell: set TMPDIR for tests in "test-wrapper.sh"
Various tests create additional temporary files. They really should just use "$NFT_TEST_TESTTMPDIR" for that. However, they mostly use `mktemp`. The scripts are supposed to cleanup those files afterwards. However, often that does not work correctly and /tmp gets full of left over temporary files. Export "TMPDIR" so that they use the test-specific temporary directory. Signed-off-by: Thomas Haller <thaller@redhat.com> Signed-off-by: Florian Westphal <fw@strlen.de>
-rwxr-xr-xtests/shell/helpers/test-wrapper.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/shell/helpers/test-wrapper.sh b/tests/shell/helpers/test-wrapper.sh
index e745df85..43b3aa09 100755
--- a/tests/shell/helpers/test-wrapper.sh
+++ b/tests/shell/helpers/test-wrapper.sh
@@ -11,6 +11,8 @@ TESTDIR="$(dirname "$TEST")"
START_TIME="$(cut -d ' ' -f1 /proc/uptime)"
+export TMPDIR="$NFT_TEST_TESTTMPDIR"
+
CLEANUP_UMOUNT_RUN_NETNS=n
cleanup() {