Numerous changes to QA scripts allowing tests to run with external log/rt devices...
authorfsgqa <fsgqa>
Thu, 22 May 2003 04:16:45 +0000 (04:16 +0000)
committerfsgqa <fsgqa>
Thu, 22 May 2003 04:16:45 +0000 (04:16 +0000)
40 files changed:
004
009
013
015
016
017
018
019
021
029
030
030.out
031
031.out
033
033.out
034
041
042
044
045
049
050
052
053
054
062
065
067
069
README
bench
check
common.config
common.dump
common.quota
common.rc
common.repair
group
soak

diff --git a/004 b/004
index c1332b14e37443a2af095d18bcf3910c0415cd71..22c392f299e687bd4eaddbdaf23bfc7678b8e4e0 100755 (executable)
--- a/004
+++ b/004
@@ -57,15 +57,15 @@ trap "_cleanup" 0 1 2 3 15
 _populate_scratch()
 {
        echo "=== mkfs output ===" >>$seq.full
-       mkfs_xfs $SCRATCH_DEV | tee -a $seq.full | _filter_mkfs 2>$tmp.mkfs
+       _scratch_mkfs_xfs | tee -a $seq.full | _filter_mkfs 2>$tmp.mkfs
        source $tmp.mkfs
-       mount -t xfs $SCRATCH_DEV $SCRATCH_MNT
+       _scratch_mount
        dd if=/dev/zero of=$SCRATCH_MNT/foo count=200 bs=4096 >/dev/null 2>&1 &
        dd if=/dev/zero of=$SCRATCH_MNT/goo count=400 bs=4096 >/dev/null 2>&1 &
        dd if=/dev/zero of=$SCRATCH_MNT/moo count=800 bs=4096 >/dev/null 2>&1 &
        wait
        umount $SCRATCH_MNT                     # flush everything
-       mount -t xfs $SCRATCH_DEV $SCRATCH_MNT  # and then remount
+       _scratch_mount                          # and then remount
 }
 
 
diff --git a/009 b/009
index d133f2c8719b3c9bf0f1a596ef0bf85f6c0fe07f..aa5da5b803222e438ee3d8773e3be20deb950680 100755 (executable)
--- a/009
+++ b/009
@@ -66,7 +66,7 @@ _block_filter()
 _init()
 {
     echo "*** mkfs"
-    if ! mkfs_xfs $SCRATCH_DEV >$tmp.out 2>&1
+    if ! _scratch_mkfs_xfs >$tmp.out 2>&1
     then
        cat $tmp.out
         echo "failed to mkfs $SCRATCH_DEV"
@@ -74,7 +74,7 @@ _init()
     fi
 
     echo "*** mount"
-    if ! mount $SCRATCH_DEV $SCRATCH_MNT -t xfs
+    if ! _scratch_mount
     then
         echo "failed to mount $SCRATCH_DEV"
         exit 1
diff --git a/013 b/013
index ceb25bb3e5a2c69a623f9ce3009d8332178a78f3..7a9de2d1351a7cfddb0ba3f1a0cca1a715e99e21 100755 (executable)
--- a/013
+++ b/013
@@ -98,7 +98,7 @@ _do_test()
         status=1
     fi
     
-    _check_fs $TEST_DEV
+    _check_test_fs
 }
 
 
@@ -109,7 +109,7 @@ echo "brevity is wit..."
 
 count=1000
 
-_check_fs $TEST_DEV
+_check_test_fs
 
 # the default
 
diff --git a/015 b/015
index 17eb4662676c6ab9ffd56afc177db13229e9eeca..31db887a25b30e13315a3ef90719aab73060722d 100755 (executable)
--- a/015
+++ b/015
@@ -76,8 +76,8 @@ _filter_dd()
 # real QA test starts here
 _require_scratch
 
-mkfs_xfs -d size=50m $SCRATCH_DEV >/dev/null
-mount -t xfs $SCRATCH_DEV $SCRATCH_MNT
+_scratch_mkfs_xfs -d size=50m >/dev/null
+_scratch_mount
 out=$SCRATCH_MNT/fillup.$$
 rm -f $seq.full
 
diff --git a/016 b/016
index 49546041e0c1aadffe8282ca9a616fd8943917e9..164bae07767cbcdbd4cd10d3e02ea6e69c83ce14 100755 (executable)
--- a/016
+++ b/016
@@ -80,7 +80,7 @@ _init()
     echo "*** mkfs"
     force_opts="-dsize=50m -lsize=2097152"
     echo mkfs_xfs $force_opts $SCRATCH_DEV >>$seq.full
-    mkfs_xfs $force_opts $SCRATCH_DEV | _filter_mkfs >/dev/null 2>$tmp.mkfs
+    _scratch_mkfs_xfs $force_opts | _filter_mkfs >/dev/null 2>$tmp.mkfs
     source $tmp.mkfs
 }
 
@@ -92,7 +92,7 @@ _log_traffic()
     out=$SCRATCH_MNT/$$.tmp
     
     echo "   *** mount"
-    if ! mount -t xfs $SCRATCH_DEV $SCRATCH_MNT
+    if ! _scratch_mount
     then
         echo "failed to mount $SCRATCH_DEV"
         exit 1
@@ -122,14 +122,14 @@ _log_traffic()
 
 _log_size()
 {
-    xfs_logprint -tb $SCRATCH_DEV | $AWK_PROG '
-        /log device/ {  print $7}
+    _scratch_xfs_logprint -tb | $AWK_PROG '
+        /log file: / || /log device: / { print $7}
     '
 }
 
 _log_head()
 {
-    xfs_logprint -tb $SCRATCH_DEV | $AWK_PROG '
+    _scratch_xfs_logprint -tb | $AWK_PROG '
         /head:/ { print $5 }
     '
 }
diff --git a/017 b/017
index 0ccfe58cbb80c261eb795c25e697af52770f587a..fbcdee94550262f28e2f5723e02fac18bd7f64eb 100755 (executable)
--- a/017
+++ b/017
@@ -53,15 +53,6 @@ _cleanup()
 }
 trap "_cleanup; rm -f $tmp.*; exit \$status" 0 1 2 3 15
 
-_clean_log()
-{
-    echo ""                                 >>$seq.full
-    echo "*** xfs_logprint ***"             >>$seq.full
-    echo ""                                 >>$seq.full
-    xfs_logprint -tb $1                     | tee -a $seq.full \
-        | head | grep -q "<CLEAN>" || _fail "DIRTY LOG"
-}
-
 # get standard environment, filters and checks
 . ./common.rc
 . ./common.filter
@@ -76,9 +67,9 @@ rm -f $seq.full
 umount $SCRATCH_DEV >/dev/null 2>&1
 echo "*** MKFS ***"                         >>$seq.full
 echo ""                                     >>$seq.full
-mkfs_xfs $SCRATCH_DEV                       >>$seq.full 2>&1 \
+_scratch_mkfs_xfs                           >>$seq.full 2>&1 \
     || _fail "mkfs failed"
-mount -t xfs $SCRATCH_DEV $SCRATCH_MNT      >>$seq.full 2>&1 \
+_scratch_mount                              >>$seq.full 2>&1 \
     || _fail "mount failed"
 
 echo "*** test"
@@ -88,17 +79,21 @@ do
         echo "    *** test $l"
         src/fsstress -d $SCRATCH_MNT -n 1000 $FSSTRESS_AVOID >>$seq.full
         
-        mount -o remount,ro $SCRATCH_DEV \
+        _scratch_mount -o remount,ro \
             || _fail "remount ro failed"
             
-        _clean_log $SCRATCH_DEV 
-        
+        echo ""                                 >>$seq.full
+        echo "*** xfs_logprint ***"             >>$seq.full
+        echo ""                                 >>$seq.full
+        _scratch_xfs_logprint -tb               | tee -a $seq.full \
+            | head | grep -q "<CLEAN>" || _fail "DIRTY LOG"
+
         echo ""                             >>$seq.full
         echo "*** XFS_CHECK ***"            >>$seq.full
         echo ""                             >>$seq.full
         xfs_check $SCRATCH_DEV              >>$seq.full 2>&1 \
             || _fail "xfs_check failed"
-        mount -o remount,rw $SCRATCH_DEV \
+        _scratch_mount -o remount,rw \
             || _fail "remount rw failed"
 done
 
diff --git a/018 b/018
index 175168158ea190f32f208ac09381dfc7ada0d3d1..eebe25c1fab62de8f97c3397b2b959cdfa6bd59d 100755 (executable)
--- a/018
+++ b/018
@@ -65,18 +65,12 @@ _full()
     echo ""            >>$seq.full
 }
 
