tidy mkfs parameterisation, -f option pulled into common.rc.
authorfsgqa <fsgqa>
Mon, 6 May 2002 07:44:22 +0000 (07:44 +0000)
committerfsgqa <fsgqa>
Mon, 6 May 2002 07:44:22 +0000 (07:44 +0000)
29 files changed:
004
009
015
016
017
018
019
019.out
021
029
030
031
032
033
034
041
042
044
045
049
050
052
053
054
062
common.dump
common.rc
tools/README.auto-qa
tools/auto-qa

diff --git a/004 b/004
index c401391e28543558ac357973c6b0d83d577db1cc..fb8299f053e11007be64a8a6f550af27989a03fc 100755 (executable)
--- a/004
+++ b/004
@@ -56,7 +56,7 @@ trap "_cleanup" 0 1 2 3 15
 
 _populate_scratch()
 {
-       mkfs_xfs -f $SCRATCH_DEV >/dev/null 2>&1
+       mkfs_xfs $SCRATCH_DEV >/dev/null 2>&1
        mount -t xfs $SCRATCH_DEV $SCRATCH_MNT
        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 &
diff --git a/009 b/009
index 5b2b1c4445cfb2a20f09629b584cfe0420ee83ab..c6376488ecac5213a62c928589b9b5ba7942884c 100755 (executable)
--- a/009
+++ b/009
@@ -64,7 +64,7 @@ _block_filter()
 _init()
 {
     echo "*** mkfs"
-    if ! mkfs_xfs -f $SCRATCH_DEV >$tmp.out 2>&1
+    if ! mkfs_xfs $SCRATCH_DEV >$tmp.out 2>&1
     then
        cat $tmp.out
         echo "failed to mkfs $SCRATCH_DEV"
diff --git a/015 b/015
index 7749818e8fbaabc0015d9a5bf416f87798c70101..d82bc3a0568c0f78214540b9d616c2247d48c4c1 100755 (executable)
--- a/015
+++ b/015
@@ -76,7 +76,7 @@ _filter_dd()
 # real QA test starts here
 _require_scratch
 
-mkfs_xfs -f -d size=50m $SCRATCH_DEV >/dev/null
+mkfs_xfs -d size=50m $SCRATCH_DEV >/dev/null
 mount -t xfs $SCRATCH_DEV $SCRATCH_MNT
 out=$SCRATCH_MNT/fillup.$$
 rm -f $seq.full
diff --git a/016 b/016
index 400c4cdafd34a4596cf0d387d6ff7c6a904dc02f..d40fbb00d0884e0c2a51384d9c34ec5c28d043e0 100755 (executable)
--- a/016
+++ b/016
@@ -77,9 +77,9 @@ _init()
     echo "*** reset partition"
     $here/src/devzero -b 2048 -n 50 -v 198 $SCRATCH_DEV
     echo "*** mkfs"
-    if ! mkfs_xfs -f -d size=50m -l size=512b $SCRATCH_DEV >$tmp.out 2>&1
+    if ! mkfs_xfs -dsize=50m -lsize=512b $SCRATCH_DEV >$tmp.out 2>&1
     then
-       cat $tmp.out
+        cat $tmp.out
         echo "failed to mkfs $SCRATCH_DEV"
         exit 1
     fi
@@ -93,7 +93,7 @@ _log_traffic()
     out=$SCRATCH_MNT/$$.tmp
     
     echo "   *** mount"
-    if ! mount $SCRATCH_DEV $SCRATCH_MNT -t xfs
+    if ! mount -t xfs $SCRATCH_DEV $SCRATCH_MNT
     then
         echo "failed to mount $SCRATCH_DEV"
         exit 1
diff --git a/017 b/017
index b08bf877eac89a7f46f225d3754bd7b7c4c4a605..c009662463a5fdadb48f67393a7b453f78f4b789 100755 (executable)
--- a/017
+++ b/017
@@ -76,7 +76,7 @@ rm -f $seq.full
 umount $SCRATCH_DEV >/dev/null 2>&1
 echo "*** MKFS ***"                         >>$seq.full
 echo ""                                     >>$seq.full
-mkfs_xfs -f $SCRATCH_DEV                    >>$seq.full 2>&1 \
+mkfs_xfs $SCRATCH_DEV                       >>$seq.full 2>&1 \
     || _fail "mkfs failed"
 mount -t xfs $SCRATCH_DEV $SCRATCH_MNT      >>$seq.full 2>&1 \
     || _fail "mount failed"
diff --git a/018 b/018
index 6cd8668b688f71f121d7a5edcdc86bd1713e04b8..a700d42a1e6e3957f4c81c268ba662adb2a437f9 100755 (executable)
--- a/018
+++ b/018
@@ -122,7 +122,7 @@ rm -f $seq.out $seq.full
 umount $SCRATCH_DEV >/dev/null 2>&1
 
 _full "mkfs"
-mkfs_xfs -f -lsize=2000b $SCRATCH_DEV    >>$seq.full 2>&1 \
+mkfs_xfs -lsize=2000b $SCRATCH_DEV    >>$seq.full 2>&1 \
     || _fail "mkfs failed"
 _full " mount"
 mount -t xfs $SCRATCH_DEV $SCRATCH_MNT      >>$seq.full 2>&1 \
diff --git a/019 b/019
index ae429107d89b45cd6109cf3a550ce74e3e8324c8..6e0848997aaf54f1db058d55ddb9834b2192727f 100755 (executable)
--- a/019
+++ b/019
@@ -73,6 +73,7 @@ _filter_stat()
         /^Change:/d;
         s/Device: *[0-9][0-9]*,[0-9][0-9]*/Device: <DEVICE>/;
         s/Inode: *[0-9][0-9]*/Inode: <INODE>/;
+        s/Size: *[0-9][0-9]* *Filetype: Dir/Size: <DSIZE> Filetype: Dir/;
     ' | tr -s ' '
 }
 
@@ -127,9 +128,9 @@ _verify_fs()
        umount $SCRATCH_DEV >/dev/null 2>&1
 
        _full "mkfs"
-       mkfs_xfs -f $VERSION -p $protofile $SCRATCH_DEV >>$seqfull 2>&1 \
-               || _fail "mkfs failed"
-           
+       mkfs_xfs $VERSION -p $protofile $SCRATCH_DEV >>$seqfull 2>&1 \
+               || _fail "mount failed"
+
        echo "*** check FS"
        _check_fs $SCRATCH_DEV
 
@@ -137,7 +138,7 @@ _verify_fs()
        _full " mount"
        mount -t xfs $SCRATCH_DEV $SCRATCH_MNT >>$seqfull 2>&1 \
                || _fail "mount failed"
-           
+    
        echo "*** verify FS"
        (cd $SCRATCH_MNT ; find . | sort \
                | xargs $here/src/lstat64 | _filter_stat)
diff --git a/019.out b/019.out
index d6397e10c674e4ad9ef2d35bd24222bd8130fc98..02606b7f470659a47a60fc9e661c7a0f4c882a57 100644 (file)
--- a/019.out
+++ b/019.out
@@ -5,7 +5,7 @@ Wrote 2048.00Kb (value 0x2c)
 *** mount FS
 *** verify FS
  File: "."
- Size: 4096 Filetype: Directory
+ Size: <DSIZE> Filetype: Directory
  Mode: (0777/drwxrwxrwx) Uid: (3) Gid: (1)
 Device: <DEVICE> Inode: <INODE> Links: 3 
 
@@ -25,7 +25,7 @@ Device: <DEVICE> Inode: <INODE> Links: 1 Device type: 161,162
 Device: <DEVICE> Inode: <INODE> Links: 1 Device type: 177,178
 
  File: "./directory"
- Size: 4096 Filetype: Directory
+ Size: <DSIZE> Filetype: Directory
  Mode: (0755/drwxr-xr-x) Uid: (3) Gid: (1)
 Device: <DEVICE> Inode: <INODE> Links: 2 
 
@@ -85,7 +85,7 @@ Device: <DEVICE> Inode: <INODE> Links: 1
 *** mount FS
 *** verify FS
  File: "."
- Size: 138 Filetype: Directory
+ Size: <DSIZE> Filetype: Directory
  Mode: (0777/drwxrwxrwx) Uid: (3) Gid: (1)
 Device: <DEVICE> Inode: <INODE> Links: 3 
 
@@ -105,7 +105,7 @@ Device: <DEVICE> Inode: <INODE> Links: 1 Device type: 161,162
 Device: <DEVICE> Inode: <INODE> Links: 1 Device type: 177,178
 
  File: "./directory"
- Size: 4096 Filetype: Directory
+ Size: <DSIZE> Filetype: Directory
  Mode: (0755/drwxr-xr-x) Uid: (3) Gid: (1)
 Device: <DEVICE> Inode: <INODE> Links: 2 
 
diff --git a/021 b/021
index cf9317f868fe96b8cced919689d7a9c795de24a4..657e3c08422adbd5166e0f6ae0c9740ed7ba7867 100755 (executable)
--- a/021
+++ b/021
@@ -81,16 +81,13 @@ _getfattr()
 }
 
 # real QA test starts here
