FS/XFS testing framework
 help / color / mirror / Atom feed
From: Anand Jain <anand.jain@oracle.com>
To: Josef Bacik <josef@toxicpanda.com>,
	fstests@vger.kernel.org, linux-btrfs@vger.kernel.org,
	kernel-team@fb.com
Subject: Re: [PATCH v2 3/3] fstests: update tests to skip unsupported raid profile types
Date: Tue, 9 Apr 2024 11:40:19 +0800	[thread overview]
Message-ID: <1ef36ab5-379b-4466-9285-c372fc775a4f@oracle.com> (raw)
In-Reply-To: <7111bf50942e0b72a43ceed010d8bab00c712a75.1712346845.git.josef@toxicpanda.com>

On 4/6/24 03:56, Josef Bacik wrote:
> Tests btrfs/197, btrfs/198, and btrfs/297 test multiple raid types in
> their workout() function.  We may not support some of the raid types, so
> add a check in the workout() function to skip any incompatible raid
> profiles.
> 
> Signed-off-by: Josef Bacik <josef@toxicpanda.com>

Reviewed-by: Anand Jain <anand.jain@oracle.com>

Thx
Anand

> ---
>   tests/btrfs/197 | 10 ++++++++--
>   tests/btrfs/198 | 10 ++++++++--
>   tests/btrfs/297 | 10 ++++++++++
>   3 files changed, 26 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/btrfs/197 b/tests/btrfs/197
> index 2ce41b32..9ec4e9f0 100755
> --- a/tests/btrfs/197
> +++ b/tests/btrfs/197
> @@ -30,14 +30,20 @@ _supported_fs btrfs
>   _require_test
>   _require_scratch
>   _require_scratch_dev_pool 5
> -# Zoned btrfs only supports SINGLE profile
> -_require_non_zoned_device ${SCRATCH_DEV}
> +# We require at least one raid setup, raid1 is the easiest, use this to gate on
> +# wether or not we run this test
> +_require_btrfs_raid_type raid1
>   
>   workout()
>   {
>   	raid=$1
>   	device_nr=$2
>   
> +	if ! _check_btrfs_raid_type $raid; then
> +		echo "$raid isn't supported, skipping" >> $seqres.full
> +		return
> +	fi
> +
>   	echo $raid >> $seqres.full
>   	_scratch_dev_pool_get $device_nr
>   	_spare_dev_get
> diff --git a/tests/btrfs/198 b/tests/btrfs/198
> index a326a8ca..c5a8f392 100755
> --- a/tests/btrfs/198
> +++ b/tests/btrfs/198
> @@ -18,8 +18,9 @@ _supported_fs btrfs
>   _require_command "$WIPEFS_PROG" wipefs
>   _require_scratch
>   _require_scratch_dev_pool 4
> -# Zoned btrfs only supports SINGLE profile
> -_require_non_zoned_device ${SCRATCH_DEV}
> +# We require at least one raid setup, raid1 is the easiest, use this to gate on
> +# wether or not we run this test
> +_require_btrfs_raid_type raid1
>   _fixed_by_kernel_commit 96c2e067ed3e3e \
>   	"btrfs: skip devices without magic signature when mounting"
>   
> @@ -28,6 +29,11 @@ workout()
>   	raid=$1
>   	device_nr=$2
>   
> +	if ! _check_btrfs_raid_type $raid; then
> +		echo "$raid isn't supported, skipping" >> $seqres.full
> +		return
> +	fi
> +
>   	echo $raid >> $seqres.full
>   	_scratch_dev_pool_get $device_nr
>   
> diff --git a/tests/btrfs/297 b/tests/btrfs/297
> index a0023861..7afe854d 100755
> --- a/tests/btrfs/297
> +++ b/tests/btrfs/297
> @@ -18,11 +18,21 @@ _require_scratch_dev_pool 3
>   _fixed_by_kernel_commit 486c737f7fdc \
>   	"btrfs: raid56: always verify the P/Q contents for scrub"
>   
> +# If neither raid5 or raid6 are supported do _notrun
> +if ! _check_btrfs_raid_type raid5 && ! _check_btrfs_raid_type raid6; then
> +	_notrun "requires either raid5 or raid6 support"
> +fi
> +
>   workload()
>   {
>   	local profile=$1
>   	local nr_devs=$2
>   
> +	if ! _check_btrfs_raid_type $profile; then
> +		echo "$profile isn't supported, skipping" >> $seqres.full
> +		return
> +	fi
> +
>   	echo "=== Testing $nr_devs devices $profile ===" >> $seqres.full
>   	_scratch_dev_pool_get $nr_devs
>   


      reply	other threads:[~2024-04-09  3:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-05 19:56 [PATCH v2 0/3] fstests: various RAID56 related fixes for btrfs Josef Bacik
2024-04-05 19:56 ` [PATCH v2 1/3] fstests: change btrfs/197 and btrfs/198 golden output Josef Bacik
2024-04-09  1:02   ` Anand Jain
2024-04-05 19:56 ` [PATCH v2 2/3] fstests: change how we test for supported raid configs Josef Bacik
2024-04-09  3:33   ` Anand Jain
2024-04-05 19:56 ` [PATCH v2 3/3] fstests: update tests to skip unsupported raid profile types Josef Bacik
2024-04-09  3:40   ` Anand Jain [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1ef36ab5-379b-4466-9285-c372fc775a4f@oracle.com \
    --to=anand.jain@oracle.com \
    --cc=fstests@vger.kernel.org \
    --cc=josef@toxicpanda.com \
    --cc=kernel-team@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox