]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
common: support internal RT device in _require_realtime
authorChristoph Hellwig <hch@lst.de>
Thu, 1 May 2025 13:38:57 +0000 (08:38 -0500)
committerZorro Lang <zlang@kernel.org>
Wed, 7 May 2025 14:12:02 +0000 (22:12 +0800)
If SCRATCH_DEV is a zoned device it implies an internal zoned RT device
and should not be skipped in _require_realtime.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
common/rc

index 5f155596271423dbca767262355866d02626a0f0..7395ff610bd288c334c604327b6d79d6d39e1035 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -2329,10 +2329,15 @@ _require_no_large_scratch_dev()
 #
 _require_realtime()
 {
-    [ "$USE_EXTERNAL" = yes ] || \
-       _notrun "External volumes not in use, skipped this test"
-    [ "$SCRATCH_RTDEV" = "" ] && \
-       _notrun "Realtime device required, skipped this test"
+       local zone_type=`_zone_type $SCRATCH_DEV`
+       if [ "${zone_type}" = "none" ]; then
+               if [ "$USE_EXTERNAL" != "yes" ]; then
+                       _notrun "External volumes not in use, skipped this test"
+               fi
+               if [ "$SCRATCH_RTDEV" = "" ]; then
+                       _notrun "Realtime device required, skipped this test"
+               fi
+       fi
 }
 
 # This test requires that a realtime subvolume is not in use