]> www.infradead.org Git - users/hch/xfstests-dev.git/commitdiff
xfs/148: make test debuggable
authorDave Chinner <dchinner@redhat.com>
Tue, 17 May 2022 07:01:05 +0000 (17:01 +1000)
committerZorro Lang <zlang@kernel.org>
Sat, 21 May 2022 18:51:35 +0000 (02:51 +0800)
Don't clean up image files - leave them laying around on the test
device so that when the test fails there's a corpse left behind to
post-mortem....

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/xfs/148

index 9427aff022a087b3c03d8ba6833f7a0bfb81a347..8d50a642aabce44931ea6a269b7387260afd9c7b 100755 (executable)
@@ -16,7 +16,7 @@ _cleanup()
        cd /
        $UMOUNT_PROG $mntpt > /dev/null 2>&1
        test -n "$loopdev" && _destroy_loop_device $loopdev > /dev/null 2>&1
-       rm -r -f $imgfile $mntpt $tmp.*
+       rm -r -f $tmp.*
 }
 
 # Import common functions.
@@ -38,6 +38,8 @@ nullstr="too_many_beans"
 slashstr="are_bad_for_you"
 test_names=("something" "$nullstr" "$slashstr" "another")
 
+rm -f $imgfile $imgfile.old
+
 # Format image file w/o crcs so we can sed the image file
 $XFS_IO_PROG -f -c 'truncate 40m' $imgfile
 loopdev=$(_create_loop_device $imgfile)
@@ -91,7 +93,6 @@ sed -b \
        -i $imgfile
 test "$(md5sum < $imgfile)" != "$(md5sum < $imgfile.old)" ||
        _fail "sed failed to change the image file?"
-rm -f $imgfile.old
 loopdev=$(_create_loop_device $imgfile)
 _mount $loopdev $mntpt