QA updates to enable simplified large filesystem testing
authorfsgqa <fsgqa>
Fri, 29 Aug 2003 06:04:54 +0000 (06:04 +0000)
committerfsgqa <fsgqa>
Fri, 29 Aug 2003 06:04:54 +0000 (06:04 +0000)
017
030
031
032
033
049
075
common.rc
setup
tools/auto-qa

diff --git a/017 b/017
index 065fe87063d918995e6c6090fb92f97f7721d3ab..0da28fe72141496b51fd24d4a8819efd75579643 100755 (executable)
--- a/017
+++ b/017
@@ -60,6 +60,9 @@ trap "_cleanup; rm -f $tmp.*; exit \$status" 0 1 2 3 15
 
 _require_scratch
 
+checkopts=""
+[ "$USE_BIG_LOOPFS" = yes ] && checkopts=-t
+
 echo "*** init FS"
 
 rm -f $seq.full
@@ -90,8 +93,8 @@ do
         echo ""                             >>$seq.full
         echo "*** XFS_CHECK ***"            >>$seq.full
         echo ""                             >>$seq.full
-        xfs_check $SCRATCH_DEV              >>$seq.full 2>&1 \
-            || _fail "xfs_check failed"
+        xfs_check $checkopts $SCRATCH_DEV   >>$seq.full 2>&1 \
+            || _fail "xfs_check $checkopts failed"
         _scratch_mount -o remount,rw \
             || _fail "remount rw failed"
 done
diff --git a/030 b/030
index f5a928bdf5bc1dd0a7c23a665945549fac470302..f3c0364b0c5ee2f15ef7c367f96e62fff5d52b3d 100755 (executable)
--- a/030
+++ b/030
@@ -70,6 +70,7 @@ _check_ag()
 }
 
 # real QA test starts here
+_require_nobigloopfs
 _require_scratch
 
 DSIZE="-dsize=100m"
diff --git a/031 b/031
index a9ea224342572d352030fd270e14ad6724566a67..0194d15d1bc0d804a32d16224431a2a4b37854c6 100755 (executable)
--- a/031
+++ b/031
@@ -104,6 +104,7 @@ EOF
 
 # real QA test starts here
 # 
+_require_nobigloopfs
 _require_scratch
 
 MKFSV1="-p $tmp.proto -n version=1"
diff --git a/032 b/032
index fcfd4c93092fe4569bb31d5a10f0b6134565bb68..408901f5c127a6c37d2663e31055e86b3c5cf646 100755 (executable)
--- a/032
+++ b/032
@@ -53,6 +53,7 @@ rm -f $seq.full
 
 # real QA test starts here
 # 
+_require_nobigloopfs
 _require_scratch
 
 echo "Silence is golden."
diff --git a/033 b/033
index 77eb1df446020f7e67b29f541122ba9bbe2c514b..5f988d0b452de7a6530c15153219d1b67f5ba3cf 100755 (executable)
--- a/033
+++ b/033
@@ -71,6 +71,7 @@ _check_root_inos()
 }
 
 # real QA test starts here
+_require_nobigloopfs
 _require_scratch
 
 # devzero blows away 512byte blocks, so make 512byte inodes (at least)
diff --git a/049 b/049
index dc6d1a6f8348339e071da1c0eb27c460e3f28f1a..dd7270f43c843270945d7d78d8991119b07ea1c0 100755 (executable)
--- a/049
+++ b/049
@@ -69,12 +69,13 @@ _log()
     echo "--- $*" >> $seq.full
 }
 
-# real QA test starts here
-
+_require_nobigloopfs
+_require_nonexternal
 _require_scratch
 _require_loop
 
-[ "$USE_EXTERNAL" = yes ] && _notrun "Test doesn't cope with external devices"
+
+# real QA test starts here
 
 rm -f $seq.full
 
diff --git a/075 b/075
index 250ce37cb1ffdc4c114147f4e8226ab21826a014..80cf9d5112b23056e3449a7543b054fa9d1d8fde 100755 (executable)
--- a/075
+++ b/075
@@ -112,3 +112,5 @@ _do_test 1 "-d -N 1000 -S 0 -x"
 _do_test 2 "-d -N 25000 -l $size10 -S 0"
 _do_test 3 "-d -N 25000 -l $size10 -S 0 -x"
 
+rm -f $seq.*.fsx{good,log}
+exit 0
index 3d4b81ed979928fea227a790af1e3cf79f6fafeb..0d870fcabbf786654f901e7ca495c21f46f729e0 100644 (file)
--- a/common.rc
+++ b/common.rc
@@ -126,6 +126,10 @@ _scratch_mkfs_xfs()
     [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
         SCRATCH_OPTIONS="$SCRATCH_OPTIONS -llogdev=$SCRATCH_LOGDEV"
     /sbin/mkfs.xfs -f $SCRATCH_OPTIONS $MKFS_OPTIONS $* $SCRATCH_DEV
+    mkfs_status=$?
+    [ "$USE_BIG_LOOPFS" = yes ] && \
+        ./tools/ag-wipe -c $SCRATCH_DEV >/dev/null
+    return $mkfs_status
 }
 
 _scratch_xfs_db_options()
