Whamcloud - gitweb
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 1b0ff79..05421c4 100644 (file)
@@ -1,5 +1,6 @@
 FSCK_OPT=-yf
 
+[ -f "$TMPFILE" ] && rm -f $TMPFILE
 TMPFILE=$test_name.tmp
 > $TMPFILE
 
index 02cc12a..d4d2cb3 100644 (file)
@@ -1,5 +1,6 @@
 FSCK_OPT=-yf
 
+[ -f "$TMPFILE" ] && rm -f $TMPFILE
 TMPFILE=$test_name.tmp
 > $TMPFILE
 
index 02b0b4b..dff98f0 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 8fc8158..d15b1e3 100644 (file)
@@ -1,5 +1,6 @@
 FSCK_OPT=-yf
 
+[ -f "$TMPFILE" ] && rm -f $TMPFILE
 TMPFILE=$test_name.tmp
 > $TMPFILE
 
index 1dee14e..572730b 100644 (file)
@@ -1,5 +1,6 @@
 FSCK_OPT=-yf
 
+[ -f "$TMPFILE" ] && rm -f $TMPFILE
 TMPFILE=$test_name.tmp
 > $TMPFILE