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

Johannes Thumshirn <[email protected]>
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 filesystems that do not support "fpunch"

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 4eb4252b..be6da079 100755
--- a/tests/generic/746
+++ b/tests/generic/746
@@ -13,6 +13,7 @@ _require_test
 _require_loop
 _require_fstrim
 _require_xfs_io_command "fiemap"
+_require_xfs_io_command "fpunch"
 
 _require_fs_space $TEST_DIR 307200
 fssize=$(_small_fs_size_mb 300)           # 200m phys/virt size
-- 
2.55.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.