@@ -149,6 +153,7 @@ _scratch_xfs_repair()
     SCRATCH_OPTIONS=""
     [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
         SCRATCH_OPTIONS="-l$SCRATCH_LOGDEV"
+    [ "$USE_BIG_LOOPFS" = yes ] && SCRATCH_OPTIONS=$SCRATCH_OPTIONS" -t"
     /sbin/xfs_repair $SCRATCH_OPTIONS $* $SCRATCH_DEV
 }
 
@@ -460,6 +465,22 @@ _require_loop()
     fi
 }
 
+# this test requires that (large) loopback device files are not in use
+# 
+_require_nobigloopfs()
+{
+    [ "$USE_BIG_LOOPFS" = yes ] && \
+       _notrun "Large filesystem testing in progress, skipped this test"
+}
+
+# this test requires that external log/realtime devices are not in use
+# 
+_require_nonexternal()
+{
+    [ "$USE_EXTERNAL" = yes ] && \
+       _notrun "External device testing in progress, skipped this test"
+}
+
 # check that a FS is mounted as XFS. if so, return mount point
 #
 _xfs_mounted()
@@ -483,34 +504,6 @@ _xfs_mounted()
 }
 
 
-# setup the .out file link, depending on which form of quota is
-# enabled as this often influences how the test output appears.
-# [NB: SCRATCH_DEV must be mounted for this to work]
-# 
-_setup_seq_out()
-{
-    # this lets us phase use of this into the dump/restore tests easier...
-    [ -f $seq.ugquota -a -f $seq.noquota -a $seq.usrquota -a $seq.grpquota ] \
-       || return
-
-    rm -f $seq.out
-    if src/feature -U $SCRATCH_DEV
-    then
-       if src/feature -G $SCRATCH_DEV
-       then
-           ln $seq.ugquota $seq.out
-       else
-           ln $seq.usrquota $seq.out
-       fi
-    elif src/feature -G $SCRATCH_DEV
-    then
-       ln $seq.grpquota $seq.out
-    else
-       ln $seq.noquota $seq.out
-    fi
-}
-
-
 # remount a FS to a new mode (ro or rw)
 #
 _remount()
@@ -557,6 +550,8 @@ _check_filesystem()
     fi
 
     [ "$FSTYP" != xfs ] && return 0
+    testoption=""
+    [ "$USE_BIG_LOOPFS" = yes ] && testoption=-t
 
     type=`_fs_type $device`
     ok=1
@@ -588,7 +583,7 @@ _check_filesystem()
         ok=0
     fi
 
-    /usr/sbin/xfs_check $device 2>&1 | _fix_malloc >$tmp.fs_check 
+    /usr/sbin/xfs_check $testoption $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)"
diff --git a/setup b/setup
index 3f75a383b9d6b91894cf67fe7d3698f2541b111e..d99d0790e2c6d00401a263d48a03d376995504dc 100755 (executable)
--- a/setup
+++ b/setup
@@ -6,13 +6,14 @@ then
     exit 1
 fi
 
-[ "$USE_EXTERNAL" != yes ] && USE_EXTERNAL="no"
-[ "$USE_LBD_PATCH" = yes ] || USE_LBD_PATCH="no"
-[ -x "$FSTYP" ] && FSTYP="xfs"
+[ "$USE_EXTERNAL"   = yes ] || USE_EXTERNAL=no
+[ "$USE_LBD_PATCH"  = yes ] || USE_LBD_PATCH=no
+[ "$USE_BIG_LOOPFS" = yes ] || USE_BIG_LOOPFS=no
+[ -z "$FSTYP" ] && FSTYP="xfs"
 
 cat <<EOF
 TEST: DIR=$TEST_DIR DEV=$TEST_DEV rt=[$TEST_RTDEV] log=[$TEST_LOGDEV]
 TAPE: dev=[$TAPE_DEV] rmt=[$RMT_TAPE_DEV] rmtirix=[$RMT_TAPE_USER@$RMT_IRIXTAPE_DEV]
 SCRATCH: MNT=$SCRATCH_MNT DEV=$SCRATCH_DEV rt=[$SCRATCH_RTDEV] log=[$SCRATCH_LOGDEV]
-VARIABLES: external=$USE_EXTERNAL largeblk=$USE_LBD_PATCH fstyp=$FSTYP
+VARIABLES: external=$USE_EXTERNAL largeblk=$USE_LBD_PATCH fstyp=$FSTYP bigloopfs=$USE_BIG_LOOPFS
 EOF
index 9e66f4b66fafce04a2532a58ef8ecda8000748d7..c4080743d478172383f7c0563c3db553fedc9452 100755 (executable)
@@ -216,6 +216,10 @@ _test_mkfs_xfs()
     [ "$USE_EXTERNAL" = yes -a ! -z "$TEST_LOGDEV" ] && \
         TEST_OPTIONS="$TEST_OPTIONS -llogdev=$TEST_LOGDEV"
     _sudo /sbin/mkfs.xfs -f $TEST_OPTIONS $MKFS_OPTIONS $* $TEST_DEV
+    mkfs_status=$?
+    [ "$USE_BIG_LOOPFS" = yes ] && \
+        _sudo $QADIR/tools/ag-wipe -c $TEST_DEV >/dev/null
+    return $mkfs_status
 }
 
 _test_mount()