]> www.infradead.org Git - users/hch/xfstests-dev.git/commitdiff
btrfs: skip tests incompatible with compression when compression is enabled
authorFilipe Manana <fdmanana@suse.com>
Wed, 12 Feb 2025 23:34:59 +0000 (23:34 +0000)
committerZorro Lang <zlang@kernel.org>
Fri, 14 Feb 2025 19:18:26 +0000 (03:18 +0800)
We have several tests that fail when compression is enabled (MOUNT_OPTIONS
has "-o compress" or "-o compress-force"") because they expect a fixed
extent size and they trigger corruption by writing directly to a device,
therefore making them incompatible with compression.

So add a _require_no_compress call to them.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/btrfs/215
tests/btrfs/265
tests/btrfs/266
tests/btrfs/267
tests/btrfs/268
tests/btrfs/269
tests/btrfs/289
tests/btrfs/297

index b63ebff676bcb10d4f758a691464e777021e03e1..2418cc90796d531243a7ae1a853a5c6b44c990ab 100755 (executable)
@@ -25,6 +25,10 @@ _require_scratch
 _require_btrfs_no_nodatacow
 # Overwriting data is forbidden on a zoned block device
 _require_non_zoned_device $SCRATCH_DEV
+# We need to ensure a fixed amount of written blocks to trigger a specific
+# number of read errors and we corrupt by writing directly to the device, so
+# skip if compression is enabled.
+_require_no_compress
 
 _scratch_mkfs > /dev/null
 # disable freespace inode to ensure file is the first thing in the data
index 0fa55a7ff3c88b9ef5f03e5a97b10b8b0fc8e001..5640e714a92008a39a9c404bf18e4b84ecb1b686 100755 (executable)
@@ -20,6 +20,9 @@ _require_btrfs_no_nodatacow
 _require_odirect
 # Overwriting data is forbidden on a zoned block device
 _require_non_zoned_device "${SCRATCH_DEV}"
+# We need to ensure a fixed extent size and we corrupt by writing directly to
+# the device, so skip if compression is enabled.
+_require_no_compress
 
 _scratch_dev_pool_get 3
 # step 1, create a raid1 btrfs which contains one 128k file.
index 0788ba946c0a8697666d175c6bf51ca71fbcac5d..681cefda100bf5d027506c457226dcade261e018 100755 (executable)
@@ -21,6 +21,9 @@ _require_scratch_dev_pool 3
 _require_odirect
 # Overwriting data is forbidden on a zoned block device
 _require_non_zoned_device "${SCRATCH_DEV}"
+# We need to ensure a fixed extent size and we corrupt by writing directly to
+# the device, so skip if compression is enabled.
+_require_no_compress
 
 _scratch_dev_pool_get 3
 # step 1, create a raid1 btrfs which contains one 128k file.
index 151ccdae13da092f7f22aa35cb28ad03ac7a1d10..ceba974df18ade8b41b7af71cdafee637c656d8f 100755 (executable)
@@ -21,6 +21,9 @@ _require_btrfs_no_nodatacow
 _require_odirect
 # Overwriting data is forbidden on a zoned block device
 _require_non_zoned_device "${SCRATCH_DEV}"
+# We need to ensure a fixed extent size and we corrupt by writing directly to
+# the device, so skip if compression is enabled.
+_require_no_compress
 
 _scratch_dev_pool_get 3
 # step 1, create a raid1 btrfs which contains one 128k file.
index dce5cb9532aca86dc08a043f63dca7f3ec17d5ff..99e1ee4a2d40b019500d7ad3bd45fcd38d7668ed 100755 (executable)
@@ -20,6 +20,9 @@ _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
+# We need to ensure a fixed extent size and we corrupt by writing directly to
+# the device, so skip if compression is enabled.
+_require_no_compress
 
 echo "step 1......mkfs.btrfs"
 
index 129a4a41a66b23da5bcf6e808c60935170725b37..183aeb736b71db140974c5bc67cbaa77e249e0db 100755 (executable)
@@ -22,6 +22,9 @@ _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
+# We need to ensure a fixed extent size and we corrupt by writing directly to
+# the device, so skip if compression is enabled.
+_require_no_compress
 _require_scratch_dev_pool 4
 _scratch_dev_pool_get 4
 
index 86e910216f114325d6851044eded7df64f97bbf1..b340b97dc1659e47b2fa72b5927eb2a2c20b376a 100755 (executable)
@@ -18,7 +18,9 @@ _require_btrfs_no_nodatacow
 _require_odirect
 # Overwriting data is forbidden on a zoned block device
 _require_non_zoned_device "${SCRATCH_DEV}"
-
+# We need to ensure a fixed extent size and we corrupt by writing directly to
+# the device, so skip if compression is enabled.
+_require_no_compress
 # The errors reported would be in the unit of sector, thus the number
 # is dependent on the sectorsize.
 _require_btrfs_support_sectorsize 4096
index eb4f365e96bb5310f4cf3769e2218e483791fdba..1f3f7c08f86b91786b2a4998c8f23526adc03d4f 100755 (executable)
@@ -14,6 +14,10 @@ _begin_fstest auto quick raid scrub
 _require_odirect
 _require_non_zoned_device "${SCRATCH_DEV}"
 _require_scratch_dev_pool 3
+# We need to ensure a fixed extent size and we corrupt by writing directly to
+# the device, so skip if compression is enabled.
+_require_no_compress
+
 _fixed_by_kernel_commit 486c737f7fdc \
        "btrfs: raid56: always verify the P/Q contents for scrub"