]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
tests: remove unused temporary files for MMP tests
authorAndreas Dilger <adilger@dilger.ca>
Tue, 14 Aug 2012 15:33:24 +0000 (11:33 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 15 Aug 2012 20:44:59 +0000 (16:44 -0400)
The MMP tests need to be run on a real disk instead of tmpfs, since
the MMP block access is using O_DIRECT.  As such, they create their
own test files in the local testing directory instead of using the
temporary file created in /tmp by the test_one script.  Delete the
tempfs file before clobbering TMPFILE, otherwise it will leave the
unused file in /tmp after the test is completed.

Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
tests/f_mmp/script
tests/f_mmp_garbage/script
tests/m_mmp/script
tests/t_mmp_1on/script
tests/t_mmp_2off/script

index 1b0ff793fbbd86bfb40169bbe0fdece00465e8c7..05421c4e57c316016263b6dd6617dcd1ec0779bf 100644 (file)
@@ -1,5 +1,6 @@
 FSCK_OPT=-yf
 
+[ -f "$TMPFILE" ] && rm -f $TMPFILE
 TMPFILE=$test_name.tmp
 > $TMPFILE
 
index 02cc12a4280b4ad8002d527c35eeae2309e9e5e0..d4d2cb3c441abcd3344528dae66f07d14bb8438d 100644 (file)
@@ -1,5 +1,6 @@
 FSCK_OPT=-yf
 
+[ -f "$TMPFILE" ] && rm -f $TMPFILE
 TMPFILE=$test_name.tmp
 > $TMPFILE
 
index 02b0b4b84c08d59313514034a4b4063cf646f020..dff98f05c030efb701a65e091e722dfb789d2e0d 100644 (file)
@@ -2,6 +2,7 @@ DESCRIPTION="enable MMP during mke2fs"
 FS_SIZE=65536
 MKE2FS_DEVICE_SECTSIZE=2048
 export MKE2FS_DEVICE_SECTSIZE
+[ -f "$TMPFILE" ] && rm -f $TMPFILE
 TMPFILE=$test_name.tmp
 > $TMPFILE
 stat -f $TMPFILE | grep -q "Type: tmpfs"
index 8fc8158ff60d23e1d480eb42b8a9fe91701d0d29..d15b1e33bb8d13cd201db2b51400ece45da39dc9 100644 (file)
@@ -1,5 +1,6 @@
 FSCK_OPT=-yf
 
+[ -f "$TMPFILE" ] && rm -f $TMPFILE
 TMPFILE=$test_name.tmp
 > $TMPFILE
 
index 1dee14ed53ccb9d3baa90541534420e593300055..572730b4eca7921ead4839adfc359b891c8a45f3 100644 (file)
@@ -1,5 +1,6 @@
 FSCK_OPT=-yf
 
+[ -f "$TMPFILE" ] && rm -f $TMPFILE
 TMPFILE=$test_name.tmp
 > $TMPFILE