-
 _require_scratch
 
-
-echo "*** mkfs"
-
 rm -f $seq.full
 umount $SCRATCH_DEV >/dev/null 2>&1
 
-mkfs_xfs -f $SCRATCH_DEV >/dev/null \
+echo "*** mkfs"
+mkfs_xfs $SCRATCH_DEV >/dev/null \
     || _fail "mkfs failed"
   
 echo "*** mount FS"
diff --git a/029 b/029
index bb23d56ce254e261d96c537a2db85d7ab0f1945b..4c82999c76e9f6882bf6748d0feeeaf9e665a98f 100755 (executable)
--- a/029
+++ b/029
@@ -55,6 +55,7 @@ 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
@@ -72,11 +73,10 @@ _filter_logprint()
 }
 
 # real QA test starts here
-# 
 _require_scratch
 
 echo
-mkfs_xfs -f $mkfs_args $SCRATCH_DEV | _filter_mkfs 2>/dev/null
+mkfs_xfs $mkfs_args $SCRATCH_DEV | _filter_mkfs 2>/dev/null
 
 echo
 xfs_logprint $logp_args $SCRATCH_DEV | _filter_logprint
diff --git a/030 b/030
index 73c157da8ab629b52817aeb8a0fc56cc7c722d99..06a6d9cd18297dcfdd18c75cc6b51f64bc2ce951 100755 (executable)
--- a/030
+++ b/030
@@ -73,12 +73,14 @@ _check_ag()
 # real QA test starts here
 _require_scratch
 
