]> www.infradead.org Git - users/hch/xfstests-dev.git/commitdiff
xfs: add a _require_scratch_non_zoned helper
authorChristoph Hellwig <hch@lst.de>
Thu, 24 Oct 2024 11:50:09 +0000 (13:50 +0200)
committerChristoph Hellwig <hch@lst.de>
Tue, 5 Nov 2024 08:32:03 +0000 (09:32 +0100)
Certain tests can't run on zoned file systems.  Add a helper to
_notrun them in this case.

Signed-off-by: Christoph Hellwig <hch@lst.de>
common/xfs
tests/xfs/1856
tests/xfs/419
tests/xfs/540
tests/xfs/596

index 67951d21095b071bb9d2817807b5a498f05211ee..c0d46a228212aa966381844c91bdf8056c4eadc2 100644 (file)
@@ -2061,6 +2061,18 @@ _scratch_xfs_force_no_metadir()
        fi
 }
 
+# do not run on zoned file systems
+_require_scratch_non_zoned()
+{
+       if [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_RTDEV" ]; then
+               _require_non_zoned_device $SCRATCH_RTDEV
+
+               if echo "$MKFS_OPTIONS" | grep -q 'zoned=1'; then
+                       _notrun "Not supported on zoned file systems"
+               fi
+       fi
+}
+
 # Decide if a mount filesystem has metadata directory trees.
 _xfs_mount_has_metadir() {
        local mount="$1"
index 9ef099ee42153c15bba35c204d182811fed84287..ad37f944f6336fbf12cf8c501cfe036cdce167e5 100755 (executable)
@@ -15,9 +15,8 @@ _begin_fstest auto mkfs repair
 _require_check_dmesg
 _require_scratch_nocheck
 _require_scratch_xfs_crc
-
 # zoned requires metadir and doesn't support old features
-_require_non_zoned_device $SCRATCH_RTDEV
+_require_scratch_non_zoned
 
 # Does repair know how to add a particular feature to a filesystem?
 check_repair_upgrade()
index 614a145e9166ac120858e30cb8a9906a872a5500..29e5ac083c6994475eead5ce658c2388076c5cd2 100755 (executable)
@@ -27,9 +27,8 @@ _begin_fstest auto quick realtime mkfs
 
 _require_realtime
 _require_scratch
-
-# no extsize support on zoned file systems
-_require_non_zoned_device $SCRATCH_RTDEV
+# no support for rtextsize > 1 on zoned file systems
+_require_scratch_non_zoned
 
 # Check mkfs.xfs option parsing with regards to rtinherit.  XFS doesn't require
 # the realtime volume to be present to set rtinherit, so it's safe to call the
index aadcd47046573d30f64ecd87b29f83de09b166fb..7a79aacc383a397a6a2b70e1e883e95b930788f3 100755 (executable)
@@ -24,9 +24,8 @@ _begin_fstest auto repair fuzzers
 . ./common/filter
 
 _require_scratch
-
-# zoned RT devices don't support rtextsize
-_require_non_zoned_device $SCRATCH_RTDEV
+# no support for rtextsize > 1 on zoned file systems
+_require_scratch_non_zoned
 
 echo "Format and mount"
 _scratch_mkfs -r extsize=7b | _filter_mkfs > $seqres.full 2>$tmp.mkfs
index 315d2ebfbd62995831dfc26dc4e0614dcc70ab5f..ffa4f9501fe0f891a87d7fd968fc8dba602dade9 100755 (executable)
@@ -26,7 +26,8 @@ _cleanup()
 _require_scratch
 _require_realtime
 _require_no_large_scratch_dev
-_require_non_zoned_device $SCRATCH_RTDEV # no growfs support for zoned rt devices
+# growfs on zoned file systems only works on zone boundaries
+_require_scratch_non_zoned
 _scratch_unmount 2>/dev/null
 
 _fill()