mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
Fix v2 log scripts so that they are not run if v2 log support is not there.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
+43
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user