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 1/3] fstests: change btrfs/197 and btrfs/198 golden output
Date: Tue, 9 Apr 2024 09:02:51 +0800 [thread overview]
Message-ID: <eda3efb3-6b21-4250-bc46-2082311d0f36@oracle.com> (raw)
In-Reply-To: <88b11129c00fb9b07e36569b4b5fe823c0a98c39.1712346845.git.josef@toxicpanda.com>
On 4/6/24 03:56, Josef Bacik wrote:
> Both btrfs/197 and btrfs/198 check several raid types. We may not have
> support for raid5/6 for our available profiles, but we'd like to be able
> to test the other profiles. In order to enable this, update the golden
> output to have no output, and simply have the test check for the device
> we removed to see if it still exists in the device list output. This
> will allow us to add a check to skip unsupported raid configurations in
> our config.
>
> Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Thx, Anand
> ---
> tests/btrfs/197 | 7 +++++--
> tests/btrfs/197.out | 25 +------------------------
> tests/btrfs/198 | 7 +++++--
> tests/btrfs/198.out | 25 +------------------------
> 4 files changed, 12 insertions(+), 52 deletions(-)
>
> diff --git a/tests/btrfs/197 b/tests/btrfs/197
> index d259fd99..2ce41b32 100755
> --- a/tests/btrfs/197
> +++ b/tests/btrfs/197
> @@ -38,7 +38,7 @@ workout()
> raid=$1
> device_nr=$2
>
> - echo $raid
> + echo $raid >> $seqres.full
> _scratch_dev_pool_get $device_nr
> _spare_dev_get
>
> @@ -62,7 +62,9 @@ workout()
> _mount -o degraded $device_2 $SCRATCH_MNT
> # Check if missing device is reported as in the .out
> $BTRFS_UTIL_PROG filesystem show -m $SCRATCH_MNT | \
> - _filter_btrfs_filesystem_show
> + _filter_btrfs_filesystem_show > $tmp.output 2>&1
> + cat $tmp.output >> $seqres.full
> + grep -q "$device_1" $tmp.output && _fail "found stale device"
>
> $BTRFS_UTIL_PROG device remove "$device_1" "$TEST_DIR/$seq.mnt"
> $UMOUNT_PROG $TEST_DIR/$seq.mnt
> @@ -77,5 +79,6 @@ workout "raid6" "4"
> workout "raid10" "4"
>
> # success, all done
> +echo "Silence is golden"
> status=0
> exit
> diff --git a/tests/btrfs/197.out b/tests/btrfs/197.out
> index 79237b85..3bbd3143 100644
> --- a/tests/btrfs/197.out
> +++ b/tests/btrfs/197.out
> @@ -1,25 +1,2 @@
> QA output created by 197
> -raid1
> -Label: none uuid: <UUID>
> - Total devices <NUM> FS bytes used <SIZE>
> - devid <DEVID> size <SIZE> used <SIZE> path SCRATCH_DEV
> - *** Some devices missing
> -
> -raid5
> -Label: none uuid: <UUID>
> - Total devices <NUM> FS bytes used <SIZE>
> - devid <DEVID> size <SIZE> used <SIZE> path SCRATCH_DEV
> - *** Some devices missing
> -
> -raid6
> -Label: none uuid: <UUID>
> - Total devices <NUM> FS bytes used <SIZE>
> - devid <DEVID> size <SIZE> used <SIZE> path SCRATCH_DEV
> - *** Some devices missing
> -
> -raid10
> -Label: none uuid: <UUID>
> - Total devices <NUM> FS bytes used <SIZE>
> - devid <DEVID> size <SIZE> used <SIZE> path SCRATCH_DEV
> - *** Some devices missing
> -
> +Silence is golden
> diff --git a/tests/btrfs/198 b/tests/btrfs/198
> index 7d23ffce..a326a8ca 100755
> --- a/tests/btrfs/198
> +++ b/tests/btrfs/198
> @@ -28,7 +28,7 @@ workout()
> raid=$1
> device_nr=$2
>
> - echo $raid
> + echo $raid >> $seqres.full
> _scratch_dev_pool_get $device_nr
>
> _scratch_pool_mkfs "-d$raid -m$raid" >> $seqres.full 2>&1 || \
> @@ -46,7 +46,9 @@ workout()
> _mount -o degraded $device_2 $SCRATCH_MNT
> # Check if missing device is reported as in the 196.out
> $BTRFS_UTIL_PROG filesystem show -m $SCRATCH_MNT | \
> - _filter_btrfs_filesystem_show
> + _filter_btrfs_filesystem_show > $tmp.output 2>&1
> + cat $tmp.output >> $seqres.full
> + grep -q "$device_1" $tmp.output && _fail "found stale device"
>
> _scratch_unmount
> _scratch_dev_pool_put
> @@ -58,5 +60,6 @@ workout "raid6" "4"
> workout "raid10" "4"
>
> # success, all done
> +echo "Silence is golden"
> status=0
> exit
> diff --git a/tests/btrfs/198.out b/tests/btrfs/198.out
> index af904a39..cb4c7854 100644
> --- a/tests/btrfs/198.out
> +++ b/tests/btrfs/198.out
> @@ -1,25 +1,2 @@
> QA output created by 198
> -raid1
> -Label: none uuid: <UUID>
> - Total devices <NUM> FS bytes used <SIZE>
> - devid <DEVID> size <SIZE> used <SIZE> path SCRATCH_DEV
> - *** Some devices missing
> -
> -raid5
> -Label: none uuid: <UUID>
> - Total devices <NUM> FS bytes used <SIZE>
> - devid <DEVID> size <SIZE> used <SIZE> path SCRATCH_DEV
> - *** Some devices missing
> -
> -raid6
> -Label: none uuid: <UUID>
> - Total devices <NUM> FS bytes used <SIZE>
> - devid <DEVID> size <SIZE> used <SIZE> path SCRATCH_DEV
> - *** Some devices missing
> -
> -raid10
> -Label: none uuid: <UUID>
> - Total devices <NUM> FS bytes used <SIZE>
> - devid <DEVID> size <SIZE> used <SIZE> path SCRATCH_DEV
> - *** Some devices missing
> -
> +Silence is golden
next prev parent reply other threads:[~2024-04-09 1:03 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 [this message]
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
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=eda3efb3-6b21-4250-bc46-2082311d0f36@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