+DSIZE="-dsize=100m"
+
 # first we need to ensure there are no bogus secondary
 # superblocks between the primary and first secondary
 # superblock (hanging around from earlier tests)...
 # 
-size="-d size=100m"
-mkfs_xfs -f $size $SCRATCH_DEV >/dev/null 2>&1
+
+mkfs_xfs $DSIZE $SCRATCH_DEV >/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"
@@ -100,7 +102,7 @@ src/devzero -v -1 -n "$clear" $SCRATCH_DEV >/dev/null
 
 # now kick off the real repair test...
 # 
-mkfs_xfs -f $size $SCRATCH_DEV | _filter_mkfs 2>$tmp.mkfs
+mkfs_xfs $DSIZE $SCRATCH_DEV | _filter_mkfs 2>$tmp.mkfs
 source $tmp.mkfs
 _check_ag 0
 _check_ag -1
diff --git a/031 b/031
index 342793880d2c6d1057e71f5e8e1efca261ca0107..49b988ae2f47edabf8b193a42978e4aefd824cd1 100755 (executable)
--- a/031
+++ b/031
@@ -98,8 +98,8 @@ EOF
 # 
 _require_scratch
 
-MKFSV1="-f -p $tmp.proto -n version=1 $SCRATCH_DEV"
-MKFSV2="-f -p $tmp.proto -n version=2 $SCRATCH_DEV"
+MKFSV1="-p $tmp.proto -n version=1 $SCRATCH_DEV"
+MKFSV2="-p $tmp.proto -n version=2 $SCRATCH_DEV"
 
 # sanity test - default + one root directory entry
 _create_proto 0
diff --git a/032 b/032
index 7ab621c5ae75fc7301052e4e9690564e9d38db96..e0263fa0a8d019414cce41723bffed44368f104f 100755 (executable)
--- a/032
+++ b/032
@@ -79,7 +79,7 @@ do
 
        # next, ensure we don't overwrite it
        echo "=== Attempting XFS overwrite of $fs..." >>$seq.full
-       mkfs_xfs $SCRATCH_DEV >>$seq.full 2>&1
+       /sbin/mkfs.xfs $SCRATCH_DEV >>$seq.full 2>&1
 
        [ $? -eq 0 ] && echo "Failed - overwrote fs type ${fs}!"
 done
diff --git a/033 b/033
index 42e1ac1389801db27a4c60d9eb011bf6ba551dd0..78314d8fdfa23e3aea899e5473ef8c42cb27d8e9 100755 (executable)
--- a/033
+++ b/033
@@ -75,7 +75,7 @@ _check_root_inos()
 _require_scratch
 
 # devzero blows away 512byte blocks, so make 512byte inodes
-mkfs_xfs -f -i size=512 $SCRATCH_DEV | _filter_mkfs 2>/dev/null
+mkfs_xfs -isize=512 $SCRATCH_DEV | _filter_mkfs 2>/dev/null
 `xfs_db -r -c sb -c p $SCRATCH_DEV | grep 'ino = ' | \
        sed -e 's/ //g' -e 's/^/export /'`
 
diff --git a/034 b/034
index fb70a052c2b5967f88f4ddf80d33a1d582d291bd..1b69b5548e706c6bcdfbe10b0c0cf45357590d53 100755 (executable)
--- a/034
+++ b/034
@@ -67,7 +67,7 @@ rm -f $seq.full
 umount $SCRATCH_DEV >/dev/null 2>&1
 echo "*** MKFS ***"                         >>$seq.full
 echo ""                                     >>$seq.full
-mkfs_xfs -f $SCRATCH_DEV                    >>$seq.full 2>&1 \
+mkfs_xfs $SCRATCH_DEV                    >>$seq.full 2>&1 \
     || _fail "mkfs failed"
 mount -t xfs $SCRATCH_DEV $SCRATCH_MNT      >>$seq.full 2>&1 \
     || _fail "mount failed"
diff --git a/041 b/041
index b48a3d7cbdaecd7828022b2a049f29e244d72c4a..4ade02184422c08e636c45715fdd0bc3b8f7c811 100755 (executable)
--- a/041
+++ b/041
@@ -75,7 +75,7 @@ rm -f $seq.full
 #agsize=16
 agsize=32
 echo -n "Make $agsize megabyte filesystem on SCRATCH_DEV and mount... "
