From: Thomas Haller Date: Wed, 6 Sep 2023 11:52:22 +0000 (+0200) Subject: tests/shell: set TMPDIR for tests in "test-wrapper.sh" X-Git-Tag: v1.0.9~127 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6de0a8f29ddb0be4dfaa5f86bc92433cf1713bc6;p=thirdparty%2Fnftables.git 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 Signed-off-by: Florian Westphal --- 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() {