[PATCH 3/5] generic/746: skip on zoned btrfs

Johannes Thumshirn <[email protected]> Mon, 20 Jul 2026 13:18:47 +0200
Newsgroups org.kernel.vger.fstests,org.kernel.vger.linux-btrfs
Message-ID <[email protected]>
The test relies on loop device discards punching holes in the backing
image file (holes are then detected via fiemap on the backing file).
Zoned btrfs does not support fallocate/punch hole, so fstrim on the
loop device cannot free space in the backing file and the test cannot
work.

Skip the test on zoned devices, but only for btrfs so that other
filesystems (e.g. zoned XFS/f2fs) can still run it.

Signed-off-by: Johannes Thumshirn <[email protected]>
---
 tests/generic/746 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/generic/746 b/tests/generic/746
index 4eb4252b8ba0..db4e40d5cec7 100755
--- a/tests/generic/746
+++ b/tests/generic/746
@@ -11,6 +11,7 @@ _begin_fstest auto trim fiemap
 
 _require_test
 _require_loop
+[[ $FSTYP == "btrfs" ]] && _require_non_zoned_device $TEST_DEV
 _require_fstrim
 _require_xfs_io_command "fiemap"
 
-- 
2.54.0