From: Anand Jain <anand.jain@oracle.com>
To: Johannes Thumshirn <jth@kernel.org>
Cc: Zorro Lang <zlang@redhat.com>,
fstests@vger.kernel.org, linux-btrfs@vger.kernel.org,
Johannes Thumshirn <johannes.thumshirn@wdc.com>
Subject: Re: [PATCH v2] tests: btrfs/237: skip test on devices with conventional zones
Date: Fri, 22 Aug 2025 15:41:11 +0530 [thread overview]
Message-ID: <5360c391-fd92-4891-ad31-c4b3038c8a3d@oracle.com> (raw)
In-Reply-To: <20250818095338.66277-1-jth@kernel.org>
On 18/8/25 15:23, Johannes Thumshirn wrote:
> From: Johannes Thumshirn <johannes.thumshirn@wdc.com>
>
> Skip btrfs/237 on devices with conventional zones, as we cannot force data
> allocation on a sequential zone at the moment and conventional zones
> cannot be reset, making the test invalid.
>
> Furthermore limit the output of get_data_bg() and get_data_bg_physical()
> to the first address.
>
> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
>
> ---
> Changes in v2:
> - Use 'tail' instead of 'head'
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Thanks, Anand
> ---
> tests/btrfs/237 | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/tests/btrfs/237 b/tests/btrfs/237
> index 2839f6e4..675f4c42 100755
> --- a/tests/btrfs/237
> +++ b/tests/btrfs/237
> @@ -28,7 +28,8 @@ get_data_bg()
> {
> $BTRFS_UTIL_PROG inspect-internal dump-tree -t CHUNK $SCRATCH_DEV |\
> grep -A 1 "CHUNK_ITEM" | grep -B 1 "type DATA" |\
> - grep -Eo "CHUNK_ITEM [[:digit:]]+" | cut -d ' ' -f 2
> + grep -Eo "CHUNK_ITEM [[:digit:]]+" | cut -d ' ' -f 2 |\
> + tail -n 1
> }
>
> get_data_bg_physical()
> @@ -36,9 +37,13 @@ get_data_bg_physical()
> # Assumes SINGLE data profile
> $BTRFS_UTIL_PROG inspect-internal dump-tree -t CHUNK $SCRATCH_DEV |\
> grep -A 4 CHUNK_ITEM | grep -A 3 'type DATA\|SINGLE' |\
> - grep -Eo 'offset [[:digit:]]+'| cut -d ' ' -f 2
> + grep -Eo 'offset [[:digit:]]+'| cut -d ' ' -f 2 |\
> + tail -n 1
> }
>
> +$BLKZONE_PROG report $SCRATCH_DEV | grep -q -e "nw" && \
> + _notrun "test is unreliable on devices with conventional zones"
> +
> sdev="$(_short_dev $SCRATCH_DEV)"
> zone_size=$(($(cat /sys/block/${sdev}/queue/chunk_sectors) << 9))
> fssize=$((zone_size * 16))
prev parent reply other threads:[~2025-08-22 10:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-18 9:53 [PATCH v2] tests: btrfs/237: skip test on devices with conventional zones Johannes Thumshirn
2025-08-22 10:11 ` 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=5360c391-fd92-4891-ad31-c4b3038c8a3d@oracle.com \
--to=anand.jain@oracle.com \
--cc=fstests@vger.kernel.org \
--cc=johannes.thumshirn@wdc.com \
--cc=jth@kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=zlang@redhat.com \
/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