-_do "mkfs_xfs -d size=${agsize}m,agcount=1 -l internal -f $SCRATCH_DEV"
+_do "mkfs_xfs -dsize=${agsize}m,agcount=1 $SCRATCH_DEV"
 _do "mount -t xfs $SCRATCH_DEV $SCRATCH_MNT"
 echo "done"
 
diff --git a/042 b/042
index 5741fdc785fd34d714c8419eea58cd2d1d328555..c13ec061866977a261f72f6ef8ef83f8fd383f70 100755 (executable)
--- a/042
+++ b/042
@@ -105,7 +105,7 @@ 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 -d size=48m,agcount=3 -l internal -f $SCRATCH_DEV"
+_do "mkfs_xfs -dsize=48m,agcount=3 $SCRATCH_DEV"
 _do "$mnt_cmd"
 echo "done"
 
diff --git a/044 b/044
index b0e21364d5ed3dcfa07407605323af56515f8f85..3508bccf6761afa6962657d709cd5d6bdb1c4164 100755 (executable)
--- a/044
+++ b/044
@@ -125,7 +125,7 @@ _require_scratch
 echo -e -n "\n\r*** XFS QA 044 - expect mount failure messages\n\r\n\r" >/dev/console
 
 echo "*** mkfs"
-mkfs_xfs -f -l logdev=$SCRATCH_LOGDEV,size=4096b $SCRATCH_DEV | _filter_mkfs 2>/dev/null
+mkfs_xfs -llogdev=$SCRATCH_LOGDEV,size=4096b $SCRATCH_DEV | _filter_mkfs 2>/dev/null
 _check_mount
 _check_require_logdev
 
diff --git a/045 b/045
index 0c0737c6517951257fae89635bd98c4e8de1ec3f..3073339caa86d53647c435ca51b2dc85dcbdf00f 100755 (executable)
--- a/045
+++ b/045
@@ -65,7 +65,7 @@ _require_scratch
 echo "*** get uuid"
 uuid=`_get_uuid $TEST_DEV`
 echo "*** mkfs"
-if ! mkfs_xfs -f $SCRATCH_DEV >$tmp.out 2>&1
+if ! mkfs_xfs $SCRATCH_DEV >$tmp.out 2>&1
 then
     cat $tmp.out
     echo "!!! failed to mkfs on $SCRATCH_DEV"
diff --git a/049 b/049
index 9510384f21201c5767a1657151812d8fb5a1c9c3..7717d0689d22027df029dac31078bb13ab12eac5 100755 (executable)
--- a/049
+++ b/049
@@ -92,7 +92,7 @@ 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 -d file,name=$SCRATCH_MNT/test.xfs,size=20m >> $seq.full 2>&1 \
+mkfs_xfs -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 ae76e9ae2e9f9312188a6dd2af09a1cee7c94398..e16b7778501fdc3fc054e73a3f2ba56d8300575d 100755 (executable)
--- a/050
+++ b/050
@@ -74,7 +74,7 @@ if [ -z "$MOUNT_OPTIONS" ]; then
 fi
 
 # real QA test starts here
-mkfs_xfs -f $SCRATCH_DEV | _filter_mkfs 2>$tmp.mkfs
+mkfs_xfs $SCRATCH_DEV | _filter_mkfs 2>$tmp.mkfs
 cat $tmp.mkfs >>$seq.full
 
 # keep the blocksize and data size for dd later
diff --git a/052 b/052
index 701e7853d01bf9bf76a32ecfb421973d4e9875db..7678efbc18e60bb21ff5dcbbdffa7e4a2cf8aa24 100755 (executable)
--- a/052
+++ b/052
@@ -71,7 +71,7 @@ if [ -z "$MOUNT_OPTIONS" ]; then
 fi
 
 # real QA test starts here
-mkfs_xfs -f $SCRATCH_DEV | _filter_mkfs 2>$tmp.mkfs
+mkfs_xfs $SCRATCH_DEV | _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 187384f4875455d7895078b32ec8f403afb4a873..56696d4153f2b189541aff6fc23b63f27c928f7a 100755 (executable)
--- a/053
+++ b/053
@@ -62,7 +62,7 @@ test=$SCRATCH_MNT/test
 
 # make filesystem on scratch using the defaults
 _do 'make filesystem on $SCRATCH_DEV' \
-    'mkfs_xfs -f $SCRATCH_DEV'
+    'mkfs_xfs $SCRATCH_DEV'
 _do 'mount filesytem' \
     'mount -t xfs $SCRATCH_DEV $SCRATCH_MNT'
 
diff --git a/054 b/054
index 53d30aa897f42a0300677d6e560d6329d95fdf8a..c28788b8fc65b36637704790c72ac77957803100 100755 (executable)
--- a/054
+++ b/054
@@ -77,7 +77,7 @@ _filter_stat()
 
 _exercise()
 {
-       mkfs_xfs -f $SCRATCH_DEV >/dev/null 2>&1
+       mkfs_xfs $SCRATCH_DEV >/dev/null 2>&1
        _qmount
 
        umask 022
@@ -110,7 +110,7 @@ _exercise()
 }
 
 # real QA test starts here
