_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 &
_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"
# 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
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
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
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"
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 \
/^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 ' '
}
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
_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)
*** 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
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
*** 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
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
}
# 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"
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
}
# 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
# 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"
# 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
#
_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
# 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
_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 /'`
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"
#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"
_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"
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
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"
|| _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"
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
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
# 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'
_exercise()
{
- mkfs_xfs -f $SCRATCH_DEV >/dev/null 2>&1
+ mkfs_xfs $SCRATCH_DEV >/dev/null 2>&1
_qmount
umask 022
}
# 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
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
#
# --- initializations ---
-rm -f $seq.full
+rm -f $here/$seq.full
if [ -n "$DEBUGDUMP" ]; then
_dump_debug=-v5
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
_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
_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
#
_rewind()
{
- echo "Initiate rewind..." >>$seq.full
+ echo "Initiate rewind..." >>$here/$seq.full
_wait_tape
_mt rewind >/dev/null
_wait_tape
#
_erase_soft()
{
- echo "Erasing tape" | tee -a $seq.full
+ echo "Erasing tape" | tee -a $here/$seq.full
_rewind
_mt weof 3
_rewind
_erase_hard()
{
- echo "Erasing tape" | tee -a $seq.full
+ echo "Erasing tape" | tee -a $here/$seq.full
_mt erase
}
_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
}
{
_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"
}
_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
}
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
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
}
#
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
}
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
}
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
}
#
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
}
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
}
#
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
}
#
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
}
#
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()
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 }
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
}
#
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
}
# 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"
# 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"
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
}
#
_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
}
#
_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
}
#
$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
mkfs_xfs()
{
- /sbin/mkfs.xfs $* $MKFS_OPTIONS
+ /sbin/mkfs.xfs -f $* $MKFS_OPTIONS
}
-#
-
_get_pids_by_name()
{
if [ $# -ne 1 ]
#
_require_scratch()
{
-
if [ -z "$SCRATCH_DEV" -o "`_is_block_dev $SCRATCH_DEV`" = "" ]
then
_notrun "this test requires a valid \$SCRATCH_DEV"
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
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
- 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"
SOAK_PASSES="-1"
SOAK_STRESS="10000"
SOAK_PROC="3"
-
+export MKFS_OPTIONS=${MKFS_OPTIONS:=-bsize=4096}
+export MOUNT_OPTIONS=${MOUNT_OPTIONS:=-ologbufs=2}
_log()
{
_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()
_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"