]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
common: add zoned block device checks
authorNaohiro Aota <naohiro.aota@wdc.com>
Mon, 16 Aug 2021 11:35:08 +0000 (20:35 +0900)
committerEryu Guan <guaneryu@gmail.com>
Sun, 22 Aug 2021 10:26:31 +0000 (18:26 +0800)
dm-error and dm-snapshot does not have DM_TARGET_ZONED_HM nor
DM_TARGET_MIXED_ZONED_MODEL feature and does not implement
.report_zones(). So, it cannot pass the zone information from the down
layer (zoned device) to the upper layer.

Loop device also cannot pass the zone information.

This patch requires non-zoned block device for the tests using these
ones.

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>
common/rc

index 84757fc1755ec46c9429b7f93977f930d3e0f48b..e0b6d50854c64f72f31d94980679a49e7ae14a01 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -1837,6 +1837,9 @@ _require_loop()
     else
        _notrun "This test requires loopback device support"
     fi
+
+    # loop device does not handle zone information
+    _require_non_zoned_device ${TEST_DEV}
 }
 
 # this test requires kernel support for a secondary filesystem
@@ -1966,6 +1969,16 @@ _require_dm_target()
        if [ $? -ne 0 ]; then
                _notrun "This test requires dm $target support"
        fi
+
+       # dm-error cannot handle the zone information
+       #
+       # dm-snapshot and dm-thin-pool cannot ensure sequential writes on
+       # the backing device
+       case $target in
+       error|snapshot|thin-pool)
+               _require_non_zoned_device ${SCRATCH_DEV}
+               ;;
+       esac
 }
 
 _zone_type()