-_clean_log()
-{
-    _full "clean_log : xfs_logprint"
-    xfs_logprint -t $1                     | tee -a $seq.full \
-        | head | grep -q "<CLEAN>" || _fail "DIRTY LOG"
-}
-
 _filter_logprint()
 {
     sed '
         s/data device: 0x[0-9a-f][0-9a-f]*/data device: <DEVICE>/;
         s/log device: 0x[0-9a-f][0-9a-f]*/log device: <DEVICE>/;
+        s/log file: \".*\"/log device: <DEVICE>/;
         s/daddr: [0-9][0-9]*/daddr: <DADDR>/;
         s/length: [0-9][0-9]*/length: <LENGTH>/;
         s/length: [0-9][0-9]*/length: <LENGTH>/;
@@ -103,13 +97,15 @@ _filter_logprint()
 
 _check_log()
 {
-    _clean_log $SCRATCH_DEV
+    _full "clean_log : xfs_logprint"
+    _scratch_xfs_logprint -t       | tee -a $seq.full \
+        | head | grep -q "<CLEAN>" || _fail "DIRTY LOG"
     echo "### xfs_logprint output ###"
-    xfs_logprint $SCRATCH_DEV 2>&1 | _filter_logprint
+    _scratch_xfs_logprint 2>&1 | _filter_logprint
     echo "### xfs_logprint -t -i -s 0 output ###"
-    xfs_logprint -t -i -s 0 $SCRATCH_DEV 2>&1 | _filter_logprint
+    _scratch_xfs_logprint -t -i -s 0 2>&1 | _filter_logprint
     echo "### xfs_logprint -t -b -s 0 output ###"
-    xfs_logprint -t -b -s 0 $SCRATCH_DEV 2>&1 | _filter_logprint
+    _scratch_xfs_logprint -t -b -s 0 2>&1 | _filter_logprint
 }
 
 # real QA test starts here
@@ -122,7 +118,7 @@ touch $seq.out
 umount $SCRATCH_DEV >/dev/null 2>&1
 
 _full "mkfs"
-mkfs_xfs -lsize=2000b $SCRATCH_DEV | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs -lsize=2000b | _filter_mkfs 2>$tmp.mkfs
 source $tmp.mkfs
 [ $dbsize -eq 4096 ] \
     || _notrun "Logprint test, tailored to 4K blocks ($dbsize in use)"
@@ -134,7 +130,7 @@ source $tmp.mkfs
 rm -f $seq.out $seq.full
 
 _full " mount"
-mount -t xfs $SCRATCH_DEV $SCRATCH_MNT >>$seq.full 2>&1 \
+_scratch_mount >>$seq.full 2>&1 \
     || _fail "mount failed"
 
 _setup_seq_out
diff --git a/019 b/019
index cafb9345911269261d4cb11d09d40689cbb02aee..5ce5cecb7bbc45976dba651721dccaabe04daef2 100755 (executable)
--- a/019
+++ b/019
@@ -130,15 +130,15 @@ _verify_fs()
        umount $SCRATCH_DEV >/dev/null 2>&1
 
        _full "mkfs"
-       mkfs_xfs $VERSION -p $protofile $SCRATCH_DEV >>$seqfull 2>&1 \
+       _scratch_mkfs_xfs $VERSION -p $protofile >>$seqfull 2>&1 \
                || _fail "mount failed"
 
        echo "*** check FS"
-       _check_fs $SCRATCH_DEV
+       _check_scratch_fs
 
        echo "*** mount FS"
        _full " mount"
-       mount -t xfs $SCRATCH_DEV $SCRATCH_MNT >>$seqfull 2>&1 \
+       _scratch_mount >>$seqfull 2>&1 \
                || _fail "mount failed"
     
        echo "*** verify FS"
@@ -153,7 +153,7 @@ _verify_fs()
                || _fail "umount failed"
            
        echo "*** check FS"
-       _check_fs $SCRATCH_DEV
+       _check_scratch_fs
 }
 
 _verify_fs 1
diff --git a/021 b/021
index 42a97fb781ab5e983ee2e887ca3961f73895364c..5afd7eb3042f081a2521dcdb53d143ac0b0adf37 100755 (executable)
--- a/021
+++ b/021
@@ -94,11 +94,11 @@ rm -f $seq.full
 umount $SCRATCH_DEV >/dev/null 2>&1
 
 echo "*** mkfs"
-mkfs_xfs $SCRATCH_DEV >/dev/null \
+_scratch_mkfs_xfs >/dev/null \
        || _fail "mkfs failed"
 
 echo "*** mount FS"
-mount -t xfs $SCRATCH_DEV $SCRATCH_MNT >/dev/null \
+_scratch_mount >/dev/null \
        || _fail "mount failed"
 
 testfile=$SCRATCH_MNT/testfile
diff --git a/029 b/029
index 17b903c53a2427435b87f3d275ab0dcf0377e730..d0f263302a01ad85090885df55a0a30e42f3270a 100755 (executable)
--- a/029
+++ b/029
@@ -51,15 +51,6 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 . ./common.rc
 . ./common.filter
 
