From: Theodore Ts'o Date: Sun, 20 May 2018 18:45:17 +0000 (-0400) Subject: generic/490: fix cleanup function X-Git-Tag: v2022.05.01~1545 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=78f713a198eda619c4255bce6a95e5a8e93d85bb;p=xfstests-dev.git generic/490: fix cleanup function generic/490 fails because cleanup tries to delete . and .. since $tmp is left unset, and so "rm -f $tmp.*" does nothing useful. Instead define $tmp and delete temp files created by seek_sanity_test. [Eryu: define $tmp and remove $tmp.* too on cleanup] Signed-off-by: Theodore Ts'o Reviewed-by: Eryu Guan Signed-off-by: Eryu Guan --- diff --git a/tests/generic/490 b/tests/generic/490 index b5042c2e..abb83837 100755 --- a/tests/generic/490 +++ b/tests/generic/490 @@ -29,6 +29,7 @@ seqres=$RESULT_DIR/$seq echo "QA output created by $seq" here=`pwd` +tmp=/tmp/$$ status=1 # failure is the default! trap "_cleanup; exit \$status" 0 1 2 3 15 @@ -50,6 +51,7 @@ _cleanup() { cd / rm -f $tmp.* + rm -f $base_test_file* } $here/src/seek_sanity_test -s 19 -e 20 $base_test_file > $seqres.full 2>&1 ||