mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
common: add _require_scratch_shtudown
This is to detect whether filesystem supports shutdown feature or not. And let use this into the following xfs tests. xfs/053 (data exposure) xfs/137 (data vs filesize) xfs/138 (data vs filesize vs truncate) xfs/139 (data vs filesize vs partial truncate) xfs/140 (data vs filesize vs extending truncate) xfs/179 (data vs filesize w/ fsync) xfs/180 (data vs filesize w/ sync) xfs/182 (data vs filesize w/ recovery) xfs/200 (recovery vs ro-block device) xfs/306 (fsstress vs recovery) xfs/085 xfs/086 xfs/087 Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
committed by
Dave Chinner
parent
3de543f791
commit
e2b7ec91cc
@@ -2320,6 +2320,18 @@ _require_freeze()
|
||||
[ $result -eq 0 ] || _notrun "$FSTYP does not support freezing"
|
||||
}
|
||||
|
||||
# Does shutdown work on this fs?
|
||||
_require_scratch_shutdown()
|
||||
{
|
||||
[ -x src/godown ] || _notrun "src/godown executable not found"
|
||||
|
||||
_scratch_mkfs > /dev/null 2>&1
|
||||
_scratch_mount
|
||||
src/godown -f $SCRATCH_MNT 2>&1 \
|
||||
|| _notrun "$FSTYP does not support shutdown"
|
||||
_scratch_unmount
|
||||
}
|
||||
|
||||
# arg 1 is dev to remove and is output of the below eg.
|
||||
# ls -l /sys/class/block/sdd | rev | cut -d "/" -f 3 | rev
|
||||
_devmgt_remove()
|
||||
|
||||
@@ -86,6 +86,7 @@ _crashtest()
|
||||
_supported_fs xfs
|
||||
_supported_os Linux
|
||||
_require_scratch
|
||||
_require_scratch_shutdown
|
||||
_require_xfs_io_command "falloc"
|
||||
_require_xfs_io_command "fpunch"
|
||||
_require_xfs_io_command "fzero"
|
||||
|
||||
@@ -47,6 +47,7 @@ rm -f $seqres.full
|
||||
rm -f $tmp.log
|
||||
|
||||
_require_scratch
|
||||
_require_scratch_shutdown
|
||||
|
||||
echo "mkfs"
|
||||
_scratch_mkfs_xfs >>$seqres.full 2>&1 \
|
||||
|
||||
@@ -44,6 +44,7 @@ _supported_os IRIX Linux
|
||||
|
||||
rm -f $seqres.full $tmp.*
|
||||
_require_scratch
|
||||
_require_scratch_shutdown
|
||||
_require_v2log
|
||||
|
||||
echo "*** init FS"
|
||||
|
||||
@@ -59,6 +59,7 @@ _supported_os IRIX Linux
|
||||
|
||||
rm -f $seqres.full $tmp.*
|
||||
_require_scratch
|
||||
_require_scratch_shutdown
|
||||
_require_v2log
|
||||
_require_xfs_quota
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ _supported_fs xfs
|
||||
_supported_os Linux IRIX
|
||||
|
||||
_require_scratch
|
||||
_require_scratch_shutdown
|
||||
_scratch_mkfs_xfs >/dev/null 2>&1
|
||||
_scratch_mount
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ _supported_fs xfs
|
||||
_supported_os Linux IRIX
|
||||
|
||||
_require_scratch
|
||||
_require_scratch_shutdown
|
||||
_scratch_mkfs_xfs >/dev/null 2>&1
|
||||
_scratch_mount
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ _supported_fs xfs
|
||||
_supported_os Linux IRIX
|
||||
|
||||
_require_scratch
|
||||
_require_scratch_shutdown
|
||||
_scratch_mkfs_xfs >/dev/null 2>&1
|
||||
_scratch_mount
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ _supported_fs xfs
|
||||
_supported_os Linux IRIX
|
||||
|
||||
_require_scratch
|
||||
_require_scratch_shutdown
|
||||
_scratch_mkfs_xfs >/dev/null 2>&1
|
||||
_scratch_mount
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ _supported_fs xfs
|
||||
_supported_os Linux IRIX
|
||||
|
||||
_require_scratch
|
||||
_require_scratch_shutdown
|
||||
_scratch_mkfs_xfs >/dev/null 2>&1
|
||||
_scratch_mount
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ _supported_fs xfs
|
||||
_supported_os Linux IRIX
|
||||
|
||||
_require_scratch
|
||||
_require_scratch_shutdown
|
||||
_scratch_mkfs_xfs >/dev/null 2>&1
|
||||
_scratch_mount
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ _supported_fs xfs
|
||||
_supported_os Linux IRIX
|
||||
|
||||
_require_scratch
|
||||
_require_scratch_shutdown
|
||||
_scratch_mkfs_xfs >/dev/null 2>&1
|
||||
_scratch_mount
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@ _supported_fs xfs
|
||||
_supported_os Linux
|
||||
|
||||
_require_scratch_nocheck
|
||||
_require_scratch_shutdown
|
||||
|
||||
_scratch_mkfs_xfs >/dev/null 2>&1
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@ _supported_fs xfs
|
||||
_supported_os Linux
|
||||
|
||||
_require_scratch
|
||||
_require_scratch_shutdown
|
||||
|
||||
rm -f $seqres.full
|
||||
|
||||
|
||||
Reference in New Issue
Block a user