mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
common: Enhance the scratch dev pool and deletable device check
_require_scratch_dev_pool() checks the devices number in SCRATCH_DEV_POOL, but it's not enough since some btrfs RAID10 tests needs 4 devices, but when 3 or less devices are provided, the check is useless and related test case will fail(btrfs/003 btrfs/011 btrfs/023). Also _require_deletable_scratch_dev_pool only checks whether it is virtul, like virtio(not including virtio-scsi) disk will pass the check but is unable to delete. This patch enhance _require_scratch_dev_pool by add optional $1 as needed device number to do extra check. And enhance _require_deletable_scratch_dev_pool by directly check /sys/class/block/$DEV/device/delete file. Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <dchinner@redhat.com>
This commit is contained in:
+1
-1
@@ -49,7 +49,7 @@ _need_to_be_root
|
||||
_supported_fs btrfs
|
||||
_supported_os Linux
|
||||
_require_scratch
|
||||
_require_scratch_dev_pool
|
||||
_require_scratch_dev_pool 4
|
||||
_require_deletable_scratch_dev_pool
|
||||
_require_command $WIPEFS_PROG
|
||||
|
||||
|
||||
Reference in New Issue
Block a user