[PATCH 2/2] tests: clean up the temp file if test_one is interrupted

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Theodore Ts'o <tytso@xxxxxxx>
---
 tests/test_one.in | 1 +
 1 file changed, 1 insertion(+)

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;
-- 
2.0.0

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux