From: Theodore Ts'o Date: Thu, 11 Oct 2018 02:56:12 +0000 (-0400) Subject: test_one: make sure the tmpfile is cleaned up if the test script exits X-Git-Tag: v1.44.5~23 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=03fdf30663a584b067cde177abf49dcc5556902a;p=tools%2Fe2fsprogs.git test_one: make sure the tmpfile is cleaned up if the test script exits f_detect_junk will skip the test by exiting; and in that case we need to make sure the test's tmpfile gets cleaned up. Signed-off-by: Theodore Ts'o --- diff --git a/tests/test_one.in b/tests/test_one.in index 7c5f464..5d7607a 100644 --- a/tests/test_one.in +++ b/tests/test_one.in @@ -61,7 +61,7 @@ rm -f $test_name.ok $test_name.failed $test_name.log $test_name.slow #echo -e -n "$test_name: $test_description:\r" TMPFILE=$(mktemp ${TMPDIR:-/tmp}/e2fsprogs-tmp-$test_name.XXXXXX) -[ "$SKIP_UNLINK" != "true" ] && trap 'rm -f $TMPFILE ; exit' 1 2 15 +[ "$SKIP_UNLINK" != "true" ] && trap 'rm -f $TMPFILE ; exit' 0 1 2 15 start=$SECONDS if [ -f $test_dir/script ]; then