-mkfs_args=""
-logp_args=""
-if [ ! -z "$SCRATCH_LOGDEV" ]  # test external log if possible
-then
-       _require_logdev
-       mkfs_args="-l logdev=$SCRATCH_LOGDEV,size=1200b"
-       logp_args="-l $SCRATCH_LOGDEV"
-fi
-
 _filter_logprint()
 {
        perl -ne '
@@ -78,10 +69,10 @@ _filter_logprint()
 _require_scratch
 
 echo
-mkfs_xfs $mkfs_args $SCRATCH_DEV | _filter_mkfs 2>/dev/null
+_scratch_mkfs_xfs | _filter_mkfs 2>/dev/null
 
 echo
-xfs_logprint $logp_args $SCRATCH_DEV | _filter_logprint
+_scratch_xfs_logprint | _filter_logprint
 
 status=0
 exit
diff --git a/030 b/030
index 3beed49112d48d576ea4f7fb7e16d2422c0ab938..daab1b988f11421a798f0a1e5b6b4a6ac097f0d9 100755 (executable)
--- a/030
+++ b/030
@@ -80,12 +80,12 @@ DSIZE="-dsize=100m"
 # superblock (hanging around from earlier tests)...
 # 
 
-mkfs_xfs $DSIZE $SCRATCH_DEV >/dev/null 2>&1
+_scratch_mkfs_xfs $DSIZE >/dev/null 2>&1
 if [ $? -ne 0 ]                # probably don't have a big enough scratch
 then
        _notrun "SCRATCH_DEV too small, results would be non-deterministic"
 else
-       mount -t xfs $SCRATCH_DEV $SCRATCH_MNT
+       _scratch_mount
        src/feature -U $SCRATCH_DEV && \
                _notrun "Quota are enabled, test needs controlled sb recovery"
        src/feature -G $SCRATCH_DEV && \
@@ -102,7 +102,7 @@ src/devzero -v -1 -n "$clear" $SCRATCH_DEV >/dev/null
 
 # now kick off the real repair test...
 # 
-mkfs_xfs $DSIZE $SCRATCH_DEV | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs $DSIZE | _filter_mkfs 2>$tmp.mkfs
 source $tmp.mkfs
 _check_ag 0
 _check_ag -1
diff --git a/030.out b/030.out
index a1d1b6a132f7b04a187f07c188319bb17d66ff35..48fdedd8a7362bd22e12474159faebc66f0b2fba 100644 (file)
--- a/030.out
+++ b/030.out
@@ -20,7 +20,7 @@ sb realtime bitmap inode INO inconsistent with calculated value INO
 resetting superblock realtime bitmap ino pointer to INO
 sb realtime summary inode INO inconsistent with calculated value INO
 resetting superblock realtime summary ino pointer to INO
-Phase 2 - using internal log
+Phase 2 - using <TYPEOF> log
         - zero log...
         - scan filesystem freespace and inode maps...
         - found root inode chunk
@@ -49,7 +49,7 @@ done
 Corrupting agf 0 - setting bits to 0
 Wrote X.XXKb (value 0x0)
 Phase 1 - find and verify superblock...
-Phase 2 - using internal log
+Phase 2 - using <TYPEOF> log
         - zero log...
         - scan filesystem freespace and inode maps...
 bad magic # 0x0 for agf 0
@@ -84,7 +84,7 @@ done
 Corrupting agi 0 - setting bits to 0
 Wrote X.XXKb (value 0x0)
 Phase 1 - find and verify superblock...
-Phase 2 - using internal log
+Phase 2 - using <TYPEOF> log
         - zero log...
         - scan filesystem freespace and inode maps...
 bad magic # 0x0 for agi 0
@@ -120,7 +120,7 @@ done
 Corrupting agfl 0 - setting bits to 0
 Wrote X.XXKb (value 0x0)
 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
@@ -161,7 +161,7 @@ sb realtime bitmap inode INO inconsistent with calculated value INO
 resetting superblock realtime bitmap ino pointer to INO
 sb realtime summary inode INO inconsistent with calculated value INO
 resetting superblock realtime summary ino pointer to INO
-Phase 2 - using internal log
+Phase 2 - using <TYPEOF> log
         - zero log...
         - scan filesystem freespace and inode maps...
         - found root inode chunk
@@ -192,7 +192,7 @@ done
 Corrupting agf 0 - setting bits to -1
 Wrote X.XXKb (value 0xffffffff)
 Phase 1 - find and verify superblock...
-Phase 2 - using internal log
+Phase 2 - using <TYPEOF> log
         - zero log...
         - scan filesystem freespace and inode maps...
 bad magic # 0xffffffff for agf 0
@@ -231,7 +231,7 @@ done
 Corrupting agi 0 - setting bits to -1
 Wrote X.XXKb (value 0xffffffff)
 Phase 1 - find and verify superblock...
-Phase 2 - using internal log
+Phase 2 - using <TYPEOF> log
         - zero log...
         - scan filesystem freespace and inode maps...
 bad magic # 0xffffffff for agi 0
@@ -267,7 +267,7 @@ done
 Corrupting agfl 0 - setting bits to -1
 Wrote X.XXKb (value 0xffffffff)
 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
diff --git a/031 b/031
index 38fe575715191e32ef449f39cad5d9ddac6d9142..acd8c9c4c455d7664d7c70c62d39963022170525 100755 (executable)
--- a/031
+++ b/031
@@ -54,11 +54,11 @@ rm -f $seq.full
 
 _check_repair()
 {
-       xfs_repair $SCRATCH_DEV >$tmp.0 2>&1
+       _scratch_xfs_repair >$tmp.0 2>&1
        for i in 1 2 3 4
        do
                echo "Repairing, iteration $i" | tee -a $seq.full
-               xfs_repair $SCRATCH_DEV 2>&1 | tee -a $seq.full >$tmp.$i
+               _scratch_xfs_repair 2>&1 | tee -a $seq.full >$tmp.$i
                diff $tmp.0 $tmp.$i >> $seq.full
                if [ $? -ne 0 ]; then
                        echo "ERROR: repair round $i differs (see $seq.full)"
@@ -67,6 +67,8 @@ _check_repair()
                # echo all interesting stuff...
                perl -ne '
                        s/(rebuilding directory inode) (\d+)/\1 INO/g;
+                       s/internal log/<TYPEOF> log/g;
+                       s/external log on \S+/<TYPEOF> log/g;
                        /^\S+/ && print;
                ' $tmp.$i
        done
@@ -102,34 +104,34 @@ EOF
 # 
 _require_scratch
 
-MKFSV1="-p $tmp.proto -n version=1 $SCRATCH_DEV"
-MKFSV2="-p $tmp.proto -n version=2 $SCRATCH_DEV"
+MKFSV1="-p $tmp.proto -n version=1"
+MKFSV2="-p $tmp.proto -n version=2"
 
 # sanity test - default + one root directory entry
 _create_proto 0
 echo "=== version 1, one entry"
-mkfs_xfs $MKFSV1 | _filter_mkfs >/dev/null 2>&1
+_scratch_mkfs_xfs $MKFSV1 | _filter_mkfs >/dev/null 2>&1
 _check_repair
 echo "=== version 2, one entry (shortform)"
-mkfs_xfs $MKFSV2 | _filter_mkfs >/dev/null 2>&1
+_scratch_mkfs_xfs $MKFSV2 | _filter_mkfs >/dev/null 2>&1
 _check_repair
 
 # block-form root directory & repeat
 _create_proto 20
 echo "=== version 1, twenty entries"
-mkfs_xfs $MKFSV1 | _filter_mkfs >/dev/null 2>&1
+_scratch_mkfs_xfs $MKFSV1 | _filter_mkfs >/dev/null 2>&1
 _check_repair
 echo "=== version 2, twenty entries (block form)"
-mkfs_xfs $MKFSV2 | _filter_mkfs >/dev/null 2>&1
+_scratch_mkfs_xfs $MKFSV2 | _filter_mkfs >/dev/null 2>&1
 _check_repair
 
 # leaf-form root directory & repeat
 _create_proto 1000
 echo "=== version 1, thousand entries"
-mkfs_xfs $MKFSV1 | _filter_mkfs >/dev/null 2>&1
+_scratch_mkfs_xfs $MKFSV1 | _filter_mkfs >/dev/null 2>&1
 _check_repair
 echo "=== version 2, thousand entries (leaf form)"
-mkfs_xfs $MKFSV2 | _filter_mkfs >/dev/null 2>&1
+_scratch_mkfs_xfs $MKFSV2 | _filter_mkfs >/dev/null 2>&1
 _check_repair
 
 # success, all done
diff --git a/031.out b/031.out
index 949df3568b1df07c219fa1ab3204551ba335047c..baebe6398bfb3f73be40d677243ffd1f1aeeaed6 100644 (file)
--- a/031.out
+++ b/031.out
@@ -2,7 +2,7 @@ QA output created by 031
 === version 1, one entry
 Repairing, iteration 1
 Phase 1 - find and verify superblock...
-Phase 2 - using internal log
+Phase 2 - using <TYPEOF> log
 Phase 3 - for each AG...
 Phase 4 - check for duplicate blocks...
 Phase 5 - rebuild AG headers and trees...
@@ -11,7 +11,7 @@ Phase 7 - verify and correct link counts...
 done
 Repairing, iteration 2
 Phase 1 - find and verify superblock...
-Phase 2 - using internal log
+Phase 2 - using <TYPEOF> log
 Phase 3 - for each AG...
 Phase 4 - check for duplicate blocks...
 Phase 5 - rebuild AG headers and trees...
@@ -20,7 +20,7 @@ Phase 7 - verify and correct link counts...
 done
 Repairing, iteration 3
 Phase 1 - find and verify superblock...
-Phase 2 - using internal log
+Phase 2 - using <TYPEOF> log
 Phase 3 - for each AG...
 Phase 4 - check for duplicate blocks...
 Phase 5 - rebuild AG headers and trees...
@@ -29,7 +29,7 @@ Phase 7 - verify and correct link counts...
 done
 Repairing, iteration 4
 Phase 1 - find and verify superblock...
-Phase 2 - using internal log
+Phase 2 - using <TYPEOF> log
 Phase 3 - for each AG...
 Phase 4 - check for duplicate blocks...
 Phase 5 - rebuild AG headers and trees...
@@ -40,7 +40,7 @@ done
 === version 2, one entry (shortform)
 Repairing, iteration 1
 Phase 1 - find and verify superblock...
-Phase 2 - using internal log
+Phase 2 - using <TYPEOF> log
 Phase 3 - for each AG...
 Phase 4 - check for duplicate blocks...
 Phase 5 - rebuild AG headers and trees...
@@ -49,7 +49,7 @@ Phase 7 - verify and correct link counts...
 done
 Repairing, iteration 2
 Phase 1 - find and verify superblock...
-Phase 2 - using internal log
+Phase 2 - using <TYPEOF> log
 Phase 3 - for each AG...
 Phase 4 - check for duplicate blocks...
 Phase 5 - rebuild AG headers and trees...
@@ -58,7 +58,7 @@ Phase 7 - verify and correct link counts...
 done
 Repairing, iteration 3
 Phase 1 - find and verify superblock...
-Phase 2 - using internal log
+Phase 2 - using <TYPEOF> log
 Phase 3 - for each AG...
 Phase 4 - check for duplicate blocks...
 Phase 5 - rebuild AG headers and trees...
@@ -67,7 +67,7 @@ Phase 7 - verify and correct link counts...
 done
 Repairing, iteration 4
 Phase 1 - find and verify superblock...
-Phase 2 - using internal log
+Phase 2 - using <TYPEOF> log
 Phase 3 - for each AG...
 Phase 4 - check for duplicate blocks...
 Phase 5 - rebuild AG headers and trees...
@@ -78,7 +78,7 @@ done
 === version 1, twenty entries
 Repairing, iteration 1
 Phase 1 - find and verify superblock...
-Phase 2 - using internal log
+Phase 2 - using <TYPEOF> log
 Phase 3 - for each AG...
 Phase 4 - check for duplicate blocks...
 Phase 5 - rebuild AG headers and trees...
@@ -87,7 +87,7 @@ Phase 7 - verify and correct link counts...
 done
 Repairing, iteration 2
 Phase 1 - find and verify superblock...
-Phase 2 - using internal log
+Phase 2 - using <TYPEOF> log
 Phase 3 - for each AG...
 Phase 4 - check for duplicate blocks...
 Phase 5 - rebuild AG headers and trees...
@@ -96,7 +96,7 @@ Phase 7 - verify and correct link counts...
 done
 Repairing, iteration 3
 Phase 1 - find and verify superblock...
-Phase 2 - using internal log
+Phase 2 - using <TYPEOF> log
 Phase 3 - for each AG...
 Phase 4 - check for duplicate blocks...
 Phase 5 - rebuild AG headers and trees...
@@ -105,7 +105,7 @@ Phase 7 - verify and correct link counts...
 done
 Repairing, iteration 4
 Phase 1 - find and verify superblock...
-Phase 2 - using internal log
+Phase 2 - using <TYPEOF> log
 Phase 3 - for each AG...
 Phase 4 - check for duplicate blocks...
 Phase 5 - rebuild AG headers and trees...
@@ -116,7 +116,7 @@ done
 === version 2, twenty entries (block form)
 Repairing, iteration 1
 Phase 1 - find and verify superblock...
-Phase 2 - using internal log
+Phase 2 - using <TYPEOF> log
 Phase 3 - for each AG...
 Phase 4 - check for duplicate blocks...
 Phase 5 - rebuild AG headers and trees...
@@ -126,7 +126,7 @@ Phase 7 - verify and correct link counts...
 done
 Repairing, iteration 2
 Phase 1 - find and verify superblock...
-Phase 2 - using internal log
+Phase 2 - using <TYPEOF> log
 Phase 3 - for each AG...
 Phase 4 - check for duplicate blocks...
 Phase 5 - rebuild AG headers and trees...
@@ -136,7 +136,7 @@ Phase 7 - verify and correct link counts...
 done
 Repairing, iteration 3
 Phase 1 - find and verify superblock...
-Phase 2 - using internal log
+Phase 2 - using <TYPEOF> log
 Phase 3 - for each AG...
 Phase 4 - check for duplicate blocks...
 Phase 5 - rebuild AG headers and trees...
@@ -146,7 +146,7 @@ Phase 7 - verify and correct link counts...
 done
 Repairing, iteration 4
 Phase 1 - find and verify superblock...
-Phase 2 - using internal log
+Phase 2 - using <TYPEOF> log
 Phase 3 - for each AG...
 Phase 4 - check for duplicate blocks...
 Phase 5 - rebuild AG headers and trees...
@@ -158,7 +158,7 @@ done
 === version 1, thousand entries
 Repairing, iteration 1
 Phase 1 - find and verify superblock...
-Phase 2 - using internal log
+Phase 2 - using <TYPEOF> log
 Phase 3 - for each AG...
 Phase 4 - check for duplicate blocks...
 Phase 5 - rebuild AG headers and trees...
@@ -167,7 +167,7 @@ Phase 7 - verify and correct link counts...
 done
 Repairing, iteration 2
 Phase 1 - find and verify superblock...
-Phase 2 - using internal log
+Phase 2 - using <TYPEOF> log
 Phase 3 - for each AG...
 Phase 4 - check for duplicate blocks...
 Phase 5 - rebuild AG headers and trees...
@@ -176,7 +176,7 @@ Phase 7 - verify and correct link counts...
 done
 Repairing, iteration 3
 Phase 1 - find and verify superblock...
-Phase 2 - using internal log
+Phase 2 - using <TYPEOF> log
 Phase 3 - for each AG...
 Phase 4 - check for duplicate blocks...
 Phase 5 - rebuild AG headers and trees...
@@ -185,7 +185,7 @@ Phase 7 - verify and correct link counts...
 done
 Repairing, iteration 4
 Phase 1 - find and verify superblock...
-Phase 2 - using internal log
+Phase 2 - using <TYPEOF> log
 Phase 3 - for each AG...
 Phase 4 - check for duplicate blocks...
 Phase 5 - rebuild AG headers and trees...
@@ -196,7 +196,7 @@ done
 === version 2, thousand entries (leaf form)
 Repairing, iteration 1
 Phase 1 - find and verify superblock...
-Phase 2 - using internal log
+Phase 2 - using <TYPEOF> log
 Phase 3 - for each AG...
 Phase 4 - check for duplicate blocks...
 Phase 5 - rebuild AG headers and trees...
@@ -206,7 +206,7 @@ Phase 7 - verify and correct link counts...
 done
 Repairing, iteration 2
 Phase 1 - find and verify superblock...
-Phase 2 - using internal log
+Phase 2 - using <TYPEOF> log
 Phase 3 - for each AG...
 Phase 4 - check for duplicate blocks...
 Phase 5 - rebuild AG headers and trees...
@@ -216,7 +216,7 @@ Phase 7 - verify and correct link counts...
 done
 Repairing, iteration 3
 Phase 1 - find and verify superblock...
-Phase 2 - using internal log
+Phase 2 - using <TYPEOF> log
 Phase 3 - for each AG...
 Phase 4 - check for duplicate blocks...
 Phase 5 - rebuild AG headers and trees...
@@ -226,7 +226,7 @@ Phase 7 - verify and correct link counts...
 done
 Repairing, iteration 4
 Phase 1 - find and verify superblock...
-Phase 2 - using internal log
+Phase 2 - using <TYPEOF> log
 Phase 3 - for each AG...
 Phase 4 - check for duplicate blocks...
 Phase 5 - rebuild AG headers and trees...
diff --git a/033 b/033
index ec6276a0276899b8396852f598b6a4df2757af88..dd27aada4d06e5ebe9f1bf437d7e61998f6676e4 100755 (executable)
--- a/033
+++ b/033
@@ -75,16 +75,16 @@ _check_root_inos()
 _require_scratch
 
 # devzero blows away 512byte blocks, so make 512byte inodes (at least)
-mkfs_xfs $SCRATCH_DEV | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
 source $tmp.mkfs
 [ $isize -lt 512 ] && \
-       mkfs_xfs -isize=512 $SCRATCH_DEV | _filter_mkfs >/dev/null 2>&1
+       _scratch_mkfs_xfs -isize=512 | _filter_mkfs >/dev/null 2>&1
 
 `xfs_db -r -c sb -c p $SCRATCH_DEV | grep 'ino = ' | \
        sed -e 's/ //g' -e 's/^/export /'`
 
 # check we won't get any quota inodes setup on mount
-mount -t xfs $SCRATCH_DEV $SCRATCH_MNT
+_scratch_mount
 src/feature -U $SCRATCH_DEV && \
        _notrun "Quota are enabled, test needs controlled sb recovery"
 src/feature -G $SCRATCH_DEV && \
diff --git a/033.out b/033.out
index 93fb00c534f12ddb7e35af1af8b04d7261076dbf..50f273d68504c152e63b5c15230a63567ab744cc 100644 (file)
--- a/033.out
+++ b/033.out
@@ -8,7 +8,7 @@ realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
 Corrupting root inode - setting bits to 0
 Wrote X.XXKb (value 0x0)
 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
@@ -44,7 +44,7 @@ done
 Corrupting rt bitmap inode - setting bits to 0
 Wrote X.XXKb (value 0x0)
 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
@@ -80,7 +80,7 @@ done
 Corrupting rt summary inode - setting bits to 0
 Wrote X.XXKb (value 0x0)
 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
@@ -116,7 +116,7 @@ done
 Corrupting root inode - setting bits to -1
 Wrote X.XXKb (value 0xffffffff)
 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
@@ -154,7 +154,7 @@ done
 Corrupting rt bitmap inode - setting bits to -1
 Wrote X.XXKb (value 0xffffffff)
 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
@@ -192,7 +192,7 @@ done
 Corrupting rt summary inode - setting bits to -1
 Wrote X.XXKb (value 0xffffffff)
 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
diff --git a/034 b/034
index 36fcd0205be1bb6b083b82ea82b3440e8060b045..c9d23b7c25dcface7278d5ad7592bc0131d46e3c 100755 (executable)
--- a/034
+++ b/034
@@ -67,14 +67,14 @@ rm -f $seq.full
 umount $SCRATCH_DEV >/dev/null 2>&1
 echo "*** MKFS ***"                         >>$seq.full
 echo ""                                     >>$seq.full
-mkfs_xfs $SCRATCH_DEV                    >>$seq.full 2>&1 \
+_scratch_mkfs_xfs                           >>$seq.full 2>&1 \
     || _fail "mkfs failed"
-mount -t xfs $SCRATCH_DEV $SCRATCH_MNT      >>$seq.full 2>&1 \
+_scratch_mount                              >>$seq.full 2>&1 \
     || _fail "mount failed"
 
 echo "*** test"
 
-_check_fs $SCRATCH_DEV
+_check_scratch_fs
 
 if ! touch $SCRATCH_MNT/fish
 then
@@ -95,7 +95,7 @@ then
 fi
 
 # pv 801241 causes corruption here (inode left in agi_unlinked list)
-_check_fs $SCRATCH_DEV
+_check_scratch_fs
 
 echo "*** done"
 # happy exit
diff --git a/041 b/041
index 5b7af3fd46d5bd30f45e050c6ac8f240dd03b89f..3589ad2a393617533cd4ab1d2dc8ecdb0d936af3 100755 (executable)
--- a/041
+++ b/041
@@ -75,8 +75,8 @@ rm -f $seq.full
 #agsize=16
 agsize=32
 echo -n "Make $agsize megabyte filesystem on SCRATCH_DEV and mount... "
-_do "mkfs_xfs -dsize=${agsize}m,agcount=1 $SCRATCH_DEV"
-_do "mount -t xfs $SCRATCH_DEV $SCRATCH_MNT"
+_do "_scratch_mkfs_xfs -dsize=${agsize}m,agcount=1"
+_do "_scratch_mount"
 echo "done"
 
 # full allocation group -> partial; partial -> expand partial + new partial;
@@ -90,7 +90,7 @@ do
     _do "Grow filesystem to $size blocks" "xfs_growfs -D ${size} $SCRATCH_MNT"
     echo -n "Flush filesystem... "
     _do "umount $SCRATCH_MNT"
-    _do "mount -t xfs $SCRATCH_DEV $SCRATCH_MNT"
+    _do "_scratch_mount"
     echo "done"
     echo -n "Check files... "
     if ! _do "src/fill2fs_check $tmp.manifest"; then
diff --git a/042 b/042
index 44a382d227902d632783117b641d290cb4ea6076..4ff3064a09c2769fefdd9cf82396becfc19ce5ca 100755 (executable)
--- a/042
+++ b/042
@@ -100,13 +100,11 @@ _cull_files()
 # xfs_repair is going to need three to verify the superblock
 
 rm -f $seq.full
-bmap_cmd="xfs_bmap -v"
-mnt_cmd="mount -t xfs $SCRATCH_DEV $SCRATCH_MNT"
 _do_die_on_error=message_only
 
 echo -n "Make a 48 megabyte filesystem on SCRATCH_DEV and mount... "
-_do "mkfs_xfs -dsize=48m,agcount=3 $SCRATCH_DEV"
-_do "$mnt_cmd"
+_do "_scratch_mkfs_xfs -dsize=48m,agcount=3"
+_do "_scratch_mount"
 echo "done"
 
 echo -n "Reserve 16 1Mb unfragmented regions... "
@@ -114,7 +112,7 @@ for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
 do
     _do "dd if=/dev/zero of=$SCRATCH_MNT/hole$i bs=4096 count=256"
     _do "dd if=/dev/zero of=$SCRATCH_MNT/space$i bs=4096 count=1"
-    _do "$bmap_cmd $SCRATCH_MNT/hole$i"
+    _do "xfs_bmap -v $SCRATCH_MNT/hole$i"
 done
 echo "done" 
 
@@ -125,7 +123,7 @@ _do "src/fill2fs $fill_options --dir=$SCRATCH_MNT/fill --list=- > $tmp.manifest"
 echo "done"
 # flush the filesystem - make sure there is no space "lost" to pre-allocation
 _do "umount $SCRATCH_MNT"
-_do "$mnt_cmd"
+_do "_scratch_mount"
 echo -n "Use up any further available space using dd... "
 _do "dd if=/dev/zero of=$SCRATCH_MNT/pad bs=4096"
 echo "done"
@@ -135,13 +133,13 @@ _do "Delete every second file" "_cull_files"
 echo -n "Create one very large file... "
 _do "src/fill2 -d nbytes=16000000,file=$SCRATCH_MNT/fragmented"
 echo "done"
-_do "$bmap_cmd $SCRATCH_MNT/fragmented"
+_do "xfs_bmap -v $SCRATCH_MNT/fragmented"
 _do "sum $SCRATCH_MNT/fragmented >$tmp.sum1"
 _do "Remove other files" "rm -rf $SCRATCH_MNT/{pad,hole*}"
 
 # defragment
 _do "Run xfs_fsr on filesystem" "xfs_fsr -v $SCRATCH_DEV"
-_do "$bmap_cmd $SCRATCH_MNT/fragmented"
+_do "xfs_bmap -v $SCRATCH_MNT/fragmented"
 _do "Check 4k files" "src/fill2fs_check $tmp.manifest"
 
 # check
@@ -153,7 +151,7 @@ if ! _do "diff $tmp.sum1 $tmp.sum2"; then
     status=1; exit
 fi
 echo "done"
-_do "Checking filesystem" "_check_fs $SCRATCH_DEV"
+_do "Checking filesystem" "_check_scratch_fs"
 
 # success, all done
 echo "xfs_fsr tests passed."
diff --git a/044 b/044
index 5ab547acccac66e75229b2a1d006a9d0f65c1e25..bb4191f50a68d5f6faa7766ba95508b4def0d58d 100755 (executable)
--- a/044
+++ b/044
@@ -70,7 +70,7 @@ _filter_logprint()
 _check_mount()
 {
     echo "    *** mount (expect success)"
-    if ! mount -t xfs -o logdev=$SCRATCH_LOGDEV $SCRATCH_DEV $SCRATCH_MNT
+    if ! _scratch_mount
     then
         echo "        !!! mount failed (expecting success)"
         status=1
@@ -89,7 +89,7 @@ _check_mount()
 _check_no_mount()
 {
     echo "    *** mount (expect failure)"
-    if mount -t xfs -o logdev=$SCRATCH_LOGDEV $SCRATCH_DEV $SCRATCH_MNT >$tmp.err 2>&1
+    if _scratch_mount >$tmp.err 2>&1
     then
         cat $tmp.err
         echo "        !!! mount succeeded (expecting failure)"
@@ -128,10 +128,7 @@ echo "*** mkfs"
 
 lversion=1
 lsize=16777216
-ldev=$SCRATCH_LOGDEV
-MKFS_OPTIONS="-llogdev=$ldev,size=$lsize,version=$lversion"; export MKFS_OPTIONS
-
-mkfs_xfs $logopts $SCRATCH_DEV | _filter_mkfs 2>/dev/null
+_scratch_mkfs_xfs -lsize=$lsize,version=$lversion | _filter_mkfs 2>/dev/null
 _check_mount
 _check_require_logdev
 
diff --git a/045 b/045
index 7191a2aed5dc0352a9cd9ce6191b326f0e79886d..4f559989af043e90b6bd7a4a582281f554b0b3ac 100755 (executable)
--- a/045
+++ b/045
@@ -51,9 +51,9 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 . ./common.rc
 . ./common.filter
 
-_get_uuid()
+_get_existing_uuid()
 {
-       xfs_db -r $1 -c "uuid" | $AWK_PROG '/^UUID/ { print $3 }'
+    xfs_db -r $TEST_DEV -c "uuid" | $AWK_PROG '/^UUID/ { print $3 }'
 }
 
 # real QA test starts here
@@ -61,9 +61,9 @@ _get_uuid()
 _require_scratch
 
 echo "*** get uuid"
-uuid=`_get_uuid $TEST_DEV`
+uuid=`_get_existing_uuid`
 echo "*** mkfs"
-if ! mkfs_xfs $SCRATCH_DEV >$tmp.out 2>&1
+if ! _scratch_mkfs_xfs >$tmp.out 2>&1
 then
     cat $tmp.out
     echo "!!! failed to mkfs on $SCRATCH_DEV"
@@ -71,7 +71,7 @@ then
 fi
 
 echo "*** mount fs with bad mount option (expect failure)"
-if mount -t xfs $SCRATCH_DEV $SCRATCH_MNT -o foobar >$tmp.out 2>&1
+if _scratch_mount -o foobar >$tmp.out 2>&1
 then
     cat $tmp.out
     echo "!!! mount succeeded (expecting failure)"
@@ -79,10 +79,10 @@ then
 fi
 
 echo "*** duplicate uuid"
-xfs_db -x $SCRATCH_DEV -c "uuid $uuid" >/dev/null
+xfs_db -x -c "uuid $uuid" `_scratch_xfs_db_options` >/dev/null
 
 echo "*** mount fs with duplicate uuid (expect failure)"
-if mount -t xfs $SCRATCH_DEV $SCRATCH_MNT >$tmp.out 2>&1
+if _scratch_mount >$tmp.out 2>&1
 then
     cat $tmp.out
     echo "!!! mount succeeded (expecting failure)"
diff --git a/049 b/049
index 8e4443f3db7ce340d16e9e8b9af102f4fcfaa4bf..c4f0a5f347ef59c65726b8ca6cb565cb0e83cde0 100755 (executable)
--- a/049
+++ b/049
@@ -92,7 +92,8 @@ mount -t ext2 $SCRATCH_DEV $SCRATCH_MNT >> $seq.full 2>&1 \
     || _fail "!!! failed to mount"
 
 _log "Create xfs fs in file on scratch"
-mkfs_xfs -dfile,name=$SCRATCH_MNT/test.xfs,size=20m >> $seq.full 2>&1 \
+/sbin/mkfs.xfs -f $MKFS_OPTIONS -dfile,name=$SCRATCH_MNT/test.xfs,size=20m \
+    >> $seq.full 2>&1 \
     || _fail "!!! failed to mkfs xfs"
 
 _log "Make mount points"
diff --git a/050 b/050
index ad2a59a5c48f53e71beef92de08c5a0513211a7f..eac9423b8d07677132fb8f6be8f84dd32eed619f 100755 (executable)
--- a/050
+++ b/050
@@ -75,7 +75,7 @@ inohard=10
 # The actual point at which limit enforcement takes place for the
 # hard block limit is variable depending on filesystem blocksize,
 # and iosize.  What we want to test is that the limit is enforced
-# (ie. blksize less than limit but not unduly less - ~85% is kind,
+# (ie. blksize less than limit but not unduly less - ~85% is kind)
 # nowadays we actually get much closer to the limit before EDQUOT.
 # 
 _filter_and_check_blocks()
@@ -94,7 +94,7 @@ _filter_and_check_blocks()
 }
 
 # real QA test starts here
-mkfs_xfs $SCRATCH_DEV | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
 cat $tmp.mkfs >>$seq.full
 
 # keep the blocksize and data size for dd later
@@ -149,7 +149,7 @@ _qmount
 repquota -$type $SCRATCH_DEV | _filter_repquota 7
 
 echo
-echo "*** push past the hard inode limit (expect EDQUOT)" | tee -a $seq.full
+echo "*** push past the hard inode limit (EDQUOT if enfd)" | tee -a $seq.full
 for i in 1 2 3 4 5 6 7 8 9 10 11 12
 do
        _file_as_id $SCRATCH_MNT/hard$i $id $type 1024 0
@@ -158,7 +158,7 @@ _qmount
 repquota -$type $SCRATCH_DEV | _filter_repquota 7
 
 echo
-echo "*** push past the hard block limit (expect EDQUOT)" | tee -a $seq.full
+echo "*** push past the hard block limit (EDQUOT is enfd)" | tee -a $seq.full
 _file_as_id $SCRATCH_MNT/softie $id $type 1024 540
 _qmount
 repquota -$type $SCRATCH_DEV | _filter_and_check_blocks 7
diff --git a/052 b/052
index 8330118bea22b298974274dd563571e9dc3276cf..7d369de4ceae412942786370666ae7ac7954376e 100755 (executable)
--- a/052
+++ b/052
@@ -71,7 +71,7 @@ if [ -z "$MOUNT_OPTIONS" ]; then
 fi
 
 # real QA test starts here
-mkfs_xfs $SCRATCH_DEV | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
 cat $tmp.mkfs >>$seq.full
 chmod a+w $seq.full     # arbitrary users will write here
 
diff --git a/053 b/053
index 2f0e6ffdb68120d87a5b6a6e8d7791c22fb28006..c0068b0c23c84a10413dc610aa68b88317b8b45f 100755 (executable)
--- a/053
+++ b/053
@@ -61,10 +61,8 @@ _do_die_on_error=y
 test=$SCRATCH_MNT/test
 
 # make filesystem on scratch using the defaults
-_do 'make filesystem on $SCRATCH_DEV' \
-    'mkfs_xfs $SCRATCH_DEV'
-_do 'mount filesytem' \
-    'mount -t xfs $SCRATCH_DEV $SCRATCH_MNT'
+_do 'make filesystem on $SCRATCH_DEV' '_scratch_mkfs_xfs'
+_do 'mount filesytem' '_scratch_mount'
 
 # create test files and set acls
 acls="
@@ -98,8 +96,8 @@ list_acls()
 echo "acls before repair:"
 list_acls
 _do 'unmount $SCRATCH_DEV' 'umount $SCRATCH_DEV'
-_do 'repair filesystem' 'xfs_repair $SCRATCH_DEV'
-_do 'mount filesytem' 'mount -t xfs $SCRATCH_DEV $SCRATCH_MNT'
+_do 'repair filesystem' '_scratch_xfs_repair'
+_do 'mount filesytem' '_scratch_mount'
 echo "acls after repair: "
 list_acls
 
diff --git a/054 b/054
index c0edf9afa9cbc9cd57261ca96c4b8dc34b8c2c77..b436f3d42e1312dfc16dfbfdb2a67e64b9db56cb 100755 (executable)
--- a/054
+++ b/054
@@ -77,7 +77,7 @@ _filter_stat()
 
 _exercise()
 {
-       mkfs_xfs $SCRATCH_DEV >/dev/null 2>&1
+       _scratch_mkfs_xfs >/dev/null 2>&1
        _qmount
 
        umask 022
@@ -110,8 +110,8 @@ _exercise()
 }
 
 # real QA test starts here
-mkfs_xfs $SCRATCH_DEV >/dev/null 2>&1
-MOUNT_OPTIONS="-o usrquota,grpquota"; export MOUNT_OPTIONS
+_scratch_mkfs_xfs $SCRATCH_DEV >/dev/null 2>&1
+MOUNT_OPTIONS="$MOUNT_OPTIONS -ousrquota,grpquota"; export MOUNT_OPTIONS
 _qmount
 if src/feature -G $SCRATCH_DEV ; then
        :
diff --git a/062 b/062
index 1b7e885dd78f716f463fa439783c7f3f9b75eb96..5b976ad1e727b21daabddbcb289888d6b00dbf5e 100755 (executable)
--- a/062
+++ b/062
@@ -92,8 +92,8 @@ _require_scratch
 rm -f $tmp.backup1 $tmp.backup2 $seq.full
 
 # real QA test starts here
-mkfs_xfs $SCRATCH_DEV | _filter_mkfs 2>$tmp.mkfs
-mount -t xfs $SCRATCH_DEV $SCRATCH_MNT || _fail "mount failed"
+_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
+_scratch_mount || _fail "mount failed"
 _create_test_bed
 
 for nsp in user trusted; do
diff --git a/065 b/065
index bfd0c8097f147f695d60c379d162251d8cedfe8e..6e376effb95efdfbdf7ba65cce8f2501f129c479 100755 (executable)
--- a/065
+++ b/065
@@ -82,7 +82,7 @@ _my_ls_filter()
 # so don't run it
 #
 umount $SCRATCH_DEV 2>/dev/null
-mount -t xfs $SCRATCH_DEV $SCRATCH_MNT
+_scratch_mount
 $here/src/feature -U $SCRATCH_DEV && \
        _notrun "Quota enabled, test needs controlled xfsdump output"
 $here/src/feature -G $SCRATCH_DEV && \
diff --git a/067 b/067
index e8d4da5b055678a79ee238b6d67b2c4b19276c5b..e1943cc02f22e785fb9157cdcf08acecb1a38d5b 100755 (executable)
--- a/067
+++ b/067
@@ -1,6 +1,6 @@
 #! /bin/sh
 # XFS QA Test No. 067
-# $Id: 067,v 1.6 2002/06/05 20:14:16 sandeen Exp $
+# $Id: 067,v 1.7 2003/05/22 04:16:45 fsgqa Exp $
 #
 # Test out acl/dacls which fit in shortform in the inode
 #
@@ -61,10 +61,8 @@ _require_scratch
 
 # set up fs for 1K inodes
 export MKFS_OPTIONS="-i size=1024"
-mkfs_xfs $SCRATCH_DEV>>$here/$seq.full  ||\
-    _error "mkfs failed"
-mount -t xfs $SCRATCH_DEV $SCRATCH_MNT >>$here/$seq.full ||\
-    _error "mount failed"
+_scratch_mkfs_xfs >>$here/$seq.full || _error "mkfs failed"
+_scratch_mount >>$here/$seq.full || _error "mount failed"
 cd $SCRATCH_MNT
 
 # xfs_growfs -n $SCRATCH_MNT
diff --git a/069 b/069
index 039184304dab61fc1b80464350ff904f5b3ef705..adf2deaec2d0814f9ad4bff33731f1ebb0b68821 100755 (executable)
--- a/069
+++ b/069
@@ -1,6 +1,6 @@
 #! /bin/sh
 # XFS QA Test No. 069
-# $Id: 069,v 1.2 2002/09/04 11:14:37 fsgqa Exp $
+# $Id: 069,v 1.3 2003/05/22 04:16:45 fsgqa Exp $
 #
 # Test out writes with O_APPEND flag sets.
 #
@@ -59,12 +59,10 @@ rm -f $seq.full
 umount $SCRATCH_DEV >/dev/null 2>&1
 
 echo "*** mkfs"
-mkfs_xfs $SCRATCH_DEV >/dev/null \
-       || _fail "mkfs failed"
+_scratch_mkfs_xfs >/dev/null || _fail "mkfs failed"
   
 echo "*** mount FS"
-mount -t xfs $SCRATCH_DEV $SCRATCH_MNT >/dev/null \
-       || _fail "mount failed"
+_scratch_mount >/dev/null || _fail "mount failed"
 
 cd $SCRATCH_MNT
 
diff --git a/README b/README
index 27fefc884510ef860ecf5cf33cbfd8c48986acb8..b5266deb3b07fb8b32854016c8e9ce6a7b5436a0 100644 (file)
--- a/README
+++ b/README
@@ -25,9 +25,14 @@ Preparing system for tests:
         - setenv TAPE_DEV "tape device for testing xfsdump"
         - setenv RMT_TAPE_DEV "remote tape device for testing xfsdump"
         - setenv RMT_IRIXTAPE_DEV "remote IRIX tape device for testing xfsdump"
-       - optionally:
-            - setenv SCRATCH_LOGDEV "device for external log"
-             - setenv SCRATCH_RTDEV "device for realtime data"
+               - optionally:
+            - setenv SCRATCH_LOGDEV "device for scratch-fs external log"
+             - setenv SCRATCH_RTDEV "device for scratch-fs realtime data"
+            - setenv TEST_LOGDEV "device for test-fs external log"
+             - setenv TEST_RTDEV "device for test-fs realtime data"
+             - if TEST_LOGDEV and/or TEST_RTDEV, these will always be used.
+             - if SCRATCH_LOGDEV and/or SCRATCH_RTDEV, the USE_EXTERNAL
+               environment variable set to "yes" will enable their use.
         - or add a case to the switch in common.config assigning
           these variables based on the hostname of your test
           machine
diff --git a/bench b/bench
index f1acdc2b0a7bdff181b65254860f0059568065fa..9ec099290610de382872edcf2b87088a34a130e5 100755 (executable)
--- a/bench
+++ b/bench
@@ -15,7 +15,7 @@
 # generation purposes).
 # 
 #-----------------------------------------------------------------------
-# Copyright (c) 2002 Silicon Graphics, Inc.  All Rights Reserved.
+# Copyright (c) 2002-2003 Silicon Graphics, Inc.  All Rights Reserved.
 # 
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of version 2 of the GNU General Public License as
@@ -88,16 +88,6 @@ _fail()
     exit 1
 }
 
-bench_mkfs_xfs()
-{
-    mkfs_xfs -f $extra_mkfs_options $@
-}
-
-bench_mount_xfs()
-{
-    mount -t xfs $extra_mount_options $@
-}
-
 _run_benchmark()
 {
     pass=1
@@ -107,12 +97,9 @@ _run_benchmark()
     while [ $pass -le $passes -o $passes -lt 0 ]
     do
         _log "        *** clean scratch device [$bench starting, pass $pass]"
-        bench_mkfs_xfs  $SCRATCH_DEV 2>&1 | _fix_malloc >>$FULL \
-                            || _fail "            !!! mkfs SCRATCH_DEV failed"
-
+        _scratch_mkfs_xfs 2>&1 | _fix_malloc >>$FULL
         _log "        *** mounting scratch device"
-        bench_mount_xfs $SCRATCH_DEV $SCRATCH_MNT \
-                            || _fail "            !!! failed to mount"
+        _scratch_mount      || _fail "            !!! failed to mount"
         
         _log "        *** mkdir"
         mkdir $SCRATCH_MNT/bench \
@@ -136,7 +123,7 @@ _run_benchmark()
                             || _fail "            !!! failed to umount"
 
         _log "        *** post-umount filesystem check"
-        _check_fs $SCRATCH_DEV
+        _check_scratch_fs
         
         let "pass = pass + 1"
     done
@@ -175,17 +162,13 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _require_scratch
 rm -f bench.* results.*
 
-if [ ! -z "$SCRATCH_LOGDEV" -a ! -z "$USE_SCRATCH_LOGDEV" ]
-then
-       extra_log_options="-l $SCRATCH_LOGDEV"
-       extra_mkfs_options="-llogdev=$SCRATCH_LOGDEV"
-       extra_mount_options="-ologdev=$SCRATCH_LOGDEV"
-fi
+FULL_MKFS_OPTIONS=`_scratch_mkfs_options`
+FULL_MOUNT_OPTIONS=`_scratch_mount_options`
 
 # $OUT is the report which will ultimately be sent, keep it tidy.
 cat >$OUT <<EOF
-bench: MKFS_OPTIONS=$MKFS_OPTIONS $extra_mkfs_options
-bench: MOUNT_OPTIONS=$MOUNT_OPTIONS $extra_mount_options
+bench: MKFS_OPTIONS  -- $FULL_MKFS_OPTIONS
+bench: MOUNT_OPTIONS --$FULL_MOUNT_OPTIONS
 
 EOF
 
@@ -195,8 +178,8 @@ do
     echo "" >$LOG
     _log "*** benchmark started [passes=$passes, benchmark=$bench]"
     _log "*** (`date`)"
-    _log "*** MKFS_OPTIONS=$MKFS_OPTIONS"
-    _log "*** MOUNT_OPTIONS=$MOUNT_OPTIONS"
+    _log "MKFS_OPTIONS  -- $FULL_MKFS_OPTIONS"
+    _log "MOUNT_OPTIONS -- $FULL_MOUNT_OPTIONS"
     _log "        *** unmounting scratch device"
     umount $SCRATCH_DEV 2>&1 | _fix_malloc >>$FULL
 
diff --git a/check b/check
index 3b55ebc6ba32fbb360b0c747664f791661e0a88d..fd299cdf9089a64512b5031cad12c304636fa494 100755 (executable)
--- a/check
+++ b/check
@@ -150,41 +150,33 @@ timestamp=${TIMESTAMP:=false}
 
 [ -f check.time ] || touch check.time
 
-if [ ! -z "$MKFS_OPTIONS" ]
+FULL_MKFS_OPTIONS=`_scratch_mkfs_options`
+echo check: MKFS_OPTIONS  -- $FULL_MKFS_OPTIONS
+umount $SCRATCH_DEV 2>/dev/null
+# call the overridden mkfs.xfs - make sure the FS is built
+# the same as we'll create it later.
+if ! _scratch_mkfs_xfs -f >$tmp.err 2>&1
 then
-    echo "check: \$MKFS_OPTIONS specified -- \"$MKFS_OPTIONS\""
-    umount $SCRATCH_DEV 2>/dev/null
-    # call the overridden mkfs.xfs - make sure the FS is built
-    # the same as we'll create it later.
-    if ! mkfs_xfs -f $SCRATCH_DEV >$tmp.err 2>&1
-    then
-       echo "our local mkfs_xfs routine ..."
-       cat $tmp.err
-        echo "check: failed to mkfs.xfs \$SCRATCH_DEV using specified options"
-        exit 1
-    fi
+    echo "our local _scratch_mkfs_xfs routine ..."
+    cat $tmp.err
+    echo "check: failed to mkfs.xfs \$SCRATCH_DEV using specified options"
+    exit 1
 fi
 
-if [ ! -z "$MOUNT_OPTIONS" ]
+FULL_MOUNT_OPTIONS=`_scratch_mount_options`
+echo check: MOUNT_OPTIONS -- $FULL_MOUNT_OPTIONS
+# call the overridden mount - make sure the FS mounts with
+# the same options that we'll mount with later.
+if ! _scratch_mount >$tmp.err 2>&1
 then
-    echo "check: \$MOUNT_OPTIONS specified -- \"$MOUNT_OPTIONS\""
-    umount $TEST_DEV
-    # call the overridden mount - make sure the FS starts as
-    # the same as we'll set it later.
-    if ! mount -t xfs $TEST_DEV $TEST_DIR >$tmp.err 2>&1
-    then
-       echo "our local mount routine ..."
-       cat $tmp.err
-        # call the normal mount
-       echo "normal mount ..."
-        /bin/mount -t xfs $TEST_DEV $TEST_DIR
-        echo "check: failed to mount \$TEST_DEV using specified mount options"
-        exit 1
-    fi
+    echo "our local mount routine ..."
+    cat $tmp.err
+    echo "check: failed to mount \$SCRATCH_DEV using specified options"
+    exit 1
 fi
 
 seq="check"
-_check_fs $TEST_DEV
+_check_test_fs
 
 for seq in $list
 do
@@ -283,7 +275,7 @@ do
     [ -f $seq.notrun ] || try=`expr $try + 1`
     
     seq="after_$seq"
-    _check_fs $TEST_DEV
+    _check_test_fs
     
 done
 
index 71001a4ba3dcd32067b3f8cddcbeb45a4a6bb576..b5b6255fbb26b06e7de2bc11dc26a757650b2383 100644 (file)
@@ -1,7 +1,7 @@
 ##/bin/sh
 
 #
-# Copyright (c) 2000-2002 Silicon Graphics, Inc.  All Rights Reserved.
+# Copyright (c) 2000-2003 Silicon Graphics, Inc.  All Rights Reserved.
 # 
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of version 2 of the GNU General Public License as
@@ -44,7 +44,9 @@
 # 
 # and optionally:
 # SCRATCH_LOGDEV       - scratch log device for external log testing
-# SCRATCH_RTDEV                - scratch rt dev (only for testing cmds currently)
+# SCRATCH_RTDEV                - scratch rt dev
+# TEST_LOGDEV          - test log device for external log testing
+# TEST_RTDEV           - test rt dev
 # TAPE_DEV             - the tape device for the xfsdump tests
 # RMT_TAPE_DEV         - the remote tape device for the xfsdump tests
 # RMT_IRIXTAPE_DEV     - the IRIX remote tape device for the xfsdump tests
@@ -85,7 +87,7 @@ in
        EMAIL="nathans@larry"
        SCRATCH_MNT=/mnt/xfs0
        SCRATCH_DEV=/dev/sdb5
-       SCRATCH_RTDEV=/dev/sda9
+       #SCRATCH_RTDEV=/dev/sda9
        SCRATCH_LOGDEV=/dev/sda11
        TEST_DIR=/mnt/xfs1
         TEST_DEV=/dev/sda10
index 59d0afbd18ef5c98484c7e8b72421d3e8db0a447..f4075d1445805fcd12f7464d690ee795190aa172 100644 (file)
@@ -240,11 +240,8 @@ _wipe_fs()
 {
     _require_scratch
 
-    mkfs_xfs $SCRATCH_DEV>>$here/$seq.full  ||\
-       _error "mkfs failed"
-      
-    mount -t xfs $SCRATCH_DEV $SCRATCH_MNT >>$here/$seq.full ||\
-       _error "mount failed"
+    _scratch_mkfs_xfs >>$here/$seq.full || _error "mkfs failed"
+    _scratch_mount >>$here/$seq.full || _error "mount failed"
 }
 
 # 
@@ -273,11 +270,11 @@ _cleanup()
     done
 
     if [ $status -ne $NOTRUNSTS ]; then
-       # Sleep added to stop _check_fs from complaining that the
+       # Sleep added to stop _check_scratch_fs from complaining that the
        # scratch_dev is still busy
        sleep 10
 
-       _check_fs $SCRATCH_DEV
+       _check_scratch_fs
     fi
 }
 
@@ -289,10 +286,8 @@ _cleanup()
 _stable_fs()
 {
     _saveddir=`pwd`; cd /
-    umount $SCRATCH_MNT >>$here/$seq.full ||\
-       _error "unmount failed"
-    mount -t xfs $SCRATCH_DEV $SCRATCH_MNT >>$here/$seq.full ||\
-       _error "mount failed"
+    umount $SCRATCH_MNT >>$here/$seq.full || _error "unmount failed"
+    _scratch_mount >>$here/$seq.full || _error "mount failed"
     cd $_saveddir
 }
 
index 822672f7b4cadc9ff6fbb41fe7e69df7f6be5e2a..5d6916133591422f61256980e95826e5cd8948f5 100644 (file)
@@ -97,7 +97,7 @@ _filter_repquota()
 _qmount()
 {
     umount $SCRATCH_DEV >/dev/null 2>&1
-    mount -t xfs $SCRATCH_DEV $SCRATCH_MNT || _fail "qmount failed"
+    _scratch_mount || _fail "qmount failed"
     chmod ugo+rwx $SCRATCH_MNT
     [ -x /usr/sbin/quot ] && quot $SCRATCH_MNT >>$seq.full 2>&1
 }
index f62832122b7644eb25a9c70584be5809320f9993..3d2cd32f031531b43b874372a71153f0560e98ec 100644 (file)
--- a/common.rc
+++ b/common.rc
@@ -1,7 +1,7 @@
 ##/bin/sh
 
 #
-# Copyright (c) 2000-2002 Silicon Graphics, Inc.  All Rights Reserved.
+# Copyright (c) 2000-2003 Silicon Graphics, Inc.  All Rights Reserved.
 # 
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of version 2 of the GNU General Public License as
@@ -45,23 +45,10 @@ umask 022
 # awk
 AWK_PROG=awk
 
-# ps
-PS_HAVE_BSD=false
-PS_ALL_FLAGS=-efw
-
-# host os
-PLATFORM=linux
-
 # extra parameters for fsstress
-FSSTRESS_AVOID=
-
-# env variables for mem checking
-#EF_PROTECT_FREE=1 # efence
-#export EF_PROTECT_FREE
-# Not used because we get weird errors of form:
-# ElectricFence Exiting: mmap() failed: Cannot allocate memory
+FSSTRESS_AVOID="-f resvsp=0 -f unresvsp=0"
 
-export AWK_PROG PS_HAVE_BSD PS_ALL_FLAGS PLATFORM
+export AWK_PROG FSSTRESS_AVOID
 
 # we override mount and mkfs.xfs so we can specify extra options
 
@@ -84,9 +71,76 @@ mount()
     esac
 }
 
-mkfs_xfs()
+_test_mount()
+{
+    TEST_OPTIONS=""
+    [ -z "$TEST_RTDEV" ] || TEST_OPTIONS="$TEST_OPTIONS -ortdev=$TEST_RTDEV"
+    [ -z "$TEST_LOGDEV" ] || TEST_OPTIONS="$TEST_OPTIONS -ologdev=$TEST_LOGDEV"
+    mount -t xfs $TEST_OPTIONS $* $TEST_DEV $TEST_DIR
+}
+
+_scratch_mount_options()
 {
-    /sbin/mkfs.xfs -f $* $MKFS_OPTIONS
+    SCRATCH_OPTIONS=""
+    [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_RTDEV" ] && \
+        SCRATCH_OPTIONS="$SCRATCH_OPTIONS -ortdev=$SCRATCH_RTDEV"
+    [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
+        SCRATCH_OPTIONS="$SCRATCH_OPTIONS -ologdev=$SCRATCH_LOGDEV"
+    echo $SCRATCH_OPTIONS $* $SCRATCH_DEV $SCRATCH_MNT
+}
+
+_scratch_mount()
+{
+    SCRATCH_OPTIONS=""
+    [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_RTDEV" ] && \
+        SCRATCH_OPTIONS="$SCRATCH_OPTIONS -ortdev=$SCRATCH_RTDEV"
+    [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
+        SCRATCH_OPTIONS="$SCRATCH_OPTIONS -ologdev=$SCRATCH_LOGDEV"
+    mount -t xfs $SCRATCH_OPTIONS $* $SCRATCH_DEV $SCRATCH_MNT
+}
+
+_scratch_mkfs_options()
+{
+    SCRATCH_OPTIONS=""
+    [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_RTDEV" ] && \
+        SCRATCH_OPTIONS="$SCRATCH_OPTIONS -rrtdev=$SCRATCH_RTDEV"
+    [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
+        SCRATCH_OPTIONS="$SCRATCH_OPTIONS -llogdev=$SCRATCH_LOGDEV"
+    echo $SCRATCH_OPTIONS $MKFS_OPTIONS $* $SCRATCH_DEV
+}
+
+_scratch_mkfs_xfs()
+{
+    SCRATCH_OPTIONS=""
+    [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_RTDEV" ] && \
+        SCRATCH_OPTIONS="$SCRATCH_OPTIONS -rrtdev=$SCRATCH_RTDEV"
+    [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
+        SCRATCH_OPTIONS="$SCRATCH_OPTIONS -llogdev=$SCRATCH_LOGDEV"
+    /sbin/mkfs.xfs -f $SCRATCH_OPTIONS $MKFS_OPTIONS $* $SCRATCH_DEV
+}
+
+_scratch_xfs_db_options()
+{
+    SCRATCH_OPTIONS=""
+    [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
+        SCRATCH_OPTIONS="-l$SCRATCH_LOGDEV"
+    echo $SCRATCH_OPTIONS $* $SCRATCH_DEV
+}
+
+_scratch_xfs_logprint()
+{
+    SCRATCH_OPTIONS=""
+    [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
+        SCRATCH_OPTIONS="-l$SCRATCH_LOGDEV"
+    /usr/sbin/xfs_logprint $SCRATCH_OPTIONS $* $SCRATCH_DEV
+}
+
+_scratch_xfs_repair()
+{
+    SCRATCH_OPTIONS=""
+    [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
+        SCRATCH_OPTIONS="-l$SCRATCH_LOGDEV"
+    /sbin/xfs_repair $SCRATCH_OPTIONS $* $SCRATCH_DEV
 }
 
 _get_pids_by_name()
@@ -375,10 +429,11 @@ _require_scratch()
 # 
 _require_logdev()
 {
-    if [ -z "$SCRATCH_LOGDEV" -o ! -b "$SCRATCH_LOGDEV" ]
-    then
+    [ -z "$SCRATCH_LOGDEV" -o ! -b "$SCRATCH_LOGDEV" ] && \
         _notrun "This test requires a valid \$SCRATCH_LOGDEV" 
-    fi
+    [ "$USE_EXTERNAL" != yes ] && \
+        _notrun "This test requires USE_EXTERNAL to be enabled"
+
     # ensure its not mounted
     umount $SCRATCH_LOGDEV 2>/dev/null
 }
@@ -470,7 +525,7 @@ _remount()
 
 }
 
-# run xfs_check on a FS. 
+# run xfs_check and friends on a FS. 
 #
 # if the filesystem is mounted, it's either remounted ro before being
 # checked or it's unmounted and then remounted
@@ -478,15 +533,19 @@ _remount()
 
 USE_REMOUNT=0
 
-_check_fs()
+_check_filesystem()
 {
-    if [ $# -ne 1 ]
+    if [ $# -ne 1 -a $# -ne 2 ]
     then
-       echo "Usage: _check_fs device" 1>&2
+       echo "Usage: _check_fs device [logdevice]" 1>&2
        exit 1
     fi
     
     device=$1
+    if [ $# -eq 2 -a "$2" != "" ]; then
+               extra_log_options="-l$2"
+        extra_mount_options="-ologdev=$2"
+    fi
     type=`_fs_type $device`
     ok=1
     
@@ -503,7 +562,7 @@ _check_fs()
         fi
     fi
 
-    xfs_logprint -t $device $extra_log_options 2>&1 \
+    /usr/sbin/xfs_logprint -t $device $extra_log_options 2>&1 \
                 | tee $tmp.fs_check | grep -q "<CLEAN>"
     if [ $? -ne 0 ]
     then
@@ -516,8 +575,8 @@ _check_fs()
         
         ok=0
     fi
-        
-    xfs_check $device 2>&1 | _fix_malloc >$tmp.fs_check 
+
+    /usr/sbin/xfs_check $device 2>&1 | _fix_malloc >$tmp.fs_check 
     if [ -s $tmp.fs_check ]
     then
         echo "_check_fs: filesystem on $device is inconsistent (c) (see $seq.full)"
@@ -530,7 +589,7 @@ _check_fs()
         ok=0
     fi
     
-    if ! xfs_repair -n $device $extra_log_options >$tmp.fs_check 2>&1
+    if ! /sbin/xfs_repair -n $device $extra_log_options >$tmp.fs_check 2>&1
     then
         echo "_check_fs: filesystem on $device is inconsistent (r) (see $seq.full)"
         
@@ -555,7 +614,7 @@ _check_fs()
         # mounted... 
         if [ $USE_REMOUNT -eq 0 ]
         then
-            if ! mount -t xfs $device $mountpoint
+            if ! mount -t xfs $extra_mount_options $device $mountpoint
             then
                 echo "!!! failed to remount $device on $mountpoint"
                 ok=0
@@ -569,6 +628,19 @@ _check_fs()
     return 0    
 }
 
+_check_test_fs()
+{
+    _check_filesystem $TEST_DEV $TEST_LOGDEV
+}
+
+_check_scratch_fs()
+{
+    SCRATCH_LOG=""
+    [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
+        SCRATCH_LOG="$SCRATCH_LOGDEV"
+    _check_filesystem $SCRATCH_DEV $SCRATCH_LOG
+}
+
 ################################################################################
 
 [ -d /usr/bsd ] && PATH=$PATH:/usr/bsd
@@ -589,7 +661,7 @@ then
     if [ -z "`_fs_type $TEST_DEV`" ]
     then
         # $TEST_DEV is not mounted
-        if ! mount -t xfs $TEST_DEV $TEST_DIR
+        if ! _test_mount
         then
             echo "common.rc: could not mount $TEST_DEV on $TEST_DIR"
             exit 1
index 1e9a22a70d7d36689c3f1148d28c215bc03b8c80..0f24a1fa6fa76588a22f67b119086e69250b353f 100644 (file)
@@ -76,6 +76,9 @@ s/(imap claims in-use inode) (\d+)/\1 INO/;
 s/(cleared root inode) (\d+)/\1 INO/;
 s/(resetting inode) (\d+)/\1 INO/;
 s/(disconnected dir inode) (\d+)/\1 INO/;
+# for log
+s/internal log/<TYPEOF> log/g;
+s/external log on \S+/<TYPEOF> log/g;
        print;'
 }
 
@@ -91,10 +94,10 @@ _check_repair()
        value=$1
        structure="$2"
        _zero_position $value "$structure"
-       xfs_repair $SCRATCH_DEV 2>&1 | _filter_repair
+       _scratch_xfs_repair 2>&1 | _filter_repair
        # some basic sanity checks...
-       _check_fs $SCRATCH_DEV
-       mount -t xfs $SCRATCH_DEV $SCRATCH_MNT              #mount
+       _check_scratch_fs
+       _scratch_mount                                      #mount
        dd if=/bin/sh of=$SCRATCH_MNT/sh 2>&1 |_filter_dd   #open,write
        dd if=$SCRATCH_MNT/sh of=/dev/null 2>&1 |_filter_dd #read
        rm -f $SCRATCH_MNT/sh                               #unlink
diff --git a/group b/group
index 1c13b8b04e1de45fe62789723d993b5e8fc716e7..d9140e396e7a34b52e10456784f02076b18c7442 100644 (file)
--- a/group
+++ b/group
@@ -53,6 +53,9 @@ auto          dxm@sgi.com
 # ioctl - tests which use ioctl commands (directly/indirectly)
 ioctl          nathans@sgi.com
 
+# testing large sector support, excluded tests
+sectors                nathans@sgi.com
+
 # test-group association ... one line per test
 #
 001 rw dir auto
@@ -67,7 +70,7 @@ ioctl         nathans@sgi.com
 010 other auto
 011 dir auto
 012 rw auto
-013 other ioctl auto
+013 other ioctl auto sectors
 014 rw auto
 015 other auto
 016 rw auto
diff --git a/soak b/soak
index 7831320ffb514425975b277a40157df78778360b..79bf9795ff5f2ed5facbd3a6eb7e54f13ba388bf 100755 (executable)
--- a/soak
+++ b/soak
@@ -115,11 +115,11 @@ do
     _log "    *** pass $pass (`date`)"
     
     _log "        *** check"
-    _check_fs $SCRATCH_DEV
+    _check_scratch_fs
     
     _log "        *** mounting scratch device"
 
-    if ! mount -t xfs $SCRATCH_DEV $SCRATCH_MNT 2>&1 | _logp
+    if ! _scratch_mount 2>&1 | _logp
     then
         _fail "            !!! failed to mount"
     fi
@@ -131,7 +131,7 @@ do
                         || _fail "            !!! couldn't delete old dir"
 
         _log "        *** check"
-        _check_fs $SCRATCH_DEV
+        _check_scratch_fs
     fi
 
     _log "        *** mkdir"