From: Theodore Ts'o Date: Mon, 9 Jun 2014 14:47:41 +0000 (-0400) Subject: tests: clean up the temp file if test_one is interrupted X-Git-Tag: v1.42.11~47 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=0b5610e0faee9b8a7acf63e5d1b57ebd7db08a36;p=tools%2Fe2fsprogs.git tests: clean up the temp file if test_one is interrupted Signed-off-by: Theodore Ts'o --- diff --git a/tests/test_one.in b/tests/test_one.in index 01a9260..eb28313 100644 --- a/tests/test_one.in +++ b/tests/test_one.in @@ -31,6 +31,7 @@ fi test_name=`echo $test_dir | sed -e 's;.*/;;'` TMPFILE=$(mktemp -t e2fsprogs-tmp-$test_name.XXXXXX) +trap 'rm -f $TMPFILE ; exit' 1 2 15 if [ -f $test_dir ] ; then exit 0;