Make sure we don't run this test with mutually exclusive mkfs options.
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
}
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)"
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
_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
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
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`)"
_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"