-mkfs_xfs -f $SCRATCH_DEV >/dev/null 2>&1
+mkfs_xfs $SCRATCH_DEV >/dev/null 2>&1
 MOUNT_OPTIONS="-o usrquota,grpquota"; export MOUNT_OPTIONS
 _qmount
 if src/feature -G $SCRATCH_DEV ; then
diff --git a/062 b/062
index 9dda4e3ac4f50198742b1ac1dcd5015ca9d21a59..9e86035fe8d3ecf3592d145c7dd1717b648ebe75 100755 (executable)
--- a/062
+++ b/062
@@ -92,7 +92,7 @@ _require_scratch
 rm -f $tmp.backup1 $tmp.backup2 $seq.full
 
 # real QA test starts here
-mkfs_xfs -f $SCRATCH_DEV | _filter_mkfs 2>$tmp.mkfs
+mkfs_xfs $SCRATCH_DEV | _filter_mkfs 2>$tmp.mkfs
 mount -t xfs $SCRATCH_DEV $SCRATCH_MNT || _fail "mount failed"
 _create_test_bed
 
index 1eadfa888624250edc3824fd0da40166d804af40..1b95780830134cd252d174b7f2d6f477ae6546d7 100644 (file)
@@ -35,7 +35,7 @@
 #
 
 # --- initializations ---
-rm -f $seq.full
+rm -f $here/$seq.full
 
 if [ -n "$DEBUGDUMP" ]; then
   _dump_debug=-v5
@@ -81,16 +81,8 @@ for dir in /var/xfsdump/inventory /var/lib/xfsdump/inventory; do
     fi
 done
 
-# remove this when xfstests irix/linux port done
-if [ "X$XFS_HOST_OS" = "Xirix" ]
-then # IRIX
-    have_mtvariable=false
-    MKFS_OPTS=""
-else # Linux
-    have_mtvariable=true
-    MKFS_OPTS="-f"
-fi
-
+have_mtvariable=false
+[ `uname` = "Linux" ] && have_mtvariable=true
 
 #
 # do a remote/local mt
@@ -122,7 +114,7 @@ _check_onl()
     _limit=10
     i=0
     while [ $i -lt $_limit ]; do  
-        echo "Checking online..." >>$seq.full
+        echo "Checking online..." >>$here/$seq.full
        if _mt status >$tmp.status 2>&1; then
            break; 
        else
