]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
xfstests: a couple of fixes for external logs
authorChristoph Hellwig <hch@lst.de>
Sat, 21 Mar 2009 20:04:13 +0000 (21:04 +0100)
committerChristoph Hellwig <hch@brick.lst.de>
Sat, 21 Mar 2009 20:04:13 +0000 (21:04 +0100)
Fix a couple of issues when running xfsqa with external logs:

 - update the 096 golden output for the external log case
 - add a new _scratch_xfs_check similar to _scratch_xfs_logprint and
   _scratch_xfs_repair that take the log device into account and use it
   in test 134
 - use _scratch_xfs_repair in test 202 to fix it for external log
   devices

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
017
096.external
202
202.out
common.rc

diff --git a/017 b/017
index 18bf4707cfc862e11afe5b9315e838ed12797338..74dbe1c1904ab53a8e3c6888a987df463dbec58a 100755 (executable)
--- a/017
+++ b/017
@@ -67,7 +67,7 @@ do
         echo ""                             >>$seq.full
         echo "*** XFS_CHECK ***"            >>$seq.full
         echo ""                             >>$seq.full
-        xfs_check $checkopts $SCRATCH_DEV   >>$seq.full 2>&1 \
+        _scratch_xfs_check $checkopts       >>$seq.full 2>&1 \
             || _fail "xfs_check $checkopts failed"
         _scratch_mount -o remount,rw \
             || _fail "remount rw failed"
index 7d68373fac1b39041f41055d0d3f08cb0565b031..ef942e3581c0c9764622a75852e4fe8a82604819 100644 (file)
@@ -30,7 +30,7 @@ realtime =REALTIME               extsz=N, blocks=N, rtextents=N
 
 
 # test out data stripe
---- mkfs=-d su=266240,sw=1 ---
+--- mkfs=-l version=1 -d su=266240,sw=1 ---
 meta-data=DEV isize=256    agcount=N, agsize=N blks
 data     =                       bsize=4096   blocks=N, imaxpct=25
          =                       sunit=65     swidth=65 blks, unwritten=1
@@ -41,7 +41,7 @@ realtime =REALTIME               extsz=N, blocks=N, rtextents=N
 
 
 # test out data stripe the same but using sunit & swidth
---- mkfs=-d sunit=520,swidth=520 ---
+--- mkfs=-l version=1 -d sunit=520,swidth=520 ---
 meta-data=DEV isize=256    agcount=N, agsize=N blks
 data     =                       bsize=4096   blocks=N, imaxpct=25
          =                       sunit=65     swidth=65 blks, unwritten=1
diff --git a/202 b/202
index 1eab256a5f426f17f0fb760ef556cc0c5bf3f7b9..d783c181578e5d533b5d12a719c56aeaa8eba3b2 100644 (file)
--- a/202
+++ b/202
@@ -20,6 +20,7 @@ status=1      # failure is the default!
 # get standard environment, filters and checks
 . ./common.rc
 . ./common.filter
+. ./common.repair
 
 # real QA test starts here
 _supported_fs xfs
@@ -31,10 +32,10 @@ echo "== Creating single-AG filesystem =="
 _scratch_mkfs_xfs -d agcount=1 >/dev/null 2>&1
 
 echo "== Trying to repair it (should fail) =="
-xfs_repair $SCRATCH_DEV
+_scratch_xfs_repair
 
 echo "== Trying to repair it with -o force_geometry =="
-xfs_repair -o force_geometry $SCRATCH_DEV
+_scratch_xfs_repair -o force_geometry 2>&1 | _filter_repair
 
 # success, all done
 echo "*** done"
diff --git a/202.out b/202.out
index f79ce7162eeda14f3391ec60c34feaa3908be3e2..c2c5c88162d7e302b195ab0d551cd83754681bca 100644 (file)
--- a/202.out
+++ b/202.out
@@ -6,19 +6,17 @@ Only one AG detected - cannot validate filesystem geometry.
 Use the -o force_geometry option to proceed.
 == Trying to repair it with -o force_geometry ==
 Phase 1 - find and verify superblock...
-Phase 2 - using internal log
+Phase 2 - using <TYPEOF> log
         - zero log...
         - scan filesystem freespace and inode maps...
         - found root inode chunk
 Phase 3 - for each AG...
         - scan and clear agi unlinked lists...
         - process known inodes and perform inode discovery...
-        - agno = 0
         - process newly discovered inodes...
 Phase 4 - check for duplicate blocks...
         - setting up duplicate extent list...
         - check for inodes claiming duplicate blocks...
-        - agno = 0
 Phase 5 - rebuild AG headers and trees...
         - reset superblock...
 Phase 6 - check inode connectivity...
index a51ac70917806f3cbc56951a3b28650e04fea58e..7b6ca0d064f6d6eb5c9b69e73d9c1e34fc6882b6 100644 (file)
--- a/common.rc
+++ b/common.rc
@@ -268,6 +268,14 @@ _scratch_xfs_logprint()
     $XFS_LOGPRINT_PROG $SCRATCH_OPTIONS $* $SCRATCH_DEV
 }
 
+_scratch_xfs_check()
+{
+    SCRATCH_OPTIONS=""
+    [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
+        SCRATCH_OPTIONS="-l $SCRATCH_LOGDEV"
+    $XFS_CHECK_PROG $SCRATCH_OPTIONS $* $SCRATCH_DEV
+}
+
 _scratch_xfs_repair()
 {
     SCRATCH_OPTIONS=""