Re: [PATCH 3/3] fstests: add _require_btrfs_fs_feature raid56 to a few tests

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



On 3/21/24 11:25, Naohiro Aota wrote:
On Tue, Mar 19, 2024 at 12:55:58PM -0400, Josef Bacik wrote:
There are a few tests that don't have the required

_require_btrfs_fs_feature raid56

check in them even tho they are raid5/6 related tests.  Add this check
in order to make sure environments that don't have raid5/6 support don't
improperly fail them.

Signed-off-by: Josef Bacik <josef@xxxxxxxxxxxxxx>
---
  tests/btrfs/197 | 1 +
  tests/btrfs/198 | 1 +
  tests/btrfs/297 | 1 +
  3 files changed, 3 insertions(+)

diff --git a/tests/btrfs/197 b/tests/btrfs/197
index d259fd99..8a034fdc 100755
--- a/tests/btrfs/197
+++ b/tests/btrfs/197
@@ -32,6 +32,7 @@ _require_scratch
  _require_scratch_dev_pool 5
  # Zoned btrfs only supports SINGLE profile
  _require_non_zoned_device ${SCRATCH_DEV}
+_require_btrfs_fs_feature raid56

How about moving the check in the workout() side, and skip the work based
on a specified profile?

Yeah, it's better to check for raid56 support in the workout() function
rather than at the testcase level. We can silently skip the workload if
the kernel doesn't support raid56.

This test runs the workout with raid1, 5, 6, and 10. This check can
needlessly skip the test for raid1 and raid10 if the profile setup does not
contain raid5 and raid6.


Especially, as we already have raid1 and raid10 support on a zoned setup,
we'd like to run the tests for them on it.

This can be taken separately, not as part of this patch.

Thanks, Anand


workout()
  {
diff --git a/tests/btrfs/198 b/tests/btrfs/198
index 7d23ffce..ecce81cd 100755
--- a/tests/btrfs/198
+++ b/tests/btrfs/198
@@ -20,6 +20,7 @@ _require_scratch
  _require_scratch_dev_pool 4
  # Zoned btrfs only supports SINGLE profile
  _require_non_zoned_device ${SCRATCH_DEV}
+_require_btrfs_fs_feature raid56

Same here.

  _fixed_by_kernel_commit 96c2e067ed3e3e \
  	"btrfs: skip devices without magic signature when mounting"
diff --git a/tests/btrfs/297 b/tests/btrfs/297
index a0023861..990b83b1 100755
--- a/tests/btrfs/297
+++ b/tests/btrfs/297
@@ -15,6 +15,7 @@ _supported_fs btrfs
  _require_odirect
  _require_non_zoned_device "${SCRATCH_DEV}"
  _require_scratch_dev_pool 3
+_require_btrfs_fs_feature raid56

This seems fine because it runs only raid5 and raid6.

  _fixed_by_kernel_commit 486c737f7fdc \
  	"btrfs: raid56: always verify the P/Q contents for scrub"
--
2.43.0





[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux