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()
|
||||
|
||||
Reference in New Issue
Block a user