From 1538aef8361ffa29b7df1a19bcd8fb86f9991030 Mon Sep 17 00:00:00 2001 From: Naohiro Aota Date: Mon, 16 Aug 2021 20:35:10 +0900 Subject: [PATCH] generic: add checks for zoned block device 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 Reviewed-by: Darrick J. Wong Signed-off-by: Eryu Guan --- tests/generic/108 | 2 ++ tests/generic/471 | 2 ++ tests/generic/570 | 2 ++ 3 files changed, 6 insertions(+) diff --git a/tests/generic/108 b/tests/generic/108 index b7797e8f..6e1ea5b9 100755 --- a/tests/generic/108 +++ b/tests/generic/108 @@ -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 diff --git a/tests/generic/471 b/tests/generic/471 index dab06f3a..fbd0b12a 100755 --- a/tests/generic/471 +++ b/tests/generic/471 @@ -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 diff --git a/tests/generic/570 b/tests/generic/570 index 7d03acfe..126b222d 100755 --- a/tests/generic/570 +++ b/tests/generic/570 @@ -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 -- 2.39.5