From: fsgqa Date: Mon, 6 May 2002 07:44:22 +0000 (+0000) Subject: tidy mkfs parameterisation, -f option pulled into common.rc. X-Git-Tag: v1.1.0~1126 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=f29425d6f7571f3397b20cba0934d9722c0e7a99;p=users%2Fhch%2Fxfstests-dev.git tidy mkfs parameterisation, -f option pulled into common.rc. --- diff --git a/004 b/004 index c401391e2..fb8299f05 100755 --- 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 5b2b1c444..c6376488e 100755 --- 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 7749818e8..d82bc3a05 100755 --- 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 400c4cdaf..d40fbb00d 100755 --- 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 b08bf877e..c00966246 100755 --- 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 6cd8668b6..a700d42a1 100755 --- 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 ae429107d..6e0848997 100755 --- a/019 +++ b/019 @@ -73,6 +73,7 @@ _filter_stat() /^Change:/d; s/Device: *[0-9][0-9]*,[0-9][0-9]*/Device: /; s/Inode: *[0-9][0-9]*/Inode: /; + s/Size: *[0-9][0-9]* *Filetype: Dir/Size: 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 d6397e10c..02606b7f4 100644 --- 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: Filetype: Directory Mode: (0777/drwxrwxrwx) Uid: (3) Gid: (1) Device: Inode: Links: 3 @@ -25,7 +25,7 @@ Device: Inode: Links: 1 Device type: 161,162 Device: Inode: Links: 1 Device type: 177,178 File: "./directory" - Size: 4096 Filetype: Directory + Size: Filetype: Directory Mode: (0755/drwxr-xr-x) Uid: (3) Gid: (1) Device: Inode: Links: 2 @@ -85,7 +85,7 @@ Device: Inode: Links: 1 *** mount FS *** verify FS File: "." - Size: 138 Filetype: Directory + Size: Filetype: Directory Mode: (0777/drwxrwxrwx) Uid: (3) Gid: (1) Device: Inode: Links: 3 @@ -105,7 +105,7 @@ Device: Inode: Links: 1 Device type: 161,162 Device: Inode: Links: 1 Device type: 177,178 File: "./directory" - Size: 4096 Filetype: Directory + Size: Filetype: Directory Mode: (0755/drwxr-xr-x) Uid: (3) Gid: (1) Device: Inode: Links: 2 diff --git a/021 b/021 index cf9317f86..657e3c084 100755 --- 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 bb23d56ce..4c82999c7 100755 --- 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 73c157da8..06a6d9cd1 100755 --- 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 342793880..49b988ae2 100755 --- 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 7ab621c5a..e0263fa0a 100755 --- 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 42e1ac138..78314d8fd 100755 --- 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 fb70a052c..1b69b5548 100755 --- 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 b48a3d7cb..4ade02184 100755 --- 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 5741fdc78..c13ec0618 100755 --- 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 b0e21364d..3508bccf6 100755 --- 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 0c0737c65..3073339ca 100755 --- 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 9510384f2..7717d0689 100755 --- 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 ae76e9ae2..e16b77785 100755 --- 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 701e7853d..7678efbc1 100755 --- 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 187384f48..56696d415 100755 --- 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 53d30aa89..c28788b8f 100755 --- 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 9dda4e3ac..9e86035fe 100755 --- 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 diff --git a/common.dump b/common.dump index 1eadfa888..1b9578083 100644 --- a/common.dump +++ b/common.dump @@ -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 diff --git a/common.rc b/common.rc index c05a942ca..d0cf8e325 100644 --- 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 diff --git a/tools/README.auto-qa b/tools/README.auto-qa index 46eb35b3c..730d168ea 100644 --- a/tools/README.auto-qa +++ b/tools/README.auto-qa @@ -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" diff --git a/tools/auto-qa b/tools/auto-qa index 2b3306dfe..79a00a7c9 100755 --- a/tools/auto-qa +++ b/tools/auto-qa @@ -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"