@@ -156,12 +148,12 @@ _check_onl()
 
 _wait_tape()
 {
-    echo "Wait for tape, $dumptape, ..." >>$seq.full
+    echo "Wait for tape, $dumptape, ..." >>$here/$seq.full
 
     i=0
     while [ $i -lt 20 ]; do  
-        echo "Checking status..." >>$seq.full
-       if _mt status 2>&1 | tee -a $seq.full | egrep -i "onl|ready" >/dev/null; then
+        echo "Checking status..." >>$here/$seq.full
+       if _mt status 2>&1 | tee -a $here/$seq.full | egrep -i "onl|ready" >/dev/null; then
            break; 
        else
            sleep 2 
@@ -175,7 +167,7 @@ _wait_tape()
 #
 _rewind()
 {
-    echo "Initiate rewind..." >>$seq.full
+    echo "Initiate rewind..." >>$here/$seq.full
     _wait_tape
     _mt rewind >/dev/null
     _wait_tape
@@ -188,7 +180,7 @@ _rewind()
 #
 _erase_soft()
 {
-    echo "Erasing tape" | tee -a $seq.full
+    echo "Erasing tape" | tee -a $here/$seq.full
     _rewind
     _mt weof 3
     _rewind
@@ -196,7 +188,7 @@ _erase_soft()
 
 _erase_hard()
 {
-    echo "Erasing tape" | tee -a $seq.full
+    echo "Erasing tape" | tee -a $here/$seq.full
     _mt erase
 }
 
@@ -238,8 +230,8 @@ _require_tape()
 
 _error()
 {
-    echo "Error: $*" | tee -a $seq.full
-    echo "(see $seq.full for details)"
+    echo "Error: $*" | tee -a $here/$seq.full
+    echo "(see $here/$seq.full for details)"
     status=1
     exit
 }
@@ -248,10 +240,10 @@ _wipe_fs()
 {
     _require_scratch
 
-    mkfs_xfs $MKFS_OPTS $SCRATCH_DEV>>$seq.full  ||\
+    mkfs_xfs $SCRATCH_DEV>>$here/$seq.full  ||\
        _error "mkfs failed"
       
-    mount -t xfs $SCRATCH_DEV $SCRATCH_MNT >>$seq.full ||\
+    mount -t xfs $SCRATCH_DEV $SCRATCH_MNT >>$here/$seq.full ||\
        _error "mount failed"
 }
 
@@ -297,9 +289,9 @@ _cleanup()
 _stable_fs()
 {
     _saveddir=`pwd`; cd /
-    umount $SCRATCH_MNT >>$seq.full ||\
+    umount $SCRATCH_MNT >>$here/$seq.full ||\
        _error "unmount failed"
-    mount -t xfs $SCRATCH_DEV $SCRATCH_MNT >>$seq.full ||\
+    mount -t xfs $SCRATCH_DEV $SCRATCH_MNT >>$here/$seq.full ||\
        _error "mount failed"
     cd $_saveddir
 }
@@ -330,12 +322,12 @@ _create_dumpdir_stress()
     echo "-----------------------------------------------"
     if ! $here/src/fsstress $_param -s 1 $FSSTRESS_AVOID -n $_count -d $dump_dir >$tmp.out 2>&1
     then
-        echo "    fsstress (count=$_count) returned $? - see $seq.full"
+        echo "    fsstress (count=$_count) returned $? - see $here/$seq.full"
         
-        echo "--------------------------------------"       >>$here/$seq.full
-        echo "output from fsstress:"                        >>$here/$seq.full
-        echo "--------------------------------------"       >>$here/$seq.full
-        cat $tmp.out                                        >>$here/$seq.full
+        echo "--------------------------------------"       >>$here/$here/$seq.full
+        echo "output from fsstress:"                        >>$here/$here/$seq.full
+        echo "--------------------------------------"       >>$here/$here/$seq.full
+        cat $tmp.out                                        >>$here/$here/$seq.full
         status=1
     fi
 
@@ -899,7 +891,7 @@ _do_dump_sub()
     echo "Dumping to tape..."
     opts="$_dump_debug$dump_args -s $dump_sdir -f $dumptape -M $media_label -L $session_label $SCRATCH_MNT"
     echo "xfsdump $opts" | _dir_filter  
-    xfsdump $opts 2>&1 | tee -a $seq.full | _dump_filter
+    xfsdump $opts 2>&1 | tee -a $here/$seq.full | _dump_filter
 }
 
 #
@@ -912,7 +904,7 @@ _do_dump()
     echo "Dumping to tape..."
     opts="$_dump_debug$dump_args -f $dumptape -M $media_label -L $session_label $SCRATCH_MNT"
     echo "xfsdump $opts" | _dir_filter  
-    xfsdump $opts 2>&1 | tee -a $seq.full | _dump_filter
+    xfsdump $opts 2>&1 | tee -a $here/$seq.full | _dump_filter
 }
 
 
@@ -927,7 +919,7 @@ _do_dump_min()
     onemeg=1048576
     opts="$_dump_debug$dump_args -m -b $onemeg -l0 -f $dumptape -M $media_label -L $session_label $SCRATCH_MNT"
     echo "xfsdump $opts" | _dir_filter  
-    xfsdump $opts 2>&1 | tee -a $seq.full | _dump_filter
+    xfsdump $opts 2>&1 | tee -a $here/$seq.full | _dump_filter
 }
 
 
@@ -941,7 +933,7 @@ _do_dump_file()
     echo "Dumping to file..."
     opts="$_dump_debug$dump_args -f $dump_file -M $media_label -L $session_label $SCRATCH_MNT"
     echo "xfsdump $opts" | _dir_filter  
-    xfsdump $opts 2>&1 | tee -a $seq.full | _dump_filter
+    xfsdump $opts 2>&1 | tee -a $here/$seq.full | _dump_filter
 }
 
 #
@@ -963,7 +955,7 @@ _do_dump_multi_file()
     echo "Dumping to files..."
     opts="$_dump_debug$dump_args $multi_args -L $session_label $SCRATCH_MNT"
     echo "xfsdump $opts" | _dir_filter  
-    xfsdump $opts 2>&1 | tee -a $seq.full | _dump_filter
+    xfsdump $opts 2>&1 | tee -a $here/$seq.full | _dump_filter
 }
 
 
@@ -998,7 +990,7 @@ _do_restore()
     echo "Restoring from tape..."
     opts="$_restore_debug -f $dumptape  -L $session_label $restore_dir"
     echo "xfsrestore $opts" | _dir_filter  
-    xfsrestore $opts 2>&1 | tee -a $seq.full | _dump_filter
+    xfsrestore $opts 2>&1 | tee -a $here/$seq.full | _dump_filter
 }
 
 #
@@ -1013,7 +1005,7 @@ _do_restore_min()
     onemeg=1048576
     opts="$_restore_debug -m -b $onemeg -f $dumptape  -L $session_label $restore_dir"
     echo "xfsrestore $opts" | _dir_filter  
-    xfsrestore $opts 2>&1 | tee -a $seq.full | _dump_filter
+    xfsrestore $opts 2>&1 | tee -a $here/$seq.full | _dump_filter
 }
 
 #
@@ -1027,7 +1019,7 @@ _do_restore_file()
     echo "Restoring from file..."
     opts="$_restore_debug -f $dump_file  -L $session_label $restore_dir"
     echo "xfsrestore $opts" | _dir_filter  
