diff mbox series

[4/4] btrfs: require no nodatacow for tests that exercise read repair

Message ID 5c3c56241dcb8d2b6c87bb4d6875d2c0659b9219.1706810184.git.fdmanana@suse.com (mailing list archive)
State New, archived
Headers show
Series btrfs: make test pass or skip them when using nodatacow | expand

Commit Message

Filipe Manana Feb. 1, 2024, 6:03 p.m. UTC
From: Filipe Manana <fdmanana@suse.com>

Several test cases that exercise the ability to detect corrupted data and
repair it, fail when "-o nodatacow" is passed to MOUNT_OPTIONS, because
that ability requires the existence of data checksums, and those are
disabled in nodatacow mode. So skip the tests when "-o nodatacow" is
present.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
 tests/btrfs/140 | 3 ++-
 tests/btrfs/141 | 2 ++
 tests/btrfs/157 | 2 ++
 tests/btrfs/158 | 2 ++
 tests/btrfs/215 | 2 ++
 tests/btrfs/265 | 2 ++
 tests/btrfs/266 | 2 ++
 tests/btrfs/267 | 2 ++
 tests/btrfs/268 | 2 ++
 tests/btrfs/269 | 2 ++
 tests/btrfs/289 | 2 ++
 11 files changed, 22 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tests/btrfs/140 b/tests/btrfs/140
index 247a7356..5ce65886 100755
--- a/tests/btrfs/140
+++ b/tests/btrfs/140
@@ -22,7 +22,8 @@  _begin_fstest auto quick read_repair fiemap
 # Modify as appropriate.
 _supported_fs btrfs
 _require_scratch_dev_pool 2
-
+# No data checksums for NOCOW case, so can't detect corruption and repair data.
+_require_btrfs_no_nodatacow
 _require_btrfs_command inspect-internal dump-tree
 _require_odirect
 # Overwriting data is forbidden on a zoned block device
diff --git a/tests/btrfs/141 b/tests/btrfs/141
index 90a90d00..e1adb91e 100755
--- a/tests/btrfs/141
+++ b/tests/btrfs/141
@@ -22,6 +22,8 @@  _begin_fstest auto quick read_repair
 
 # Modify as appropriate.
 _supported_fs btrfs
+# No data checksums for NOCOW case, so can't detect corruption and repair data.
+_require_btrfs_no_nodatacow
 _require_scratch_dev_pool 2
 
 _require_btrfs_command inspect-internal dump-tree
diff --git a/tests/btrfs/157 b/tests/btrfs/157
index 022db511..648db0d0 100755
--- a/tests/btrfs/157
+++ b/tests/btrfs/157
@@ -30,6 +30,8 @@  _begin_fstest auto quick raid read_repair
 
 # Modify as appropriate.
 _supported_fs btrfs
+# No data checksums for NOCOW case, so can't detect corruption and repair data.
+_require_btrfs_no_nodatacow
 _require_scratch_dev_pool 4
 _require_btrfs_command inspect-internal dump-tree
 _require_btrfs_fs_feature raid56
diff --git a/tests/btrfs/158 b/tests/btrfs/158
index aa85835a..28599d09 100755
--- a/tests/btrfs/158
+++ b/tests/btrfs/158
@@ -22,6 +22,8 @@  _begin_fstest auto quick raid scrub
 
 # Modify as appropriate.
 _supported_fs btrfs
+# No data checksums for NOCOW case, so can't detect corruption and repair data.
+_require_btrfs_no_nodatacow
 _require_scratch_dev_pool 4
 _require_btrfs_command inspect-internal dump-tree
 _require_btrfs_fs_feature raid56
diff --git a/tests/btrfs/215 b/tests/btrfs/215
index 00646898..6fa226fe 100755
--- a/tests/btrfs/215
+++ b/tests/btrfs/215
@@ -25,6 +25,8 @@  get_physical()
 # Modify as appropriate.
 _supported_fs btrfs
 _require_scratch
+# No data checksums for NOCOW case, so can't detect corruption and repair data.
+_require_btrfs_no_nodatacow
 # Overwriting data is forbidden on a zoned block device
 _require_non_zoned_device $SCRATCH_DEV
 
diff --git a/tests/btrfs/265 b/tests/btrfs/265
index b75d9c84..127da7ad 100755
--- a/tests/btrfs/265
+++ b/tests/btrfs/265
@@ -19,6 +19,8 @@  _begin_fstest auto quick read_repair
 _supported_fs btrfs
 _require_scratch_dev_pool 3
 
+# No data checksums for NOCOW case, so can't detect corruption and repair data.
+_require_btrfs_no_nodatacow
 _require_odirect
 # Overwriting data is forbidden on a zoned block device
 _require_non_zoned_device "${SCRATCH_DEV}"
diff --git a/tests/btrfs/266 b/tests/btrfs/266
index 42aff7c0..acfb1d59 100755
--- a/tests/btrfs/266
+++ b/tests/btrfs/266
@@ -18,6 +18,8 @@  _begin_fstest auto quick read_repair
 # real QA test starts here
 
 _supported_fs btrfs
+# No data checksums for NOCOW case, so can't detect corruption and repair data.
+_require_btrfs_no_nodatacow
 _require_scratch_dev_pool 3
 
 _require_odirect
diff --git a/tests/btrfs/267 b/tests/btrfs/267
index 75a6fdcc..51b28d9b 100755
--- a/tests/btrfs/267
+++ b/tests/btrfs/267
@@ -20,6 +20,8 @@  _begin_fstest auto quick read_repair
 _supported_fs btrfs
 _require_scratch_dev_pool 3
 
+# No data checksums for NOCOW case, so can't detect corruption and repair data.
+_require_btrfs_no_nodatacow
 _require_odirect
 # Overwriting data is forbidden on a zoned block device
 _require_non_zoned_device "${SCRATCH_DEV}"
diff --git a/tests/btrfs/268 b/tests/btrfs/268
index 9dc14a18..d122ee36 100755
--- a/tests/btrfs/268
+++ b/tests/btrfs/268
@@ -16,6 +16,8 @@  _begin_fstest auto quick read_repair
 _supported_fs btrfs
 _require_scratch
 _require_odirect
+# No data checksums for NOCOW case, so can't detect corruption and repair data.
+_require_btrfs_no_nodatacow
 _require_non_zoned_device "${SCRATCH_DEV}" # no overwrites on zoned devices
 _require_scratch_dev_pool 2
 _scratch_dev_pool_get 2
diff --git a/tests/btrfs/269 b/tests/btrfs/269
index ad8f7286..7ffad125 100755
--- a/tests/btrfs/269
+++ b/tests/btrfs/269
@@ -20,6 +20,8 @@  _begin_fstest auto quick read_repair
 _supported_fs btrfs
 _require_scratch
 _require_odirect
+# No data checksums for NOCOW case, so can't detect corruption and repair data.
+_require_btrfs_no_nodatacow
 _require_non_zoned_device "${SCRATCH_DEV}" # no overwrites on zoned devices
 _require_scratch_dev_pool 4
 _scratch_dev_pool_get 4
diff --git a/tests/btrfs/289 b/tests/btrfs/289
index 39d8f733..f1aaf4cc 100755
--- a/tests/btrfs/289
+++ b/tests/btrfs/289
@@ -16,6 +16,8 @@  _begin_fstest auto quick scrub repair
 # Modify as appropriate.
 _supported_fs btrfs
 _require_scratch
+# No data checksums for NOCOW case, so can't detect corruption and repair data.
+_require_btrfs_no_nodatacow
 
 _require_odirect
 # Overwriting data is forbidden on a zoned block device