generic: add checks for zoned block device
authorNaohiro Aota <naohiro.aota@wdc.com>
Mon, 16 Aug 2021 11:35:10 +0000 (20:35 +0900)
committerEryu Guan <guaneryu@gmail.com>
Sun, 22 Aug 2021 10:27:32 +0000 (18:27 +0800)
Modify generic tests to require non-zoned block device

generic/108 is disabled on zoned block device because the LVM device
not always aligned to the zone boundary.

generic/471 is disabled because we cannot enable NoCoW on zoned
btrfs.

generic/570 is disabled because swap file which require nocow is not
usable on zoned btrfs.

Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/generic/108
tests/generic/471
tests/generic/570

index b7797e8fac2b7d6d20f3831800317b60d7b996d7..6e1ea5b9d20ab9cb64847b2019be5b8ec16ede7b 100755 (executable)
@@ -36,6 +36,8 @@ _require_scratch_nocheck
 _require_block_device $SCRATCH_DEV
 _require_scsi_debug
 _require_command "$LVM_PROG" lvm
+# We cannot ensure the Logical Volume is aligned to the zone boundary
+_require_non_zoned_device $SCRATCH_DEV
 
 lvname=lv_$seq
 vgname=vg_$seq
index dab06f3a315ccb479635ddc114f53f0591e05b88..fbd0b12a9e3a8ab96f2f58e2a422cf2ad709517c 100755 (executable)
@@ -37,6 +37,8 @@ mkdir $testdir
 # all filesystems, use a NOCOW file on btrfs.
 if [ $FSTYP == "btrfs" ]; then
        _require_chattr C
+       # Zoned btrfs does not support NOCOW
+       _require_non_zoned_device $TEST_DEV
        touch $testdir/f1
        $CHATTR_PROG +C $testdir/f1
 fi
index 7d03acfe3c4455b258c4459c0166f75a5c4e7e91..126b222d10d24b92f976f96e3d3b9c7a55608fac 100755 (executable)
@@ -25,6 +25,8 @@ _supported_fs generic
 _require_test_program swapon
 _require_scratch_nocheck
 _require_block_device $SCRATCH_DEV
+# We cannot create swap on a zoned device because it can cause random write IOs
+_require_non_zoned_device "$SCRATCH_DEV"
 test -e /dev/snapshot && _notrun "userspace hibernation to swap is enabled"
 
 $MKSWAP_PROG "$SCRATCH_DEV" >> $seqres.full