-    xfsrestore $opts 2>&1 | tee -a $seq.full | _dump_filter
+    xfsrestore $opts 2>&1 | tee -a $here/$seq.full | _dump_filter
 }
 
 #
@@ -1044,7 +1036,7 @@ _do_restore_file_cum()
     echo "Restoring cumumlative from file..."
     opts="$_restore_debug -f $dump_file -r $restore_dir"
     echo "xfsrestore $opts" | _dir_filter  
-    xfsrestore $opts 2>&1 | tee -a $seq.full | _dump_filter
+    xfsrestore $opts 2>&1 | tee -a $here/$seq.full | _dump_filter
 }
 
 _do_restore_toc()
@@ -1053,7 +1045,7 @@ _do_restore_toc()
     opts="$_restore_debug -f $dump_file -t"
     echo "xfsrestore $opts" | _dir_filter
     cd $SCRATCH_MNT # for IRIX which needs xfs cwd
-    xfsrestore $opts 2>&1 | tee -a $seq.full | _dump_filter_main |\
+    xfsrestore $opts 2>&1 | tee -a $here/$seq.full | _dump_filter_main |\
     _check_quota_file |\
     _check_quota_entries |\
     $AWK_PROG 'NF != 1 { print; next }
@@ -1084,7 +1076,7 @@ _do_restore_multi_file()
     echo "Restoring from file..."
     opts="$_restore_debug $multi_args -L $session_label $restore_dir"
     echo "xfsrestore $opts" | _dir_filter  
-    xfsrestore $opts 2>&1 | tee -a $seq.full | _dump_filter
+    xfsrestore $opts 2>&1 | tee -a $here/$seq.full | _dump_filter
 }
 
 #
@@ -1100,7 +1092,7 @@ _do_dump_restore()
     restore_opts="$_restore_debug - $restore_dir"
     dump_opts="$_dump_debug$dump_args -s $dump_sdir - $SCRATCH_MNT"
     echo "xfsdump $dump_opts | xfsrestore $restore_opts" | _dir_filter  
-    xfsdump $dump_opts 2>$tmp.dump.mlog | xfsrestore $restore_opts 2>&1 | tee -a $seq.full | _dump_filter
+    xfsdump $dump_opts 2>$tmp.dump.mlog | xfsrestore $restore_opts 2>&1 | tee -a $here/$seq.full | _dump_filter
     _dump_filter <$tmp.dump.mlog
 }
 
@@ -1116,8 +1108,8 @@ _ls_compare_sub()
     # verify we got back what we dumped
     #
     echo "Comparing listing of dump directory with restore directory"
-    ls -lR $dump_dir | tee -a $seq.full | _ls_filter >$tmp.dump_dir
-    ls -lR $restore_dir/$dump_sdir | tee -a $seq.full | _ls_filter \
+    ls -lR $dump_dir | tee -a $here/$seq.full | _ls_filter >$tmp.dump_dir
+    ls -lR $restore_dir/$dump_sdir | tee -a $here/$seq.full | _ls_filter \
     | sed -e "s#$restore_sdir\/##" >$tmp.restore_dir
 
     diff -cs $tmp.dump_dir $tmp.restore_dir | sed -e "s#$tmp#TMP#g"
@@ -1139,8 +1131,8 @@ _ls_nodate_compare_sub()
     # verify we got back what we dumped
     #
     echo "Comparing listing of dump directory with restore directory"
-    ls -lR $dump_dir | tee -a $seq.full | _ls_filter | _ls_nodate_filter >$tmp.dump_dir
-    ls -lR $restore_dir/$dump_sdir | tee -a $seq.full | _ls_filter \
+    ls -lR $dump_dir | tee -a $here/$seq.full | _ls_filter | _ls_nodate_filter >$tmp.dump_dir
+    ls -lR $restore_dir/$dump_sdir | tee -a $here/$seq.full | _ls_filter \
     | _ls_nodate_filter | sed -e "s#$restore_sdir\/##" >$tmp.restore_dir
 
     diff -cs $tmp.dump_dir $tmp.restore_dir | sed -e "s#$tmp#TMP#g"
@@ -1201,13 +1193,13 @@ _diff_compare_eas()
     echo "Comparing dump directory with restore directory"
     echo "Looking at the extended attributes (EAs)"
     echo "EAs on dump"
-    _get_eas_on_path $dump_dir | tee $seq.ea1 | _dir_filter
+    _get_eas_on_path $dump_dir | tee $here/$seq.ea1 | _dir_filter
     echo "EAs on restore"
     _get_eas_on_path $restore_dir/$dump_sdir \
     | sed -e "s#$restore_sdir\/##" \
-    | tee $seq.ea2 \
+    | tee $here/$seq.ea2 \
     | _dir_filter
-    diff -s $seq.ea1 $seq.ea2
+    diff -s $here/$seq.ea1 $here/$seq.ea2
 }
 
 
