From: "Darrick J. Wong" <djwong@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: Zorro Lang <zlang@kernel.org>,
fstests@vger.kernel.org, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 11/13] xfs/2306: test mkfs input validation for RT data csum options
Date: Mon, 28 Sep 2026 18:59:05 -0700 [thread overview]
Message-ID: <20260929015905.GN2705364@frogsfrogsfrogs> (raw)
In-Reply-To: <20260924100855.2734089-12-hch@lst.de>
On Thu, Sep 24, 2026 at 12:07:52PM +0200, Christoph Hellwig wrote:
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> tests/xfs/2306 | 50 ++++++++++++++++++++++++++++++++++++++++++++++
> tests/xfs/2306.out | 20 +++++++++++++++++++
> 2 files changed, 70 insertions(+)
> create mode 100755 tests/xfs/2306
> create mode 100644 tests/xfs/2306.out
>
> diff --git a/tests/xfs/2306 b/tests/xfs/2306
> new file mode 100755
> index 000000000000..76dac5bb2a69
> --- /dev/null
> +++ b/tests/xfs/2306
> @@ -0,0 +1,50 @@
> +#! /bin/bash
> +# SPDX-License-Identifier: GPL-2.0-or-later
> +# Copyright (c) 2026 Christoph Hellwig.
> +#
> +# FS QA Test No. 2306
> +#
> +# Test mkfs input checking for the csum and csumbsize options.
I wonder if you want -N so that *only* the options parsing occurs?
That would speed up this test by skipping the actual writes.
OTOH it's useful to test writing out the rtcsum files...
--D
> +#
> +. ./common/preamble
> +_begin_fstest auto quick mkfs zone datacsum
> +
> +. ./common/filter
> +
> +_require_scratch_nocheck
> +
> +expect_fail()
> +{
> + opts=$1
> + msg=$2
> +
> + echo "Testing $msg (expect failure)"
> + $MKFS_XFS_PROG -f $opts $SCRATCH_DEV 2>&1 | head -n1
> +}
> +
> +expect_fail "-r csum=crc32c" "csum option without zoned"
> +expect_fail "-r csumbsize=32k" "csumbsize option without zoned"
> +expect_fail "-r zoned,csum=crc16" "invalid csum value"
> +expect_fail "-r zoned,csum=crc32c,csumbsize=1k" "too small csumbsize"
> +expect_fail "-r zoned,csum=crc32c,csumbsize=48k" "non-pow2 csumbsize"
> +expect_fail "-r zoned,csum=crc32c,csumbsize=128k" "too large csumbsize"
> +expect_fail "-b size=64k -r zoned,csum=crc32c,csumbsize=32k" "csumbsize < bsize"
> +
> +expect_pass()
> +{
> + opts=$1
> + msg=$2
> +
> + echo "Testing $msg (expect pass)"
> + $MKFS_XFS_PROG -f $opts $SCRATCH_DEV >> $seqres.full 2>&1 || \
> + _fail "could not mkfs for $opts"
> +}
> +
> +expect_pass "-r zoned,csum=none" "csum=none"
> +expect_pass "-r zoned,csum=crc32c" "csum=crc32c"
> +expect_pass "-r zoned,csum=crc64" "csum=crc64"
> +expect_pass "-r zoned,csum=crc64,csumbsize=32k" "csum=crc64,csumbsize=32k"
> +expect_pass "-r zoned,csum=crc64,csumbsize=64k" "csum=crc64,csumbsize=64k"
> +
> +status=0
> +exit
> diff --git a/tests/xfs/2306.out b/tests/xfs/2306.out
> new file mode 100644
> index 000000000000..5e79103212ad
> --- /dev/null
> +++ b/tests/xfs/2306.out
> @@ -0,0 +1,20 @@
> +QA output created by 2306
> +Testing csum option without zoned (expect failure)
> +data checksums not supported without zoned mode
> +Testing csumbsize option without zoned (expect failure)
> +RT data csum block size options requires RT data csum type.
> +Testing invalid csum value (expect failure)
> +unknown option -r crc16
> +Testing too small csumbsize (expect failure)
> +Invalid value 1k for -r csumbsize option. Value is too small.
> +Testing non-pow2 csumbsize (expect failure)
> +RT data csum block size of 49152 bytes is not a power of 2
> +Testing too large csumbsize (expect failure)
> +Invalid value 128k for -r csumbsize option. Value is too large.
> +Testing csumbsize < bsize (expect failure)
> +RT data csum block size of 32768 bytes is smaller than fsblock size 65536.
> +Testing csum=none (expect pass)
> +Testing csum=crc32c (expect pass)
> +Testing csum=crc64 (expect pass)
> +Testing csum=crc64,csumbsize=32k (expect pass)
> +Testing csum=crc64,csumbsize=64k (expect pass)
> --
> 2.53.0
>
>
next prev parent reply other threads:[~2026-09-29 1:59 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-24 10:07 xfstests support for RT data checksums Christoph Hellwig
2026-09-24 10:07 ` [PATCH 01/13] add a "datacsum" group Christoph Hellwig
2026-09-29 1:31 ` Darrick J. Wong
2026-10-05 13:17 ` Christoph Hellwig
2026-09-24 10:07 ` [PATCH 02/13] common: add a SCRATCH_MKFS_OPTIONS variable Christoph Hellwig
2026-09-29 1:32 ` Darrick J. Wong
2026-10-05 13:18 ` Christoph Hellwig
2026-09-24 10:07 ` [PATCH 03/13] xfs: add a XFS_VERIFY_FILE_DATA variable Christoph Hellwig
2026-09-29 1:34 ` Darrick J. Wong
2026-09-24 10:07 ` [PATCH 04/13] xfs/206: filter out csum information from mkfs output Christoph Hellwig
2026-09-29 1:34 ` Darrick J. Wong
2026-09-24 10:07 ` [PATCH 05/13] xfs: add a _require_xfs_data_csum helper Christoph Hellwig
2026-09-29 1:38 ` Darrick J. Wong
2026-10-05 13:20 ` Christoph Hellwig
2026-10-05 14:48 ` Darrick J. Wong
2026-10-05 14:55 ` Christoph Hellwig
2026-09-24 10:07 ` [PATCH 06/13] xfs/2301: test lazy bounce buffering mode Christoph Hellwig
2026-09-29 1:42 ` Darrick J. Wong
2026-10-05 13:21 ` Christoph Hellwig
2026-09-24 10:07 ` [PATCH 07/13] xfs/2302: add a basic data checksum test Christoph Hellwig
2026-09-29 1:48 ` Darrick J. Wong
2026-10-05 13:22 ` Christoph Hellwig
2026-09-24 10:07 ` [PATCH 08/13] xfs/2303: test that data checksums detect data misplacement Christoph Hellwig
2026-09-29 1:54 ` Darrick J. Wong
2026-10-05 13:23 ` Christoph Hellwig
2026-09-24 10:07 ` [PATCH 09/13] xfs/2304: version of generic/388 that run xfs_scrub -x for each iteration Christoph Hellwig
2026-09-29 1:56 ` Darrick J. Wong
2026-10-05 13:25 ` Christoph Hellwig
2026-10-05 14:51 ` Darrick J. Wong
2026-10-05 14:56 ` Christoph Hellwig
2026-10-05 15:20 ` Darrick J. Wong
2026-10-07 13:42 ` Christoph Hellwig
2026-10-07 15:19 ` Darrick J. Wong
2026-09-24 10:07 ` [PATCH 10/13] xfs/2305: version of generic/475 " Christoph Hellwig
2026-09-29 1:57 ` Darrick J. Wong
2026-10-05 13:25 ` Christoph Hellwig
2026-09-24 10:07 ` [PATCH 11/13] xfs/2306: test mkfs input validation for RT data csum options Christoph Hellwig
2026-09-29 1:59 ` Darrick J. Wong [this message]
2026-10-05 13:26 ` Christoph Hellwig
2026-09-24 10:07 ` [PATCH 12/13] xfs/2307: test checksum handling using corrupted checksums Christoph Hellwig
2026-09-29 2:05 ` Darrick J. Wong
2026-10-05 13:27 ` Christoph Hellwig
2026-09-24 10:07 ` [PATCH 13/13] xfs/2308: test rebuilding of csum files in xfs_repair Christoph Hellwig
2026-09-29 2:03 ` Darrick J. Wong
2026-10-05 13:27 ` Christoph Hellwig
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=20260929015905.GN2705364@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=hch@lst.de \
--cc=linux-xfs@vger.kernel.org \
--cc=zlang@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.