tests: don't leave cruft behind on the TEST_MNT
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 21 Dec 2015 07:07:57 +0000 (18:07 +1100)
committerDave Chinner <david@fromorbit.com>
Mon, 21 Dec 2015 07:07:57 +0000 (18:07 +1100)
Don't leave cruft behind on the test device's filesystem, so as to
avoid filling it with debris.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
tests/generic/110
tests/generic/111
tests/generic/115
tests/generic/159
tests/generic/160
tests/xfs/129

index 468d859769d04cd6fcbd134ed477a58b14463fc8..fffadbce327586f053b518a729bc312d3004bb42 100755 (executable)
@@ -37,7 +37,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -f $tmp.*
+    rm -f $tmp.* "$TESTDIR"
 }
 
 # get standard environment, filters and checks
index 1797233f1a973fbde39a1e49780232f26dece3f3..98077d8df2fe86e27ad7b1bcdc5bf32df5c01cf1 100755 (executable)
@@ -37,7 +37,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -f $tmp.*
+    rm -f $tmp.* "$TESTDIR"
 }
 
 # get standard environment, filters and checks
index b5c64ece992d9927b7a69b2374fd54d59ce7246e..6c8d92d90fd777df4e296b6eb6a5c92e984b2d8d 100755 (executable)
@@ -35,7 +35,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
-    rm -f $tmp.*
+    rm -f $tmp.* "$TESTDIR"
 }
 
 # get standard environment, filters and checks
index 7944267b5d29a53d760539e9251cfef7c114b700..369663db6ad1f3f61c92f83b1a3de6b214e85afb 100755 (executable)
@@ -32,7 +32,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
#   rm -rf "$tmp".* "$TESTDIR1"
+    rm -rf "$tmp".* "$TESTDIR1"
 }
 
 # get standard environment, filters and checks
index e8c43dfb3f83c5214a91f2e7ba80af90b6be0a3c..4dfee12b15ee5707cc20d0d836f99d3754f96dc2 100755 (executable)
@@ -32,7 +32,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _cleanup()
 {
     cd /
#   rm -rf "$tmp".* "$TESTDIR1"
+    rm -rf "$tmp".* "$TESTDIR1"
 }
 
 # get standard environment, filters and checks
index 6279d69cababa88f21e8d4ab31e0e1e2b9175eb5..6fb9bacc5f46adda3bb04f31c3a87d9f72a1c564 100755 (executable)
@@ -35,7 +35,7 @@ _cleanup()
 {
     cd /
     umount "$SCRATCH_MNT" > /dev/null 2>&1
-    rm -rf "$tmp".* "$TESTDIR" "$METADUMP_FILE"
+    rm -rf "$tmp".* "$TESTDIR" "$METADUMP_FILE" "$TEST_DIR/image"
 }
 
 # get standard environment, filters and checks