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>
[ $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()
_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"
rm -f $tmp.log
_require_scratch
+_require_scratch_shutdown
echo "mkfs"
_scratch_mkfs_xfs >>$seqres.full 2>&1 \
rm -f $seqres.full $tmp.*
_require_scratch
+_require_scratch_shutdown
_require_v2log
echo "*** init FS"
rm -f $seqres.full $tmp.*
_require_scratch
+_require_scratch_shutdown
_require_v2log
_require_xfs_quota
_supported_os Linux IRIX
_require_scratch
+_require_scratch_shutdown
_scratch_mkfs_xfs >/dev/null 2>&1
_scratch_mount
_supported_os Linux IRIX
_require_scratch
+_require_scratch_shutdown
_scratch_mkfs_xfs >/dev/null 2>&1
_scratch_mount
_supported_os Linux IRIX
_require_scratch
+_require_scratch_shutdown
_scratch_mkfs_xfs >/dev/null 2>&1
_scratch_mount
_supported_os Linux IRIX
_require_scratch
+_require_scratch_shutdown
_scratch_mkfs_xfs >/dev/null 2>&1
_scratch_mount
_supported_os Linux IRIX
_require_scratch
+_require_scratch_shutdown
_scratch_mkfs_xfs >/dev/null 2>&1
_scratch_mount
_supported_os Linux IRIX
_require_scratch
+_require_scratch_shutdown
_scratch_mkfs_xfs >/dev/null 2>&1
_scratch_mount
_supported_os Linux IRIX
_require_scratch
+_require_scratch_shutdown
_scratch_mkfs_xfs >/dev/null 2>&1
_scratch_mount
_supported_os Linux
_require_scratch_nocheck
+_require_scratch_shutdown
_scratch_mkfs_xfs >/dev/null 2>&1
_supported_os Linux
_require_scratch
+_require_scratch_shutdown
rm -f $seqres.full