From: ptools Date: Fri, 13 Feb 2004 04:31:25 +0000 (+0000) Subject: Try to simplify log QA with mnt and mkfs options. X-Git-Tag: v1.1.0~868 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=26b87fd5f5e927c7ebbcc3f839a0c2c507902380;p=xfstests-dev.git Try to simplify log QA with mnt and mkfs options. Add new test 086 for log replay with v2 logs. Need to write more tests with varying metadata ops. simplify --- diff --git a/018 b/018 index cfd997d5..e89aede1 100755 --- a/018 +++ b/018 @@ -64,7 +64,6 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # prelim rm -f $seq.full $tmp.* _require_scratch -_clear_opts echo "*** init FS" umount $SCRATCH_DEV >/dev/null 2>&1 @@ -82,25 +81,26 @@ EOF cat $tmp.seq.params \ | while read mkfs mnt restofline do - if [ "$mkfs" != "#" ]; then - _mkfs_log $mkfs - _create_log $mnt - _check_log + if [ "$mkfs" = "#" ]; then + continue + fi + export MKFS_OPTIONS=$mkfs + export MOUNT_OPTIONS=$mnt + _mkfs_log + _create_log + _check_log - _print_operation - _cmp_op_output $seq.op $filtered + _print_operation + _cmp_op_output $seq.op $filtered - _print_transaction_inode 2 - _cmp_output $seq.trans_inode $filtered + _print_transaction_inode 2 + _cmp_output $seq.trans_inode $filtered - _print_transaction_buf 2 - _cmp_output $seq.trans_buf $filtered - fi + _print_transaction_buf 2 + _cmp_output $seq.trans_buf $filtered done # got thru it all so we may have success -if [ ! -e $tmp.error ]; then - status=0 -fi +status=0 exit diff --git a/018.out b/018.out index 3f80faf8..5867504e 100644 --- a/018.out +++ b/018.out @@ -1,47 +1,17 @@ QA output created by 018 *** init FS -meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks -data = bsize=XXX blocks=XXX, imaxpct=PCT - = sunit=XXX swidth=XXX, unwritten=X -naming =VERN bsize=XXX -log =LDEV bsize=XXX blocks=XXX -realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX *** compare logprint: 018.op with 018.fulldir/op.mnt-ologbsize=32k.mkfs-lversion=1.filtered *** compare logprint: 018.trans_inode with 018.fulldir/trans_inode.mnt-ologbsize=32k.mkfs-lversion=1.filtered *** compare logprint: 018.trans_buf with 018.fulldir/trans_buf.mnt-ologbsize=32k.mkfs-lversion=1.filtered -meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks -data = bsize=XXX blocks=XXX, imaxpct=PCT - = sunit=XXX swidth=XXX, unwritten=X -naming =VERN bsize=XXX -log =LDEV bsize=XXX blocks=XXX -realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX *** compare logprint: 018.op with 018.fulldir/op.mnt-ologbsize=32k.mkfs-lversion=2.filtered *** compare logprint: 018.trans_inode with 018.fulldir/trans_inode.mnt-ologbsize=32k.mkfs-lversion=2.filtered *** compare logprint: 018.trans_buf with 018.fulldir/trans_buf.mnt-ologbsize=32k.mkfs-lversion=2.filtered -meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks -data = bsize=XXX blocks=XXX, imaxpct=PCT - = sunit=XXX swidth=XXX, unwritten=X -naming =VERN bsize=XXX -log =LDEV bsize=XXX blocks=XXX -realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX *** compare logprint: 018.op with 018.fulldir/op.mnt-ologbsize=64k.mkfs-lversion=2.filtered *** compare logprint: 018.trans_inode with 018.fulldir/trans_inode.mnt-ologbsize=64k.mkfs-lversion=2.filtered *** compare logprint: 018.trans_buf with 018.fulldir/trans_buf.mnt-ologbsize=64k.mkfs-lversion=2.filtered -meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks -data = bsize=XXX blocks=XXX, imaxpct=PCT - = sunit=XXX swidth=XXX, unwritten=X -naming =VERN bsize=XXX -log =LDEV bsize=XXX blocks=XXX -realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX *** compare logprint: 018.op with 018.fulldir/op.mnt-ologbsize=128k.mkfs-lversion=2.filtered *** compare logprint: 018.trans_inode with 018.fulldir/trans_inode.mnt-ologbsize=128k.mkfs-lversion=2.filtered *** compare logprint: 018.trans_buf with 018.fulldir/trans_buf.mnt-ologbsize=128k.mkfs-lversion=2.filtered -meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks -data = bsize=XXX blocks=XXX, imaxpct=PCT - = sunit=XXX swidth=XXX, unwritten=X -naming =VERN bsize=XXX -log =LDEV bsize=XXX blocks=XXX -realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX *** compare logprint: 018.op with 018.fulldir/op.mnt-ologbsize=256k.mkfs-lversion=2.filtered *** compare logprint: 018.trans_inode with 018.fulldir/trans_inode.mnt-ologbsize=256k.mkfs-lversion=2.filtered *** compare logprint: 018.trans_buf with 018.fulldir/trans_buf.mnt-ologbsize=256k.mkfs-lversion=2.filtered diff --git a/034 b/034 index 1b06d3f1..325c19de 100755 --- a/034 +++ b/034 @@ -81,7 +81,7 @@ then exit fi -if ! src/xfsctl $SCRATCH_MNT $SCRATCH_MNT/fish >/dev/null 2>&1 +if ! src/xfsctl $SCRATCH_MNT $SCRATCH_MNT/fish >>$seq.full 2>&1 then echo "!!! failed to run xfsctl test program" exit @@ -98,6 +98,5 @@ _check_scratch_fs echo "*** done" # happy exit -rm -f $seq.full status=0 exit 0 diff --git a/081 b/081 index 2b25c559..3179619f 100755 --- a/081 +++ b/081 @@ -64,22 +64,18 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # prelim rm -f $seq.full $tmp.* _require_scratch -_clear_opts echo "*** init FS" umount $SCRATCH_DEV >/dev/null 2>&1 # do a simple quota test to ensure DQUOT data is happening -mkfs="-lversion=1" -mnt="-ousrquota,grpquota" -_mkfs_log $mkfs -_create_log $mnt +export MKFS_OPTIONS="-lversion=1" +export MOUNT_OPTIONS="-ousrquota,grpquota" +_mkfs_log +_create_log _check_log _print_transaction_inode 2 _cmp_output $seq.ugquota.trans_inode $filtered # got thru it all so we may have success -if [ ! -e $tmp.error ]; then - status=0 -fi - +status=0 exit diff --git a/081.out b/081.out index 99266bc1..9f5126eb 100644 --- a/081.out +++ b/081.out @@ -1,10 +1,4 @@ QA output created by 081 *** init FS -meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks -data = bsize=XXX blocks=XXX, imaxpct=PCT - = sunit=XXX swidth=XXX, unwritten=X -naming =VERN bsize=XXX -log =LDEV bsize=XXX blocks=XXX -realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX *** compare logprint: 081.ugquota.trans_inode with 081.fulldir/trans_inode.mnt-ousrquota,grpquota.mkfs-lversion=1.filtered *** unmount diff --git a/082 b/082 index d44eccba..11707e4f 100755 --- a/082 +++ b/082 @@ -64,7 +64,6 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 # prelim rm -f $seq.full $tmp.* _require_scratch -_clear_opts echo "*** init FS" umount $SCRATCH_DEV >/dev/null 2>&1 @@ -93,41 +92,45 @@ for s in sync nosync ; do cat $tmp.seq.params \ | while read mkfs mnt start restofline do - if [ "$mkfs" != "#" ]; then - echo "--- mkfs=$mkfs, mnt=$mnt, start=$start, sync=$s ---" - _mkfs_log $mkfs - if [ $s = "sync" ]; then - _create_log_sync $mnt - else - _create_log $mnt - fi - _check_log + if [ "$mkfs" = "#" ]; then + continue + fi + echo "--- mkfs=$mkfs, mnt=$mnt, start=$start, sync=$s ---" + export MOUNT_OPTIONS=$mnt + export MKFS_OPTIONS=$mkfs + if ! _mkfs_log; then + continue + fi + if [ $s = "sync" ]; then + _create_log_sync + else + _create_log + fi + if [ $? -ne 0 ]; then + continue + fi + _check_log - sync_suffix=".$s" + sync_suffix=".$s" - if [ $s = "sync" ]; then - # if sync then we have chance of DATA FORK EXTENTS items - # not hanging around very long due to inode syncing to disk - # (see comment in xfs_iflush_int()) - # and this is to hard to reconcile in the op output - : - else - _print_operation - _cmp_op_output $seq.op $filtered - fi + if [ $s = "sync" ]; then + # if sync then we have chance of DATA FORK EXTENTS items + # not hanging around very long due to inode syncing to disk + # (see comment in xfs_iflush_int()) + # and this is to hard to reconcile in the op output + : + else + _print_operation + _cmp_op_output $seq.op $filtered + fi - _print_transaction_inode $start - _cmp_output $seq.trans_inode $filtered + _print_transaction_inode $start + _cmp_output $seq.trans_inode $filtered - _print_transaction_buf $start - _cmp_output $seq.trans_buf $filtered - fi + _print_transaction_buf $start + _cmp_output $seq.trans_buf $filtered done done -# got thru it all so we may have success -if [ ! -e $tmp.error ]; then - status=0 -fi - +status=0 exit diff --git a/082.out b/082.out index 9d496b10..7bd04027 100644 --- a/082.out +++ b/082.out @@ -1,78 +1,40 @@ QA output created by 082 *** init FS --- mkfs=-lversion=2, mnt=-ologbsize=32k, start=2, sync=sync --- -meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks -data = bsize=XXX blocks=XXX, imaxpct=PCT - = sunit=XXX swidth=XXX, unwritten=X -naming =VERN bsize=XXX -log =LDEV bsize=XXX blocks=XXX -realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX *** 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 --- mkfs=-lversion=2,su=4096, mnt=-ologbsize=32k, start=8, sync=sync --- -meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks -data = bsize=XXX blocks=XXX, imaxpct=PCT - = sunit=XXX swidth=XXX, unwritten=X -naming =VERN bsize=XXX -log =LDEV bsize=XXX blocks=XXX -realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX *** 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 --- mkfs=-lversion=2,su=32768, mnt=-ologbsize=32k, start=64, sync=sync --- -meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks -data = bsize=XXX blocks=XXX, imaxpct=PCT - = sunit=XXX swidth=XXX, unwritten=X -naming =VERN bsize=XXX -log =LDEV bsize=XXX blocks=XXX -realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX *** 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 --- mkfs=-lversion=2,su=36864, mnt=-ologbsize=32k, start=72, sync=sync --- -meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks -data = bsize=XXX blocks=XXX, imaxpct=PCT - = sunit=XXX swidth=XXX, unwritten=X -naming =VERN bsize=XXX -log =LDEV bsize=XXX blocks=XXX -realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX -mount failed: -ologbsize=32k -(see 082.full for details) + +*** mount failed: -ologbsize=32k *** + +--- mkfs=-lversion=2,su=5120, mnt=-ologbsize=32k, start=10, sync=sync --- + +*** Cannot mkfs for this test using option specified: -lversion=2,su=5120 -lsize=2000b *** + --- mkfs=-lversion=2, mnt=-ologbsize=32k, start=2, sync=nosync --- -meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks -data = bsize=XXX blocks=XXX, imaxpct=PCT - = sunit=XXX swidth=XXX, unwritten=X -naming =VERN bsize=XXX -log =LDEV bsize=XXX blocks=XXX -realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX *** 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_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 --- -meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks -data = bsize=XXX blocks=XXX, imaxpct=PCT - = sunit=XXX swidth=XXX, unwritten=X -naming =VERN bsize=XXX -log =LDEV bsize=XXX blocks=XXX -realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX *** 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_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 --- -meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks -data = bsize=XXX blocks=XXX, imaxpct=PCT - = sunit=XXX swidth=XXX, unwritten=X -naming =VERN bsize=XXX -log =LDEV bsize=XXX blocks=XXX -realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX *** 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_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 --- -meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks -data = bsize=XXX blocks=XXX, imaxpct=PCT - = sunit=XXX swidth=XXX, unwritten=X -naming =VERN bsize=XXX -log =LDEV bsize=XXX blocks=XXX -realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX -mount failed: -ologbsize=32k -(see 082.full for details) + +*** mount failed: -ologbsize=32k *** + +--- mkfs=-lversion=2,su=5120, mnt=-ologbsize=32k, start=10, sync=nosync --- + +*** Cannot mkfs for this test using option specified: -lversion=2,su=5120 -lsize=2000b *** + *** unmount diff --git a/086 b/086 new file mode 100755 index 00000000..2dcb3397 --- /dev/null +++ b/086 @@ -0,0 +1,162 @@ +#! /bin/sh +# XFS QA Test No. 086 +# +# To test log replay with version 2 logs +# Initially keep this simple with just creates. +# In another qa test we can do more e.g. use fsstress. +# +#----------------------------------------------------------------------- +# Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of version 2 of the GNU General Public License as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it would be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# +# Further, this software is distributed without any warranty that it is +# free of the rightful claim of any third person regarding infringement +# or the like. Any license provided herein, whether implied or +# otherwise, applies only to this software file. Patent licenses, if +# any, provided herein do not apply to combinations of this program with +# other software, or any other product whatsoever. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write the Free Software Foundation, Inc., 59 +# Temple Place - Suite 330, Boston MA 02111-1307, USA. +# +# Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, +# Mountain View, CA 94043, or: +# +# http://www.sgi.com +# +# For further information regarding this notice, see: +# +# http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ +#----------------------------------------------------------------------- +# +# creator +owner=root@icy.melbourne.sgi.com + +seq=`basename $0` +echo "QA output created by $seq" + +here=`pwd` +tmp=/tmp/$$ +status=1 # failure is the default! +trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15 + +# get standard environment, filters and checks +. ./common.rc +. ./common.filter +. ./common.log + +# real QA test starts here +rm -f $seq.full $tmp.* +_require_scratch + +echo "*** init FS" +umount $SCRATCH_DEV >/dev/null 2>&1 + +cat >$tmp.seq.params <>$seq.full 2>&1; then + _echofull "mount failed: $MOUNT_OPTIONS" + continue + fi + + # create the metadata + if [ $s = "sync" ]; then + # generate some log traffic - but not too much + # add some syncs to get the log flushed to disk + for file in $SCRATCH_MNT/{0,1,2,3,4,5,6,7,8,9}{0,1,2,3,4,5,6,7,8,9}; do + touch $file + sync + done + else + # generate some log traffic - but not too much - life gets a little + # more complicated if the log wraps around. This traffic is + # pretty much arbitary, but could probably be made better than this. + touch $SCRATCH_MNT/{0,1,2,3,4,5,6,7,8,9}{0,1,2,3,4,5,6,7,8,9} + fi + + # check before on what FS should look like + _echofull "ls $SCRATCH_MNT" + ls $SCRATCH_MNT + + _echofull "godown" + src/godown -v -f $SCRATCH_MNT >> $seq.full + + _echofull "unmount" + umount $SCRATCH_DEV >>$seq.full 2>&1 \ + || _fail "umount failed" + + _echofull "logprint after going down..." + _print_logstate + + _echofull "mount with replay" + _scratch_mount >>$seq.full 2>&1 \ + || _fail "mount failed: $MOUNT_OPTIONS" + + # check on what FS looks like after log recovery + _echofull "ls $SCRATCH_MNT" + ls $SCRATCH_MNT + + _echofull "unmount" + umount $SCRATCH_MNT + + _echofull "logprint after mount and replay..." + _print_logstate + + if _check_scratch_fs; then + _echofull "filesystem is checked ok" + else + _echofull "filesystem is NOT ok" + fi + done +done + +status=0 +exit diff --git a/086.out b/086.out new file mode 100644 index 00000000..6a2796de --- /dev/null +++ b/086.out @@ -0,0 +1,1458 @@ +QA output created by 086 +*** init FS +--- mkfs=-lversion=2, mnt=-ologbsize=32k, sync=sync --- + +*** mkfs *** + + +*** mount *** + + +*** ls /mnt/scratch *** + +00 +01 +02 +03 +04 +05 +06 +07 +08 +09 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 + +*** godown *** + + +*** unmount *** + + +*** logprint after going down... *** + +dirty log + +*** mount with replay *** + + +*** ls /mnt/scratch *** + +00 +01 +02 +03 +04 +05 +06 +07 +08 +09 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 + +*** unmount *** + + +*** logprint after mount and replay... *** + +clean log + +*** filesystem is checked ok *** + +--- mkfs=-lversion=2,su=4096, mnt=-ologbsize=32k, sync=sync --- + +*** mkfs *** + + +*** mount *** + + +*** ls /mnt/scratch *** + +00 +01 +02 +03 +04 +05 +06 +07 +08 +09 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 + +*** godown *** + + +*** unmount *** + + +*** logprint after going down... *** + +dirty log + +*** mount with replay *** + + +*** ls /mnt/scratch *** + +00 +01 +02 +03 +04 +05 +06 +07 +08 +09 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 + +*** unmount *** + + +*** logprint after mount and replay... *** + +clean log + +*** filesystem is checked ok *** + +--- mkfs=-lversion=2,su=32768, mnt=-ologbsize=32k, sync=sync --- + +*** mkfs *** + + +*** mount *** + + +*** ls /mnt/scratch *** + +00 +01 +02 +03 +04 +05 +06 +07 +08 +09 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 + +*** godown *** + + +*** unmount *** + + +*** logprint after going down... *** + +dirty log + +*** mount with replay *** + + +*** ls /mnt/scratch *** + +00 +01 +02 +03 +04 +05 +06 +07 +08 +09 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 + +*** unmount *** + + +*** logprint after mount and replay... *** + +clean log + +*** filesystem is checked ok *** + +--- mkfs=-lversion=2,su=36864, mnt=-ologbsize=32k, sync=sync --- + +*** mkfs *** + + +*** mount *** + + +*** mount failed: -ologbsize=32k *** + +--- mkfs=-lversion=2,su=5120, mnt=-ologbsize=32k, sync=sync --- + +*** mkfs *** + + +*** Cannot mkfs for this test using option specified: -lversion=2,su=5120 -lsize=2000b *** + + +*** mkfs failed: -lversion=2,su=5120 *** + +--- mkfs=-lversion=2, mnt=-ologbsize=32k, sync=nosync --- + +*** mkfs *** + + +*** mount *** + + +*** ls /mnt/scratch *** + +00 +01 +02 +03 +04 +05 +06 +07 +08 +09 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 + +*** godown *** + + +*** unmount *** + + +*** logprint after going down... *** + +dirty log + +*** mount with replay *** + + +*** ls /mnt/scratch *** + +00 +01 +02 +03 +04 +05 +06 +07 +08 +09 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 + +*** unmount *** + + +*** logprint after mount and replay... *** + +clean log + +*** filesystem is checked ok *** + +--- mkfs=-lversion=2,su=4096, mnt=-ologbsize=32k, sync=nosync --- + +*** mkfs *** + + +*** mount *** + + +*** ls /mnt/scratch *** + +00 +01 +02 +03 +04 +05 +06 +07 +08 +09 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 + +*** godown *** + + +*** unmount *** + + +*** logprint after going down... *** + +dirty log + +*** mount with replay *** + + +*** ls /mnt/scratch *** + +00 +01 +02 +03 +04 +05 +06 +07 +08 +09 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 + +*** unmount *** + + +*** logprint after mount and replay... *** + +clean log + +*** filesystem is checked ok *** + +--- mkfs=-lversion=2,su=32768, mnt=-ologbsize=32k, sync=nosync --- + +*** mkfs *** + + +*** mount *** + + +*** ls /mnt/scratch *** + +00 +01 +02 +03 +04 +05 +06 +07 +08 +09 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 + +*** godown *** + + +*** unmount *** + + +*** logprint after going down... *** + +dirty log + +*** mount with replay *** + + +*** ls /mnt/scratch *** + +00 +01 +02 +03 +04 +05 +06 +07 +08 +09 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 + +*** unmount *** + + +*** logprint after mount and replay... *** + +clean log + +*** filesystem is checked ok *** + +--- mkfs=-lversion=2,su=36864, mnt=-ologbsize=32k, sync=nosync --- + +*** mkfs *** + + +*** mount *** + + +*** mount failed: -ologbsize=32k *** + +--- mkfs=-lversion=2,su=5120, mnt=-ologbsize=32k, sync=nosync --- + +*** mkfs *** + + +*** Cannot mkfs for this test using option specified: -lversion=2,su=5120 -lsize=2000b *** + + +*** mkfs failed: -lversion=2,su=5120 *** + diff --git a/common.log b/common.log index 22fc174a..bc068014 100644 --- a/common.log +++ b/common.log @@ -56,6 +56,13 @@ _full() echo "" >>$seq.full } +_echofull() +{ + echo "" | tee -a $seq.full + echo "*** $* ***" | tee -a $seq.full + echo "" | tee -a $seq.full +} + # Handle the operations which get split over Log Record # boundaries. # Oper (379)..... flags: CONTINUE @@ -205,10 +212,21 @@ _check_log() | head | grep -q "" || _fail "DIRTY LOG" } +_print_logstate() +{ + _scratch_xfs_logprint -t | tee -a $seq.full >$tmp.logprint + if grep -q "" $tmp.logprint; then + echo "dirty log" + fi + if grep -q "" $tmp.logprint; then + echo "clean log" + fi +} + _print_operation() { - raw=$fulldir/op.mnt$mnt.mkfs$mkfs$sync_suffix.raw - filtered=$fulldir/op.mnt$mnt.mkfs$mkfs$sync_suffix.filtered + raw=$fulldir/op.mnt$MOUNT_OPTIONS.mkfs$MKFS_OPTIONS$sync_suffix.raw + filtered=$fulldir/op.mnt$MOUNT_OPTIONS.mkfs$MKFS_OPTIONS$sync_suffix.filtered echo "### xfs_logprint output ###" | tee $raw >$filtered _scratch_xfs_logprint -c 2>&1 \ @@ -228,8 +246,8 @@ _print_operation() _print_transaction_inode() { _start=$1 - raw=$fulldir/trans_inode.mnt$mnt.mkfs$mkfs$sync_suffix.raw - filtered=$fulldir/trans_inode.mnt$mnt.mkfs$mkfs$sync_suffix.filtered + raw=$fulldir/trans_inode.mnt$MOUNT_OPTIONS.mkfs$MKFS_OPTIONS$sync_suffix.raw + filtered=$fulldir/trans_inode.mnt$MOUNT_OPTIONS.mkfs$MKFS_OPTIONS$sync_suffix.filtered echo "### xfs_logprint -t -i -s START output ###" | tee $raw >$filtered _scratch_xfs_logprint -t -i -s $_start 2>&1 \ @@ -241,8 +259,8 @@ _print_transaction_inode() _print_transaction_buf() { _start=$1 - raw=$fulldir/trans_buf.mnt$mnt.mkfs$mkfs$sync_suffix.raw - filtered=$fulldir/trans_buf.mnt$mnt.mkfs$mkfs$sync_suffix.filtered + raw=$fulldir/trans_buf.mnt$MOUNT_OPTIONS.mkfs$MKFS_OPTIONS$sync_suffix.raw + filtered=$fulldir/trans_buf.mnt$MOUNT_OPTIONS.mkfs$MKFS_OPTIONS$sync_suffix.filtered echo "### xfs_logprint -t -b -s START output ###" | tee $raw >$filtered _scratch_xfs_logprint -t -b -s $_start 2>&1 \ @@ -253,24 +271,16 @@ _print_transaction_buf() _mkfs_log() { - typeset _mkfs_opts - _mkfs_opts=$1 - # create the FS _full "mkfs" - extra_ops="-lsize=2000b $_mkfs_opts" - _scratch_mkfs_xfs $extra_ops >$tmp.mkfs0 2>&1 - [ $? -ne 0 ] && \ - _notrun "Cannot mkfs for this test using MKFS_OPTIONS specified: $MKFS_OPTIONS $extra_ops" - cat $tmp.mkfs0 >>$seq.full - - # check the mkfs settings - _filter_mkfs <$tmp.mkfs0 2>$tmp.mkfs - source $tmp.mkfs - [ $dbsize -eq 4096 ] \ - || _notrun "Logprint test, tailored to 4K blocks ($dbsize in use)" - [ $isize -eq 256 ] \ - || _notrun "Logprint test, tailored to 256b inodes ($isize in use)" + extra_ops="-lsize=2000b" + _scratch_mkfs_xfs $extra_ops >>$seq.full 2>&1 + if [ $? -ne 0 ] ; then + _echofull "Cannot mkfs for this test using option specified: $MKFS_OPTIONS $extra_ops" + return 1 + fi + + return 0 } @@ -279,14 +289,13 @@ _mkfs_log() # _create_log() { - typeset _mnt_opts - - _mnt_opts=$1 - # mount the FS _full " mount" - _scratch_mount $_mnt_opts >>$seq.full 2>&1 \ - || _fail "mount failed: $_mnt_opts $MOUNT_OPTIONS" + _scratch_mount >>$seq.full 2>&1 + if [ $? -ne 0 ] ; then + _echofull "mount failed: $MOUNT_OPTIONS" + return 1 + fi # generate some log traffic - but not too much - life gets a little # more complicated if the log wraps around. This traffic is @@ -295,9 +304,13 @@ _create_log() # unmount the FS _full "umount" - umount $SCRATCH_DEV >>$seq.full 2>&1 \ - || _fail "umount failed" + umount $SCRATCH_DEV >>$seq.full 2>&1 + if [ $? -ne 0 ] ; then + _echofull "umount failed" + return 1 + fi + return 0 } # @@ -305,14 +318,13 @@ _create_log() # _create_log_sync() { - typeset _mnt_opts - - _mnt_opts=$1 - # mount the FS _full " mount" - _scratch_mount $_mnt_opts >>$seq.full 2>&1 \ - || _fail "mount failed: $_mnt_opts $MOUNT_OPTIONS" + _scratch_mount >>$seq.full 2>&1 + if [ $? -ne 0 ] ; then + _echofull "mount failed: $MOUNT_OPTIONS" + return 1 + fi # generate some log traffic - but not too much # add some syncs to get the log flushed to disk @@ -323,8 +335,11 @@ _create_log_sync() # unmount the FS _full "umount" - umount $SCRATCH_DEV >>$seq.full 2>&1 \ - || _fail "umount failed" + umount $SCRATCH_DEV >>$seq.full 2>&1 + if [ $? -ne 0 ] ; then + _echofull "umount failed" + return 1 + fi } @@ -332,47 +347,10 @@ _cmp_output() { echo "*** compare logprint: $1 with $2" if ! diff $1 $2 >/dev/null; then - echo "FAILED: logprint output $1 differs to $2" - touch $tmp.error + _fail "logprint output $1 differs to $2" fi } -_clear_opts() -{ - # clear opts - # - remove the log options in mkfs - # - remove the log options in mount - # - remove the quota options in mount - # leave any other options given - # fix up removals when remaining -o or comma: - # "-o blah," -> "-o blah" - # "-o blah, -x woof" -> "-o blah -x woof" - # "-x woof -o " -> "-x woof" - # "-x woof -o -y wow" -> "-x woof -y wow" - MKFS_OPTIONS=`echo $MKFS_OPTIONS | sed -e 's/-l[ ]*[^ $]*//g'` - MOUNT_OPTIONS=`echo $MOUNT_OPTIONS |\ - sed \ - -e 's/logbsize=[^ ,]*,*//g' \ - -e 's/logbufs=[^ ,]*,*//g' \ - -e 's/usrquota,*//g' \ - -e 's/grpquota,*//g' \ - -e 's/quota,*//g' \ - -e 's/uqnoenforce,*//g' \ - -e 's/gqnoenforce,*//g' \ - -e 's/\(-o[^-,]*\), *$/\1/g' \ - -e 's/\(-o[^-,]*\), *-/\1 -/g' \ - -e 's/-o *$//g' \ - -e 's/-o *-/-/g' \ - ` - - # export opts - export MKFS_OPTIONS - export MOUNT_OPTIONS - echo "MKFS_OPTIONS = $MKFS_OPTIONS" >>$seq.full - echo "MOUNT_OPTIONS = $MOUNT_OPTIONS" >>$seq.full - -} - # # Op data of different Log Record sizes will mean that data is # split at different points and in op printing it will not @@ -432,8 +410,7 @@ _cmp_op_output() diff $1 $2 >$filtered.diff if ! _process_op_diff $filtered.diff then - echo "FAILED: logprint output $1 differs to $2 considering splits" - touch $tmp.error + _fail "logprint output $1 differs to $2 considering splits" fi } diff --git a/group b/group index 83fd96ba..1acee7ec 100644 --- a/group +++ b/group @@ -149,3 +149,4 @@ ioctl nathans@sgi.com 083 rw auto 084 ioctl rw auto 085 log auto +086 log