summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Shimmin <tes@sgi.com>2004-08-13 13:06:25 +0000
committerTim Shimmin <tes@sgi.com>2004-08-13 13:06:25 +0000
commitf4375d0da5b5b446061479af690d595d7d81fd88 (patch)
tree371ebdc327c5c843e48024872d0d3290065495d8
parent4824e3d1bb114d4d49f02f0185907b67a768b7e9 (diff)
Fix v2 log scripts so that they are not run if v2 log support is not there.
-rwxr-xr-x0182
-rw-r--r--018.out1
-rwxr-xr-x0822
-rw-r--r--082.out1
-rwxr-xr-x0861
-rwxr-xr-x0871
-rw-r--r--common.log43
-rw-r--r--group13
8 files changed, 54 insertions, 10 deletions
diff --git a/018 b/018
index 5ab3609b..72ebec14 100755
--- a/018
+++ b/018
@@ -55,7 +55,6 @@ _cleanup()
cd /
_cleanup_logfiles
rm -f $tmp.*
- echo "*** unmount"
umount $SCRATCH_MNT 2>/dev/null
}
trap "_cleanup; exit \$status" 0 1 2 3 15
@@ -66,6 +65,7 @@ _supported_os IRIX Linux
# prelim
rm -f $seq.full $tmp.*
_require_scratch
+_require_v2log
# link correct .out file
_link_out_file $seq.op
diff --git a/018.out b/018.out
index 5867504e..130c466e 100644
--- a/018.out
+++ b/018.out
@@ -15,4 +15,3 @@ QA output created by 018
*** 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
-*** unmount
diff --git a/082 b/082
index 49ebbaa0..1b99cf40 100755
--- a/082
+++ b/082
@@ -55,7 +55,6 @@ _cleanup()
cd /
_cleanup_logfiles
rm -f $tmp.*
- echo "*** unmount"
umount $SCRATCH_MNT 2>/dev/null
}
trap "_cleanup; exit \$status" 0 1 2 3 15
@@ -67,6 +66,7 @@ _supported_os IRIX Linux
# prelim
rm -f $seq.full $tmp.*
_require_scratch
+_require_v2log
# link correct .out file
_link_out_file $seq.op
diff --git a/082.out b/082.out
index c1f1542e..c7530963 100644
--- a/082.out
+++ b/082.out
@@ -37,4 +37,3 @@ QA output created by 082
*** Cannot mkfs for this test using option specified: -l version=2,su=5120 -l size=2000b ***
-*** unmount
diff --git a/086 b/086
index 8a3d0678..8fe339c9 100755
--- a/086
+++ b/086
@@ -59,6 +59,7 @@ _supported_os IRIX Linux
rm -f $seq.full $tmp.*
_require_scratch
+_require_v2log
echo "*** init FS"
umount $SCRATCH_DEV >/dev/null 2>&1
diff --git a/087 b/087
index ea8a0a5c..285953da 100755
--- a/087
+++ b/087
@@ -72,6 +72,7 @@ _supported_os IRIX Linux
rm -f $seq.full $tmp.*
_require_scratch
+_require_v2log
echo "*** init FS"
umount $SCRATCH_DEV >/dev/null 2>&1
diff --git a/common.log b/common.log
index 3f277db5..019dd1c7 100644
--- a/common.log
+++ b/common.log
@@ -437,6 +437,49 @@ _cmp_op_output()
fi
}
+# return xfs log version of device
+# e.g.
+# _log_version /dev/dsk/dks0d1s4
+#
+_log_version()
+{
+ _dev=$1
+ vers=`xfs_db -c 'sb 0' -c 'p versionnum' -r $_dev | $AWK_PROG '{print $3}'`
+ logver=`echo $vers | sed -e 's/0x[0-9a-f]\([0-9a-f]\)[0-9a-f][0-9a-f]/\1/'`
+ if [ $logver = 4 -o $logver = 5 -o $logver = 6 -o $logver = 7 -o \
+ $logver = c -o $logver = d -o $logver = e -o $logver = f ]; then
+ echo 2
+ else
+ echo 1
+ fi
+}
+
+_require_v2log()
+{
+ # test out mkfs to see if it supports "-l version=2"
+ export MKFS_OPTIONS="-l version=2"
+ if ! _scratch_mkfs_xfs $extra_ops >>$seq.full 2>&1; then
+ _notrun "mkfs does not support v2 logs"
+ fi
+
+ # test out mount to see if it mounts a v2 log fs
+ export MOUNT_OPTIONS="-o logbsize=32k"
+ if ! _scratch_mount >>$seq.full 2>&1; then
+ _notrun "mount/kernel does not support v2 logs"
+ fi
+
+ # check after unmount to see if it is clean
+ # i.e. it is not a 6.5.25 buggy version checking kernel
+ touch $SCRATCH_MNT/file
+ umount $SCRATCH_DEV >>$seq.full 2>&1
+ if _scratch_xfs_logprint -t | tee -a $seq.full \
+ | head | grep -q "<DIRTY>"; then
+ _notrun "kernel does not support v2 logs"
+ fi
+
+ # otherwise presume it does support v2 logs...:)
+}
+
# make sure this script returns success
/bin/true
diff --git a/group b/group
index 4fb1a445..505d6d25 100644
--- a/group
+++ b/group
@@ -28,6 +28,7 @@ logprint tes@sgi.com dxm@sgi.com
# XFS log related testing
log tes@sgi.com
+v2log tes@sgi.com
# xfsdump, xfsrestore, xfsinvutil
dump tes@sgi.com ivanr@sgi.com
@@ -87,7 +88,7 @@ ioctl nathans@sgi.com
015 other auto
016 rw auto
017 other auto
-018 log logprint auto
+018 log logprint v2log auto
019 mkfs auto
020 metadata attr auto
021 db attr auto
@@ -151,13 +152,13 @@ ioctl nathans@sgi.com
079 acl attr ioctl metadata auto
080 rw ioctl
081 log logprint quota auto
-082 log logprint auto
+082 log logprint v2log auto
083 rw auto
084 ioctl rw auto
-085 log
-086 log
-087 log
-088 perms
+085 log auto
+086 log v2log auto
+087 log v2log auto
+088 perms auto
089 metadata auto
090 rw
091 rw