diff --git a/214 b/214 index eb18825c..cef7626e 100755 --- a/214 +++ b/214 @@ -29,6 +29,7 @@ echo "QA output created by $seq" _cleanup() { + rm -f $TEST_DIR/ouch* cd / rm -f $tmp.* } @@ -51,6 +52,7 @@ _supported_os Linux [ -n "$XFS_IO_PROG" ] || _notrun "xfs_io executable not found" rm -f $seq.full +rm -f $TEST_DIR/ouch* _require_xfs_io_falloc diff --git a/236 b/236 index 4d257f03..a7500ed7 100644 --- a/236 +++ b/236 @@ -30,15 +30,12 @@ echo "QA output created by $seq" _cleanup() { - if [ -a $TEST_DIR/ouch2 ]; then - rm -f $TEST_DIR/ouch2 - fi - if [ -a $TEST_DIR/ouch ]; then - rm -f $TEST_DIR/ouch - fi + rm -f $TEST_DIR/ouch* } here=`pwd` +status=1 # failure is the default! +trap "_cleanup; exit \$status" 0 1 2 3 15 # get standard environment, filters and checks . ./common.rc @@ -48,6 +45,8 @@ _supported_fs generic # only Linux supports fallocate _supported_os Linux +rm -f $TEST_DIR/ouch* + # create a file and get its ctime touch $TEST_DIR/ouch ctime=`stat -c %Z $TEST_DIR/ouch` @@ -65,8 +64,6 @@ if [ $ctime2 -le $ctime ]; then exit 1 fi -_cleanup - echo "Test over." # success, all done status=0