diff options
author | Thomas Haller <thaller@redhat.com> | 2023-09-06 13:52:22 +0200 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2023-09-07 19:35:21 +0200 |
commit | 6de0a8f29ddb0be4dfaa5f86bc92433cf1713bc6 (patch) | |
tree | 680643c093f6b7d1f7fa9afcd985e66cddaa3b6a /tests | |
parent | f5f79773a6ad892f9f1a9f34ef2c5b9da69fc2f0 (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>
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/shell/helpers/test-wrapper.sh | 2 |
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() { |