@@ -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
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> --- common/rc | 12 ++++++++++++ tests/xfs/053 | 1 + tests/xfs/085 | 1 + tests/xfs/086 | 1 + tests/xfs/087 | 1 + tests/xfs/137 | 1 + tests/xfs/138 | 1 + tests/xfs/139 | 1 + tests/xfs/140 | 1 + tests/xfs/179 | 1 + tests/xfs/180 | 1 + tests/xfs/182 | 1 + tests/xfs/200 | 1 + tests/xfs/306 | 1 + 14 files changed, 25 insertions(+)