QA test updates for external log/rt devices.
authorfsgqa <fsgqa>
Mon, 26 May 2003 06:34:31 +0000 (06:34 +0000)
committerfsgqa <fsgqa>
Mon, 26 May 2003 06:34:31 +0000 (06:34 +0000)
Make sure we don't run this test with mutually exclusive mkfs options.

016
018
044
049
common.config
tools/auto-qa

diff --git a/016 b/016
index 164bae0..705e63b 100755 (executable)
--- a/016
+++ b/016
@@ -80,7 +80,10 @@ _init()
     echo "*** mkfs"
     force_opts="-dsize=50m -lsize=2097152"
     echo mkfs_xfs $force_opts $SCRATCH_DEV >>$seq.full
-    _scratch_mkfs_xfs $force_opts | _filter_mkfs >/dev/null 2>$tmp.mkfs
+    _scratch_mkfs_xfs $force_opts >$tmp.mkfs0 2>&1
+    [ $? -ne 0 ] && \
+        _notrun "Cannot mkfs for this test using MKFS_OPTIONS specified"
+    _filter_mkfs <$tmp.mkfs0 >/dev/null 2>$tmp.mkfs
     source $tmp.mkfs
 }
 
diff --git a/018 b/018
index eebe25c..30f69c4 100755 (executable)
--- a/018
+++ b/018
@@ -118,7 +118,11 @@ touch $seq.out
 umount $SCRATCH_DEV >/dev/null 2>&1
 
 _full "mkfs"
-_scratch_mkfs_xfs -lsize=2000b | _filter_mkfs 2>$tmp.mkfs
+
+_scratch_mkfs_xfs -lsize=2000b >$tmp.mkfs0 2>&1
+[ $? -ne 0 ] && \
+    _notrun "Cannot mkfs for this test using MKFS_OPTIONS specified"
+_filter_mkfs <$tmp.mkfs0 2>$tmp.mkfs
 source $tmp.mkfs
 [ $dbsize -eq 4096 ] \
     || _notrun "Logprint test, tailored to 4K blocks ($dbsize in use)"
diff --git a/044 b/044
index bb4191f..185830e 100755 (executable)
--- a/044
+++ b/044
@@ -128,7 +128,10 @@ echo "*** mkfs"
 
 lversion=1
 lsize=16777216
-_scratch_mkfs_xfs -lsize=$lsize,version=$lversion | _filter_mkfs 2>/dev/null
+_scratch_mkfs_xfs -lsize=$lsize,version=$lversion >$tmp.mkfs0 2>&1
+[ $? -ne 0 ] && \
+    _notrun "Cannot mkfs for this test using MKFS_OPTIONS specified"
+_filter_mkfs <$tmp.mkfs0 2>/dev/null
 _check_mount
 _check_require_logdev
 
diff --git a/049 b/049
index c4f0a5f..298d014 100755 (executable)
--- a/049
+++ b/049
@@ -75,6 +75,8 @@ _log()
 _require_scratch
 _require_loop
 
+[ "$USE_EXTERNAL" = yes ] && _notrun "Test doesn't cope with external devices"
+
 rm -f $seq.full
 
 echo "(dev=$SCRATCH_DEV, mount=$SCRATCH_MNT)" >> $seq.full
index b5b6255..5c4ee3c 100644 (file)
@@ -87,10 +87,10 @@ in
        EMAIL="nathans@larry"
        SCRATCH_MNT=/mnt/xfs0
        SCRATCH_DEV=/dev/sdb5
-       #SCRATCH_RTDEV=/dev/sda9
        SCRATCH_LOGDEV=/dev/sda11
        TEST_DIR=/mnt/xfs1
-        TEST_DEV=/dev/sda10
+       TEST_DEV=/dev/sda10
+       TEST_LOGDEV=/dev/sda9
        TAPE_DEV=/dev/st0
        RMT_TAPE_DEV=bruce:/dev/st0
        RMT_IRIXTAPE_DEV=snort:/dev/tape
index 01b64ba..9e66f4b 100755 (executable)
@@ -207,7 +207,27 @@ _update_workarea()
        cvs -z3 update -d
     fi
 }
-           
+
+_test_mkfs_xfs()
+{
+    TEST_OPTIONS=""
+    [ "$USE_EXTERNAL" = yes -a ! -z "$TEST_RTDEV" ] && \
+        TEST_OPTIONS="$TEST_OPTIONS -rrtdev=$TEST_RTDEV"
+    [ "$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
+}
+
+_test_mount()
+{
+    TEST_OPTIONS=""
+    [ "$USE_EXTERNAL" = yes -a ! -z "$TEST_RTDEV" ] && \
+        TEST_OPTIONS="$TEST_OPTIONS -ortdev=$TEST_RTDEV"
+    [ "$USE_EXTERNAL" = yes -a ! -z "$TEST_LOGDEV" ] && \
+        TEST_OPTIONS="$TEST_OPTIONS -ologdev=$TEST_LOGDEV"
+    _sudo mount -t xfs $TEST_OPTIONS $* $TEST_DEV $TEST_DIR
+}
+
 
 _log "*** linux-xfs QA (`date`)"
 
@@ -461,12 +481,12 @@ do
            
            _log "          *** clean TEST_DEV"
            
-           _sudo mkfs -t xfs -f $MKFS_OPTIONS $TEST_DEV 2>&1 \
+           _test_mkfs_xfs 2>&1 \
                        || _fail "          !!! failed to mkfs TEST_DEV"
            
            _log "          *** mounting TEST_DEV"
            
-           _sudo mount -t xfs $TEST_DEV $TEST_DIR 2>&1 \
+           _test_mount 2>&1 \
                        || _fail "          !!! failed to mount"
                                    
            new_state="run"