linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@dilger.ca>
To: tytso@mit.edu
Cc: linux-ext4@vger.kernel.org, Andreas Dilger <adilger@dilger.ca>
Subject: [PATCH] tests: remove unused temporary files for MMP tests
Date: Wed,  8 Aug 2012 14:21:36 -0600	[thread overview]
Message-ID: <1344457296-27609-1-git-send-email-adilger@dilger.ca> (raw)

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>
---
 tests/f_mmp/script         |    1 +
 tests/f_mmp_garbage/script |    1 +
 tests/m_mmp/script         |    1 +
 tests/t_mmp_1on/script     |    1 +
 tests/t_mmp_2off/script    |    1 +
 5 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/tests/f_mmp/script b/tests/f_mmp/script
index 1b0ff79..05421c4 100644
--- a/tests/f_mmp/script
+++ b/tests/f_mmp/script
@@ -1,5 +1,6 @@
 FSCK_OPT=-yf
 
+[ -f "$TMPFILE" ] && rm -f $TMPFILE
 TMPFILE=$test_name.tmp
 > $TMPFILE
 
diff --git a/tests/f_mmp_garbage/script b/tests/f_mmp_garbage/script
index 02cc12a..d4d2cb3 100644
--- a/tests/f_mmp_garbage/script
+++ b/tests/f_mmp_garbage/script
@@ -1,5 +1,6 @@
 FSCK_OPT=-yf
 
+[ -f "$TMPFILE" ] && rm -f $TMPFILE
 TMPFILE=$test_name.tmp
 > $TMPFILE
 
diff --git a/tests/m_mmp/script b/tests/m_mmp/script
index 02b0b4b..dff98f0 100644
--- a/tests/m_mmp/script
+++ b/tests/m_mmp/script
@@ -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"
diff --git a/tests/t_mmp_1on/script b/tests/t_mmp_1on/script
index 8fc8158..d15b1e3 100644
--- a/tests/t_mmp_1on/script
+++ b/tests/t_mmp_1on/script
@@ -1,5 +1,6 @@
 FSCK_OPT=-yf
 
+[ -f "$TMPFILE" ] && rm -f $TMPFILE
 TMPFILE=$test_name.tmp
 > $TMPFILE
 
diff --git a/tests/t_mmp_2off/script b/tests/t_mmp_2off/script
index 1dee14e..572730b 100644
--- a/tests/t_mmp_2off/script
+++ b/tests/t_mmp_2off/script
@@ -1,5 +1,6 @@
 FSCK_OPT=-yf
 
+[ -f "$TMPFILE" ] && rm -f $TMPFILE
 TMPFILE=$test_name.tmp
 > $TMPFILE
 
-- 
1.7.3.4


             reply	other threads:[~2012-08-08 20:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-08 20:21 Andreas Dilger [this message]
2012-08-14 15:34 ` tests: remove unused temporary files for MMP tests Theodore Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1344457296-27609-1-git-send-email-adilger@dilger.ca \
    --to=adilger@dilger.ca \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).