]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
test_one: make sure the tmpfile is cleaned up if the test script exits
authorTheodore Ts'o <tytso@mit.edu>
Thu, 11 Oct 2018 02:56:12 +0000 (22:56 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 11 Oct 2018 02:56:12 +0000 (22:56 -0400)
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 <tytso@mit.edu>
tests/test_one.in

index 7c5f464d927d03aa246703887967f99e9874ad4b..5d7607ad870559f70586deaf3096afab8cfc22d1 100644 (file)
@@ -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' 1 2 15
 
 start=$SECONDS
 if [ -f $test_dir/script ]; then