xfs
[Top] [All Lists]

[PATCH] xfstests: fsck scratch device if it got used

To: xfs-oss <xfs@xxxxxxxxxxx>
Subject: [PATCH] xfstests: fsck scratch device if it got used
From: Eric Sandeen <sandeen@xxxxxxxxxx>
Date: Thu, 29 Nov 2012 12:59:55 -0600
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/17.0 Thunderbird/17.0
This will cause the $SCRATCH_DEV to be fscked if it
was used in the prior test.  Without this I don't
think it gets done unless specifically requested
by the test.

Also recreate lost+found/ in one test so that e2fsck
doesn't complain.

Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
---

diff --git a/check b/check
index a4af0f6..343735a 100755
--- a/check
+++ b/check
@@ -308,6 +308,9 @@ do
        try="$try $seq"
        n_try=`expr $n_try + 1`
         _check_test_fs
+       if grep -q require_scratch $seq; then
+               _check_scratch_fs
+       fi
     fi
     
     seq="after_$seq"


diff --git a/062 b/062
index 9800e33..b727243 100755
--- a/062
+++ b/062
@@ -216,6 +216,9 @@ if [ $? -ne 0 ]; then
        exit
 fi
 
+# So e2fsck won't complain:
+[[ $FSTYP = ext* ]] && mkdir $SCRATCH_MNT/lost+found
+
 # success, all done
 status=0
 exit


<Prev in Thread] Current Thread [Next in Thread>