Modify log/v2-log qa tests to run on IRIX as well as Linux.

Cater for IRIX without unmount record at start of log and for
IRIX' hopeless mount option handling.
This commit is contained in:
Tim Shimmin
2004-06-21 04:53:35 +00:00
parent 81f3c307df
commit e00912e469
19 changed files with 10631 additions and 101 deletions
+20 -11
View File
@@ -67,29 +67,38 @@ _supported_os IRIX Linux
rm -f $seq.full $tmp.* rm -f $seq.full $tmp.*
_require_scratch _require_scratch
# link correct .out file
_link_out_file $seq.op
echo "*** init FS" echo "*** init FS"
umount $SCRATCH_DEV >/dev/null 2>&1 umount $SCRATCH_DEV >/dev/null 2>&1
cat >$tmp.seq.params <<EOF cat >$tmp.seq.params <<EOF
# mkfs-opt mount-opt # mkfs-opt mount-opt
-lversion=1 -ologbsize=32k version=1 logbsize=32k
-lversion=2 -ologbsize=32k version=2 logbsize=32k
-lversion=2 -ologbsize=64k version=2 logbsize=64k
-lversion=2 -ologbsize=128k version=2 logbsize=128k
-lversion=2 -ologbsize=256k version=2 logbsize=256k
EOF EOF
if [ "$HOSTOS" = "IRIX" ]; then
start_blk=0
else
start_blk=2
fi
# do the work for various log params which # do the work for various log params which
# should not effect the data content of the log # should not effect the data content of the log
cat $tmp.seq.params \ cat $tmp.seq.params \
| while read mkfs mnt restofline | while read mkfs mnt
do do
if [ "$mkfs" = "#" ]; then if [ "$mkfs" = "#" ]; then
continue continue
fi fi
export MKFS_OPTIONS=$mkfs export MKFS_OPTIONS="-l $mkfs"
export MOUNT_OPTIONS=$mnt export MOUNT_OPTIONS="-o $mnt"
_mkfs_log _mkfs_log
_create_log _create_log
_check_log _check_log
@@ -97,10 +106,10 @@ do
_print_operation _print_operation
_cmp_op_output $seq.op $filtered _cmp_op_output $seq.op $filtered
_print_transaction_inode 2 _print_transaction_inode $start_blk
_cmp_output $seq.trans_inode $filtered _cmp_output $seq.trans_inode $filtered
_print_transaction_buf 2 _print_transaction_buf $start_blk
_cmp_output $seq.trans_buf $filtered _cmp_output $seq.trans_buf $filtered
done done
+5228
View File
File diff suppressed because it is too large Load Diff
View File
+11 -3
View File
@@ -70,13 +70,21 @@ _require_scratch
echo "*** init FS" echo "*** init FS"
umount $SCRATCH_DEV >/dev/null 2>&1 umount $SCRATCH_DEV >/dev/null 2>&1
# do a simple quota test to ensure DQUOT data is happening # do a simple quota test to ensure DQUOT data is happening
export MKFS_OPTIONS="-lversion=1" export MKFS_OPTIONS="-l version=1"
export MOUNT_OPTIONS="-ousrquota,grpquota" export MOUNT_OPTIONS="-o quota,gquota"
if [ "$HOSTOS" = "IRIX" ]; then
start=0
else
start=2
fi
_mkfs_log _mkfs_log
_create_log _create_log
_check_log _check_log
_print_transaction_inode 2 _print_transaction_inode $start
_cmp_output $seq.ugquota.trans_inode $filtered _cmp_output $seq.ugquota.trans_inode $filtered
# got thru it all so we may have success # got thru it all so we may have success
+1 -1
View File
@@ -1,4 +1,4 @@
QA output created by 081 QA output created by 081
*** init FS *** init FS
*** compare logprint: 081.ugquota.trans_inode with 081.fulldir/trans_inode.mnt-ousrquota,grpquota.mkfs-lversion=1.filtered *** compare logprint: 081.ugquota.trans_inode with 081.fulldir/trans_inode.mnt-oquota,gquota.mkfs-lversion=1.filtered
*** unmount *** unmount
+20 -8
View File
@@ -61,26 +61,32 @@ _cleanup()
trap "_cleanup; exit \$status" 0 1 2 3 15 trap "_cleanup; exit \$status" 0 1 2 3 15
# real QA test starts here # real QA test starts here
_supported_fs xfs
_supported_os IRIX Linux
# prelim # prelim
rm -f $seq.full $tmp.* rm -f $seq.full $tmp.*
_require_scratch _require_scratch
# link correct .out file
_link_out_file $seq.op
echo "*** init FS" echo "*** init FS"
umount $SCRATCH_DEV >/dev/null 2>&1 umount $SCRATCH_DEV >/dev/null 2>&1
cat >$tmp.seq.params <<EOF cat >$tmp.seq.params <<EOF
# mkfs-opt mount-opt start-blk # mkfs-opt mount-opt start-blk
-lversion=2 -ologbsize=32k 2 version=2 logbsize=32k 2
-lversion=2,su=4096 -ologbsize=32k 8 version=2,su=4096 logbsize=32k 8
-lversion=2,su=32768 -ologbsize=32k 64 version=2,su=32768 logbsize=32k 64
# #
# expect following line to fail # expect following line to fail
# #
-lversion=2,su=36864 -ologbsize=32k 72 version=2,su=36864 logbsize=32k 72
# #
# following is not a power of 2 BBs # following is not a power of 2 BBs
# #
-lversion=2,su=5120 -ologbsize=32k 10 version=2,su=5120 logbsize=32k 10
EOF EOF
# Do the work for various log params which # Do the work for various log params which
@@ -96,9 +102,15 @@ for s in sync nosync ; do
if [ "$mkfs" = "#" ]; then if [ "$mkfs" = "#" ]; then
continue continue
fi fi
echo "--- mkfs=$mkfs, mnt=$mnt, start=$start, sync=$s ---" if [ "$HOSTOS" = "IRIX" ]; then
export MOUNT_OPTIONS=$mnt # don't have umount rec at start on IRIX
export MKFS_OPTIONS=$mkfs # so we won't have to skip over it and get to
# another stripe boundary
start=0
fi
echo "--- mkfs=$mkfs, mnt=$mnt, sync=$s ---"
export MKFS_OPTIONS="-l $mkfs"
export MOUNT_OPTIONS="-o $mnt"
if ! _mkfs_log; then if ! _mkfs_log; then
continue continue
fi fi
+5228
View File
File diff suppressed because it is too large Load Diff
View File
+14 -14
View File
@@ -1,40 +1,40 @@
QA output created by 082 QA output created by 082
*** init FS *** init FS
--- mkfs=-lversion=2, mnt=-ologbsize=32k, start=2, sync=sync --- --- mkfs=version=2, mnt=logbsize=32k, sync=sync ---
*** compare logprint: 082.trans_inode with 082.fulldir/trans_inode.mnt-ologbsize=32k.mkfs-lversion=2.sync.filtered *** compare logprint: 082.trans_inode with 082.fulldir/trans_inode.mnt-ologbsize=32k.mkfs-lversion=2.sync.filtered
*** compare logprint: 082.trans_buf with 082.fulldir/trans_buf.mnt-ologbsize=32k.mkfs-lversion=2.sync.filtered *** compare logprint: 082.trans_buf with 082.fulldir/trans_buf.mnt-ologbsize=32k.mkfs-lversion=2.sync.filtered
--- mkfs=-lversion=2,su=4096, mnt=-ologbsize=32k, start=8, sync=sync --- --- mkfs=version=2,su=4096, mnt=logbsize=32k, sync=sync ---
*** compare logprint: 082.trans_inode with 082.fulldir/trans_inode.mnt-ologbsize=32k.mkfs-lversion=2,su=4096.sync.filtered *** compare logprint: 082.trans_inode with 082.fulldir/trans_inode.mnt-ologbsize=32k.mkfs-lversion=2,su=4096.sync.filtered
*** compare logprint: 082.trans_buf with 082.fulldir/trans_buf.mnt-ologbsize=32k.mkfs-lversion=2,su=4096.sync.filtered *** compare logprint: 082.trans_buf with 082.fulldir/trans_buf.mnt-ologbsize=32k.mkfs-lversion=2,su=4096.sync.filtered
--- mkfs=-lversion=2,su=32768, mnt=-ologbsize=32k, start=64, sync=sync --- --- mkfs=version=2,su=32768, mnt=logbsize=32k, sync=sync ---
*** compare logprint: 082.trans_inode with 082.fulldir/trans_inode.mnt-ologbsize=32k.mkfs-lversion=2,su=32768.sync.filtered *** compare logprint: 082.trans_inode with 082.fulldir/trans_inode.mnt-ologbsize=32k.mkfs-lversion=2,su=32768.sync.filtered
*** compare logprint: 082.trans_buf with 082.fulldir/trans_buf.mnt-ologbsize=32k.mkfs-lversion=2,su=32768.sync.filtered *** compare logprint: 082.trans_buf with 082.fulldir/trans_buf.mnt-ologbsize=32k.mkfs-lversion=2,su=32768.sync.filtered
--- mkfs=-lversion=2,su=36864, mnt=-ologbsize=32k, start=72, sync=sync --- --- mkfs=version=2,su=36864, mnt=logbsize=32k, sync=sync ---
*** Cannot mkfs for this test using option specified: -lversion=2,su=36864 -l size=2000b *** *** Cannot mkfs for this test using option specified: -l version=2,su=36864 -l size=2000b ***
--- mkfs=-lversion=2,su=5120, mnt=-ologbsize=32k, start=10, sync=sync --- --- mkfs=version=2,su=5120, mnt=logbsize=32k, sync=sync ---
*** Cannot mkfs for this test using option specified: -lversion=2,su=5120 -l size=2000b *** *** Cannot mkfs for this test using option specified: -l version=2,su=5120 -l size=2000b ***
--- mkfs=-lversion=2, mnt=-ologbsize=32k, start=2, sync=nosync --- --- mkfs=version=2, mnt=logbsize=32k, sync=nosync ---
*** compare logprint: 082.op with 082.fulldir/op.mnt-ologbsize=32k.mkfs-lversion=2.nosync.filtered *** compare logprint: 082.op with 082.fulldir/op.mnt-ologbsize=32k.mkfs-lversion=2.nosync.filtered
*** compare logprint: 082.trans_inode with 082.fulldir/trans_inode.mnt-ologbsize=32k.mkfs-lversion=2.nosync.filtered *** compare logprint: 082.trans_inode with 082.fulldir/trans_inode.mnt-ologbsize=32k.mkfs-lversion=2.nosync.filtered
*** compare logprint: 082.trans_buf with 082.fulldir/trans_buf.mnt-ologbsize=32k.mkfs-lversion=2.nosync.filtered *** compare logprint: 082.trans_buf with 082.fulldir/trans_buf.mnt-ologbsize=32k.mkfs-lversion=2.nosync.filtered
--- mkfs=-lversion=2,su=4096, mnt=-ologbsize=32k, start=8, sync=nosync --- --- mkfs=version=2,su=4096, mnt=logbsize=32k, sync=nosync ---
*** compare logprint: 082.op with 082.fulldir/op.mnt-ologbsize=32k.mkfs-lversion=2,su=4096.nosync.filtered *** compare logprint: 082.op with 082.fulldir/op.mnt-ologbsize=32k.mkfs-lversion=2,su=4096.nosync.filtered
*** compare logprint: 082.trans_inode with 082.fulldir/trans_inode.mnt-ologbsize=32k.mkfs-lversion=2,su=4096.nosync.filtered *** compare logprint: 082.trans_inode with 082.fulldir/trans_inode.mnt-ologbsize=32k.mkfs-lversion=2,su=4096.nosync.filtered
*** compare logprint: 082.trans_buf with 082.fulldir/trans_buf.mnt-ologbsize=32k.mkfs-lversion=2,su=4096.nosync.filtered *** compare logprint: 082.trans_buf with 082.fulldir/trans_buf.mnt-ologbsize=32k.mkfs-lversion=2,su=4096.nosync.filtered
--- mkfs=-lversion=2,su=32768, mnt=-ologbsize=32k, start=64, sync=nosync --- --- mkfs=version=2,su=32768, mnt=logbsize=32k, sync=nosync ---
*** compare logprint: 082.op with 082.fulldir/op.mnt-ologbsize=32k.mkfs-lversion=2,su=32768.nosync.filtered *** compare logprint: 082.op with 082.fulldir/op.mnt-ologbsize=32k.mkfs-lversion=2,su=32768.nosync.filtered
*** compare logprint: 082.trans_inode with 082.fulldir/trans_inode.mnt-ologbsize=32k.mkfs-lversion=2,su=32768.nosync.filtered *** compare logprint: 082.trans_inode with 082.fulldir/trans_inode.mnt-ologbsize=32k.mkfs-lversion=2,su=32768.nosync.filtered
*** compare logprint: 082.trans_buf with 082.fulldir/trans_buf.mnt-ologbsize=32k.mkfs-lversion=2,su=32768.nosync.filtered *** compare logprint: 082.trans_buf with 082.fulldir/trans_buf.mnt-ologbsize=32k.mkfs-lversion=2,su=32768.nosync.filtered
--- mkfs=-lversion=2,su=36864, mnt=-ologbsize=32k, start=72, sync=nosync --- --- mkfs=version=2,su=36864, mnt=logbsize=32k, sync=nosync ---
*** Cannot mkfs for this test using option specified: -lversion=2,su=36864 -l size=2000b *** *** Cannot mkfs for this test using option specified: -l version=2,su=36864 -l size=2000b ***
--- mkfs=-lversion=2,su=5120, mnt=-ologbsize=32k, start=10, sync=nosync --- --- mkfs=version=2,su=5120, mnt=logbsize=32k, sync=nosync ---
*** Cannot mkfs for this test using option specified: -lversion=2,su=5120 -l size=2000b *** *** Cannot mkfs for this test using option specified: -l version=2,su=5120 -l size=2000b ***
*** unmount *** unmount
+10 -9
View File
@@ -65,13 +65,14 @@ umount $SCRATCH_DEV >/dev/null 2>&1
cat >$tmp.seq.params <<EOF cat >$tmp.seq.params <<EOF
# mkfs-opt mount-opt # mkfs-opt mount-opt
-lversion=2 -ologbsize=32k # ------------------------------
-lversion=2,su=4096 -ologbsize=32k version=2 logbsize=32k
-lversion=2,su=32768 -ologbsize=32k version=2,su=4096 logbsize=32k
-lversion=2,su=32768 -ologbsize=64k version=2,su=32768 logbsize=32k
-lversion=2 -ologbsize=64k version=2,su=32768 logbsize=64k
-lversion=2 -ologbsize=128k version=2 logbsize=64k
-lversion=2 -ologbsize=256k version=2 logbsize=128k
version=2 logbsize=256k
EOF EOF
# Do the work for various log params which # Do the work for various log params which
@@ -89,8 +90,8 @@ for s in sync nosync ; do
fi fi
echo "--- mkfs=$mkfs, mnt=$mnt, sync=$s ---" echo "--- mkfs=$mkfs, mnt=$mnt, sync=$s ---"
export MOUNT_OPTIONS=$mnt export MKFS_OPTIONS="-l $mkfs"
export MKFS_OPTIONS=$mkfs export MOUNT_OPTIONS="-o $mnt"
# mkfs the FS # mkfs the FS
_echofull "mkfs" _echofull "mkfs"
+14 -14
View File
@@ -1,6 +1,6 @@
QA output created by 086 QA output created by 086
*** init FS *** init FS
--- mkfs=-lversion=2, mnt=-ologbsize=32k, sync=sync --- --- mkfs=version=2, mnt=logbsize=32k, sync=sync ---
*** mkfs *** *** mkfs ***
@@ -236,7 +236,7 @@ clean log
*** filesystem is checked ok *** *** filesystem is checked ok ***
--- mkfs=-lversion=2,su=4096, mnt=-ologbsize=32k, sync=sync --- --- mkfs=version=2,su=4096, mnt=logbsize=32k, sync=sync ---
*** mkfs *** *** mkfs ***
@@ -472,7 +472,7 @@ clean log
*** filesystem is checked ok *** *** filesystem is checked ok ***
--- mkfs=-lversion=2,su=32768, mnt=-ologbsize=32k, sync=sync --- --- mkfs=version=2,su=32768, mnt=logbsize=32k, sync=sync ---
*** mkfs *** *** mkfs ***
@@ -708,7 +708,7 @@ clean log
*** filesystem is checked ok *** *** filesystem is checked ok ***
--- mkfs=-lversion=2,su=32768, mnt=-ologbsize=64k, sync=sync --- --- mkfs=version=2,su=32768, mnt=logbsize=64k, sync=sync ---
*** mkfs *** *** mkfs ***
@@ -944,7 +944,7 @@ clean log
*** filesystem is checked ok *** *** filesystem is checked ok ***
--- mkfs=-lversion=2, mnt=-ologbsize=64k, sync=sync --- --- mkfs=version=2, mnt=logbsize=64k, sync=sync ---
*** mkfs *** *** mkfs ***
@@ -1180,7 +1180,7 @@ clean log
*** filesystem is checked ok *** *** filesystem is checked ok ***
--- mkfs=-lversion=2, mnt=-ologbsize=128k, sync=sync --- --- mkfs=version=2, mnt=logbsize=128k, sync=sync ---
*** mkfs *** *** mkfs ***
@@ -1416,7 +1416,7 @@ clean log
*** filesystem is checked ok *** *** filesystem is checked ok ***
--- mkfs=-lversion=2, mnt=-ologbsize=256k, sync=sync --- --- mkfs=version=2, mnt=logbsize=256k, sync=sync ---
*** mkfs *** *** mkfs ***
@@ -1652,7 +1652,7 @@ clean log
*** filesystem is checked ok *** *** filesystem is checked ok ***
--- mkfs=-lversion=2, mnt=-ologbsize=32k, sync=nosync --- --- mkfs=version=2, mnt=logbsize=32k, sync=nosync ---
*** mkfs *** *** mkfs ***
@@ -1888,7 +1888,7 @@ clean log
*** filesystem is checked ok *** *** filesystem is checked ok ***
--- mkfs=-lversion=2,su=4096, mnt=-ologbsize=32k, sync=nosync --- --- mkfs=version=2,su=4096, mnt=logbsize=32k, sync=nosync ---
*** mkfs *** *** mkfs ***
@@ -2124,7 +2124,7 @@ clean log
*** filesystem is checked ok *** *** filesystem is checked ok ***
--- mkfs=-lversion=2,su=32768, mnt=-ologbsize=32k, sync=nosync --- --- mkfs=version=2,su=32768, mnt=logbsize=32k, sync=nosync ---
*** mkfs *** *** mkfs ***
@@ -2360,7 +2360,7 @@ clean log
*** filesystem is checked ok *** *** filesystem is checked ok ***
--- mkfs=-lversion=2,su=32768, mnt=-ologbsize=64k, sync=nosync --- --- mkfs=version=2,su=32768, mnt=logbsize=64k, sync=nosync ---
*** mkfs *** *** mkfs ***
@@ -2596,7 +2596,7 @@ clean log
*** filesystem is checked ok *** *** filesystem is checked ok ***
--- mkfs=-lversion=2, mnt=-ologbsize=64k, sync=nosync --- --- mkfs=version=2, mnt=logbsize=64k, sync=nosync ---
*** mkfs *** *** mkfs ***
@@ -2832,7 +2832,7 @@ clean log
*** filesystem is checked ok *** *** filesystem is checked ok ***
--- mkfs=-lversion=2, mnt=-ologbsize=128k, sync=nosync --- --- mkfs=version=2, mnt=logbsize=128k, sync=nosync ---
*** mkfs *** *** mkfs ***
@@ -3068,7 +3068,7 @@ clean log
*** filesystem is checked ok *** *** filesystem is checked ok ***
--- mkfs=-lversion=2, mnt=-ologbsize=256k, sync=nosync --- --- mkfs=version=2, mnt=logbsize=256k, sync=nosync ---
*** mkfs *** *** mkfs ***
+10 -9
View File
@@ -60,7 +60,7 @@ _do_meta()
param="-p 4 -z -f rmdir=10 -f link=10 -f creat=10 -f mkdir=10 \ param="-p 4 -z -f rmdir=10 -f link=10 -f creat=10 -f mkdir=10 \
-f rename=30 -f stat=30 -f unlink=30 -f truncate=20" -f rename=30 -f stat=30 -f unlink=30 -f truncate=20"
_echofull "calling fsstress $param -m8 -n $count" _echofull "calling fsstress $param -m8 -n $count"
if ! time $here/ltp/fsstress $param $FSSTRESS_AVOID -m 8 -n $count -d $out >>$seq.full 2>&1 if ! $here/ltp/fsstress $param $FSSTRESS_AVOID -m 8 -n $count -d $out >>$seq.full 2>&1
then then
_echofull "fsstress failed" _echofull "fsstress failed"
fi fi
@@ -78,12 +78,13 @@ umount $SCRATCH_DEV >/dev/null 2>&1
cat >$tmp.seq.params <<EOF cat >$tmp.seq.params <<EOF
# mkfs-opt mount-opt # mkfs-opt mount-opt
-lversion=2 -ologbsize=32k # ------------------------------
-lversion=2,su=4096 -ologbsize=32k version=2 logbsize=32k
-lversion=2,su=32768 -ologbsize=32k version=2,su=4096 logbsize=32k
-lversion=2 -ologbsize=64k version=2,su=32768 logbsize=32k
-lversion=2 -ologbsize=128k version=2 logbsize=64k
-lversion=2 -ologbsize=256k version=2 logbsize=128k
version=2 logbsize=256k
EOF EOF
cat $tmp.seq.params \ cat $tmp.seq.params \
@@ -94,8 +95,8 @@ do
fi fi
echo "--- mkfs=$mkfs, mnt=$mnt ---" echo "--- mkfs=$mkfs, mnt=$mnt ---"
export MOUNT_OPTIONS=$mnt export MKFS_OPTIONS="-l $mkfs"
export MKFS_OPTIONS=$mkfs export MOUNT_OPTIONS="-o $mnt"
# mkfs the FS # mkfs the FS
_echofull "mkfs" _echofull "mkfs"
+6 -6
View File
@@ -1,6 +1,6 @@
QA output created by 087 QA output created by 087
*** init FS *** init FS
--- mkfs=-lversion=2, mnt=-ologbsize=32k --- --- mkfs=version=2, mnt=logbsize=32k ---
*** mkfs *** *** mkfs ***
@@ -43,7 +43,7 @@ clean log
*** filesystem is checked ok *** *** filesystem is checked ok ***
--- mkfs=-lversion=2,su=4096, mnt=-ologbsize=32k --- --- mkfs=version=2,su=4096, mnt=logbsize=32k ---
*** mkfs *** *** mkfs ***
@@ -86,7 +86,7 @@ clean log
*** filesystem is checked ok *** *** filesystem is checked ok ***
--- mkfs=-lversion=2,su=32768, mnt=-ologbsize=32k --- --- mkfs=version=2,su=32768, mnt=logbsize=32k ---
*** mkfs *** *** mkfs ***
@@ -129,7 +129,7 @@ clean log
*** filesystem is checked ok *** *** filesystem is checked ok ***
--- mkfs=-lversion=2, mnt=-ologbsize=64k --- --- mkfs=version=2, mnt=logbsize=64k ---
*** mkfs *** *** mkfs ***
@@ -172,7 +172,7 @@ clean log
*** filesystem is checked ok *** *** filesystem is checked ok ***
--- mkfs=-lversion=2, mnt=-ologbsize=128k --- --- mkfs=version=2, mnt=logbsize=128k ---
*** mkfs *** *** mkfs ***
@@ -215,7 +215,7 @@ clean log
*** filesystem is checked ok *** *** filesystem is checked ok ***
--- mkfs=-lversion=2, mnt=-ologbsize=256k --- --- mkfs=version=2, mnt=logbsize=256k ---
*** mkfs *** *** mkfs ***
+19 -8
View File
@@ -193,7 +193,19 @@ _filter_logprint()
oper = $0 oper = $0
next next
} }
/^TRANS/ && dummy_rec == 1 {
# start printing again - dummy transaction over
dummy_rec = 0
}
/DUMMY1/ {
# filter out dummy transactions
dummy_rec = 1
next
}
{ {
if (dummy_rec) {
next
}
buf_data = 0 buf_data = 0
if (oper) { # now we can print out oper if (oper) { # now we can print out oper
print oper print oper
@@ -225,8 +237,8 @@ _print_logstate()
_print_operation() _print_operation()
{ {
mkdir $fulldir >/dev/null 2>&1 mkdir $fulldir >/dev/null 2>&1
mntopt=`echo $MOUNT_OPTIONS | sed 's/ /_/g'` mntopt=`echo $MOUNT_OPTIONS | sed 's/ //g'`
mkfsopt=`echo $MKFS_OPTIONS | sed 's/ /_/g'` mkfsopt=`echo $MKFS_OPTIONS | sed 's/ //g'`
raw=$fulldir/op.mnt$mntopt.mkfs$mkfsopt$sync_suffix.raw raw=$fulldir/op.mnt$mntopt.mkfs$mkfsopt$sync_suffix.raw
filtered=$fulldir/op.mnt$mntopt.mkfs$mkfsopt$sync_suffix.filtered filtered=$fulldir/op.mnt$mntopt.mkfs$mkfsopt$sync_suffix.filtered
@@ -249,8 +261,8 @@ _print_transaction_inode()
{ {
_start=$1 _start=$1
mkdir $fulldir >/dev/null 2>&1 mkdir $fulldir >/dev/null 2>&1
mntopt=`echo $MOUNT_OPTIONS | sed 's/ /_/g'` mntopt=`echo $MOUNT_OPTIONS | sed 's/ //g'`
mkfsopt=`echo $MKFS_OPTIONS | sed 's/ /_/g'` mkfsopt=`echo $MKFS_OPTIONS | sed 's/ //g'`
raw=$fulldir/trans_inode.mnt$mntopt.mkfs$mkfsopt$sync_suffix.raw raw=$fulldir/trans_inode.mnt$mntopt.mkfs$mkfsopt$sync_suffix.raw
filtered=$fulldir/trans_inode.mnt$mntopt.mkfs$mkfsopt$sync_suffix.filtered filtered=$fulldir/trans_inode.mnt$mntopt.mkfs$mkfsopt$sync_suffix.filtered
@@ -265,8 +277,8 @@ _print_transaction_buf()
{ {
_start=$1 _start=$1
mkdir $fulldir >/dev/null 2>&1 mkdir $fulldir >/dev/null 2>&1
mntopt=`echo $MOUNT_OPTIONS | sed 's/ /_/g'` mntopt=`echo $MOUNT_OPTIONS | sed 's/ //g'`
mkfsopt=`echo $MKFS_OPTIONS | sed 's/ /_/g'` mkfsopt=`echo $MKFS_OPTIONS | sed 's/ //g'`
raw=$fulldir/trans_buf.mnt$mntopt.mkfs$mkfsopt$sync_suffix.raw raw=$fulldir/trans_buf.mnt$mntopt.mkfs$mkfsopt$sync_suffix.raw
filtered=$fulldir/trans_buf.mnt$mntopt.mkfs$mkfsopt$sync_suffix.filtered filtered=$fulldir/trans_buf.mnt$mntopt.mkfs$mkfsopt$sync_suffix.filtered
@@ -298,7 +310,7 @@ _mkfs_log()
_create_log() _create_log()
{ {
# mount the FS # mount the FS
_full " mount" _full "mount"
_scratch_mount >>$seq.full 2>&1 _scratch_mount >>$seq.full 2>&1
if [ $? -ne 0 ] ; then if [ $? -ne 0 ] ; then
_echofull "mount failed: $MOUNT_OPTIONS" _echofull "mount failed: $MOUNT_OPTIONS"
@@ -348,7 +360,6 @@ _create_log_sync()
_echofull "umount failed" _echofull "umount failed"
return 1 return 1
fi fi
} }
_cmp_output() _cmp_output()
+4
View File
@@ -42,10 +42,14 @@ _require_quota()
src/feature -q $TEST_DEV src/feature -q $TEST_DEV
[ $? -ne 0 ] && _notrun "Installed kernel does not support XFS quota" [ $? -ne 0 ] && _notrun "Installed kernel does not support XFS quota"
if [ "$HOSTOS" = "IRIX" ]; then
[ ! -x /usr/etc/quotaon ] && _notrun "Quota user tools not installed"
else
[ ! -x /sbin/quotaon ] && _notrun "Quota user tools not installed" [ ! -x /sbin/quotaon ] && _notrun "Quota user tools not installed"
/sbin/quotaon -x 2>&1 | grep "option requires an argument -- x" >/dev/null /sbin/quotaon -x 2>&1 | grep "option requires an argument -- x" >/dev/null
[ $? -ne 0 ] && _notrun "Installed quota tools do not support XFS" [ $? -ne 0 ] && _notrun "Installed quota tools do not support XFS"
fi
} }
# create a file as a specific user (uid) # create a file as a specific user (uid)
+5 -5
View File
@@ -681,14 +681,14 @@ _check_xfs_filesystem()
fi fi
$XFS_LOGPRINT_PROG -t $extra_log_options $device 2>&1 \ $XFS_LOGPRINT_PROG -t $extra_log_options $device 2>&1 \
| tee $tmp.fs_check | grep -q "<CLEAN>" | tee $tmp.logprint | grep -q "<CLEAN>"
if [ $? -ne 0 -a "$HOSTOS" = "Linux" ] if [ $? -ne 0 -a "$HOSTOS" = "Linux" ]
then then
echo "_check_fs: filesystem on $device has dirty log (see $seq.full)" echo "_check_fs: filesystem on $device has dirty log (see $seq.full)"
echo "_check_fs: filesystem on $device has dirty log" >>$here/$seq.full echo "_check_fs: filesystem on $device has dirty log" >>$here/$seq.full
echo "*** xfs_logprint -t output ***" >>$here/$seq.full echo "*** xfs_logprint -t output ***" >>$here/$seq.full
cat $tmp.fs_check >>$here/$seq.full cat $tmp.logprint >>$here/$seq.full
echo "*** end xfs_logprint output" >>$here/$seq.full echo "*** end xfs_logprint output" >>$here/$seq.full
ok=0 ok=0
@@ -709,19 +709,19 @@ _check_xfs_filesystem()
fi fi
# repair doesn't scale massively at this stage, optionally skip it for now # repair doesn't scale massively at this stage, optionally skip it for now
[ "$USE_BIG_LOOPFS" = yes ] || \ [ "$USE_BIG_LOOPFS" = yes ] || \
$XFS_REPAIR_PROG -n $extra_log_options $device >$tmp.fs_check 2>&1 $XFS_REPAIR_PROG -n $extra_log_options $device >$tmp.repair 2>&1
if [ $? -ne 0 ] if [ $? -ne 0 ]
then then
echo "_check_fs: filesystem on $device is inconsistent (r) (see $seq.full)" echo "_check_fs: filesystem on $device is inconsistent (r) (see $seq.full)"
echo "_check_fs: filesystem on $device is inconsistent" >>$here/$seq.full echo "_check_fs: filesystem on $device is inconsistent" >>$here/$seq.full
echo "*** xfs_repair -n output ***" >>$here/$seq.full echo "*** xfs_repair -n output ***" >>$here/$seq.full
cat $tmp.fs_check | _fix_malloc >>$here/$seq.full cat $tmp.repair | _fix_malloc >>$here/$seq.full
echo "*** end xfs_repair output" >>$here/$seq.full echo "*** end xfs_repair output" >>$here/$seq.full
ok=0 ok=0
fi fi
rm -f $tmp.fs_check rm -f $tmp.fs_check $tmp.logprint $tmp.repair
if [ $ok -eq 0 ] if [ $ok -eq 0 ]
then then
+3 -2
View File
@@ -36,9 +36,10 @@ include $(TOPDIR)/include/builddefs
TARGETS = dirstress fill fill2 getpagesize holes lstat64 \ TARGETS = dirstress fill fill2 getpagesize holes lstat64 \
nametest permname randholes runas truncfile usemem \ nametest permname randholes runas truncfile usemem \
mmapcat append_reader append_writer dirperf metaperf \ mmapcat append_reader append_writer dirperf metaperf \
devzero feature alloc fault fstest t_access_root devzero feature alloc fault fstest t_access_root \
godown
LINUX_TARGETS = loggen xfsctl resvtest godown bstat t_mtab LINUX_TARGETS = loggen xfsctl resvtest bstat t_mtab
ifeq ($(PKG_PLATFORM),linux) ifeq ($(PKG_PLATFORM),linux)
TARGETS += $(LINUX_TARGETS) TARGETS += $(LINUX_TARGETS)
+18 -3
View File
@@ -156,14 +156,29 @@ hasxfsquota(int type, int q, char *device)
fs_quota_stat_t qstat; fs_quota_stat_t qstat;
int qcmd; int qcmd;
if (q == 0)
return (access("/proc/fs/xfs/xqm", F_OK) < 0);
memset(&qstat, 0, sizeof(fs_quota_stat_t)); memset(&qstat, 0, sizeof(fs_quota_stat_t));
#ifdef QCMD #ifdef QCMD
if (q == 0) {
if (access("/proc/fs/xfs/xqm", F_OK) < 0) {
if (verbose) {
fprintf(stderr, "can't access /proc/fs/xfs/xqm\n");
}
return 1;
}
return 0;
}
qcmd = QCMD(Q_XGETQSTAT, type); qcmd = QCMD(Q_XGETQSTAT, type);
#else #else
if (q == 0) {
if (quotactl(Q_SYNC, device, 0, (caddr_t)&qstat) == ENOPKG) {
if (verbose) {
fprintf(stderr, "Q_SYNC not supported\n");
}
return 1;
}
return 0;
}
qcmd = Q_GETQSTAT; qcmd = Q_GETQSTAT;
#endif #endif
+15 -3
View File
@@ -221,9 +221,21 @@ typedef struct xfs_fsop_bulkreq {
static __inline__ int static __inline__ int
xfsctl(char* path, int fd, int cmd, void* arg) { xfsctl(char* path, int fd, int cmd, void* arg) {
if (cmd >= 0 && cmd < XFS_FSOPS_COUNT) if (cmd >= 0 && cmd < XFS_FSOPS_COUNT) {
return syssgi(SGI_XFS_FSOPERATIONS, fd, cmd, (void*)0, arg); /*
else if (cmd == SGI_FS_BULKSTAT) * We have a problem in that xfsctl takes 1 arg but
* some sgi xfs ops take an input arg and/or an output arg
* So have to special case the ops to decide if xfsctl arg
* is an input or an output argument.
*/
if (cmd == XFS_FS_GOINGDOWN) {
/* in arg */
return syssgi(SGI_XFS_FSOPERATIONS, fd, cmd, arg, 0);
} else {
/* out arg */
return syssgi(SGI_XFS_FSOPERATIONS, fd, cmd, 0, arg);
}
} else if (cmd == SGI_FS_BULKSTAT)
return syssgi(SGI_FS_BULKSTAT, fd, return syssgi(SGI_FS_BULKSTAT, fd,
((xfs_fsop_bulkreq_t*)arg)->lastip, ((xfs_fsop_bulkreq_t*)arg)->lastip,
((xfs_fsop_bulkreq_t*)arg)->icount, ((xfs_fsop_bulkreq_t*)arg)->icount,