@@ -1226,7 +1218,7 @@ _diff_compare()
 #
 _dump_inventory()
 {
-    xfsdump $_dump_debug -I | tee -a $seq.full | _dump_filter_main
+    xfsdump $_dump_debug -I | tee -a $here/$seq.full | _dump_filter_main
 }
 
 #
@@ -1236,9 +1228,9 @@ _dump_inventory()
 _do_invutil()
 {
     host=`hostname`
-    echo "xfsinvutil $_invutil_debug -M $host:$SCRATCH_MNT \"$middate\" $*" >$seq.full
+    echo "xfsinvutil $_invutil_debug -M $host:$SCRATCH_MNT \"$middate\" $*" >$here/$seq.full
     xfsinvutil $_invutil_debug $* -M $host:$SCRATCH_MNT "$middate" \
-    | tee -a $seq.full | _invutil_filter
+    | tee -a $here/$seq.full | _invutil_filter
 }
 
 #
@@ -1254,7 +1246,7 @@ _check_quota()
     $here/src/feature -U $SCRATCH_DEV && uquota=1
     $here/src/feature -G $SCRATCH_DEV && gquota=1
 
-    $AWK_PROG -v uquota=$uquota -v gquota=$gquota -v full=$seq.full \
+    $AWK_PROG -v uquota=$uquota -v gquota=$gquota -v full=$here/$seq.full \
               -v usermsg="$usermsg" -v groupmsg="$groupmsg" '
        $0 ~ groupmsg {
                        print "Found group quota:", $0 >>full
index c05a942caf93ebebb0ef73024f632afa9a993003..d0cf8e325ad3429f01870bee31e391823cf6a6ad 100644 (file)
--- a/common.rc
+++ b/common.rc
@@ -86,11 +86,9 @@ mount()
 
 mkfs_xfs()
 {
-    /sbin/mkfs.xfs $* $MKFS_OPTIONS
+    /sbin/mkfs.xfs -f $* $MKFS_OPTIONS
 }
 
-#
-
 _get_pids_by_name()
 {
     if [ $# -ne 1 ]
@@ -345,7 +343,6 @@ _fail()
 # 
 _require_scratch()
 {
-
     if [ -z "$SCRATCH_DEV" -o "`_is_block_dev $SCRATCH_DEV`" = "" ]
     then
         _notrun "this test requires a valid \$SCRATCH_DEV"
@@ -365,18 +362,13 @@ _require_scratch()
             echo "\$SCRATCH_DEV is mounted but not on \$SCRATCH_MNT - aborting"
             exit 1
         fi
-        
         # and then unmount it
-    
         if ! umount $SCRATCH_DEV
         then
             echo "failed to unmount $SCRATCH_DEV"
             exit 1
         fi
     fi
-    
-    # should be ok now
-
 }
 
 # this test needs a logdev 
@@ -387,6 +379,8 @@ _require_logdev()
     then
         _notrun "This test requires a valid \$SCRATCH_LOGDEV" 
     fi
+    # ensure its not mounted
+    umount $SCRATCH_LOGDEV 2>/dev/null
 }
 
 # this test requires loopback device support
index 46eb35b3cccf851eb5c2f8b32e0764c260f48883..730d168ea0e418cdd5b4dbd726c217be722302ea 100644 (file)
@@ -26,7 +26,7 @@ ______________________                                      ______________
        - chmod 6755 $HOME/qa/su
        - add the soon to be kernel to /etc/lilo.conf
 
-               image=/boot/vmlinuz-2.4.0-xfs-qa
+               image=/boot/vmlinuz-xfs-qa
                        label=linux-xfs-qa
                        append = "console=ttyS0,38400n8"
                
index 2b3306dfe97eeaf7ef7974bb945256ab4f4456a1..79a00a7c955328ff063978ac2f744f9c9ca5da4d 100755 (executable)
@@ -40,7 +40,8 @@ BOOT="/boot"
 SOAK_PASSES="-1"
 SOAK_STRESS="10000"
 SOAK_PROC="3"
-
+export MKFS_OPTIONS=${MKFS_OPTIONS:=-bsize=4096}
+export MOUNT_OPTIONS=${MOUNT_OPTIONS:=-ologbufs=2}
 
 _log()
 {
@@ -204,8 +205,7 @@ _sudo()
 
 _restart()
 {
-    # erk - why won't this thing reboot reliably??
-    exec $ROOT/su -c "(shutdown -r 2 \"auto-qa rebooting\" ; sleep 10 ; reboot ; sleep 10 ; reboot )&" < /dev/null
+    exec $ROOT/su -c "(shutdown -r 1 \"auto-qa rebooting\" )&" < /dev/null
 }
 
 _update_autoqa_file()
@@ -499,7 +499,7 @@ do
             
             _log "            *** clean TEST_DEV"
             
-            _sudo mkfs -t xfs -f $TEST_DEV 2>&1 \
+            _sudo mkfs -t xfs -f $MKFS_OPTIONS $TEST_DEV 2>&1 \
                         || _fail "            !!! failed to mkfs TEST_DEV"
             
             _log "            *** mounting TEST_DEV"