public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>
To: "hch@infradead.org" <hch@infradead.org>
Cc: Daniel Wagner <dwagner@suse.de>,
	Stephen Zhang <starzhangzsd@gmail.com>,
	Kent Overstreet <kent.overstreet@linux.dev>,
	Coly Li <colyli@fnnas.com>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	"linux-bcache@vger.kernel.org" <linux-bcache@vger.kernel.org>
Subject: Re: [PATCH blktests] bcache: add bcache/001
Date: Thu, 22 Jan 2026 09:13:27 +0000	[thread overview]
Message-ID: <aXHbPWCf5SfycpBX@shinmob> (raw)
In-Reply-To: <aXHFIM-8HrO-8cCO@infradead.org>

On Jan 21, 2026 / 22:35, Christoph Hellwig wrote:
> On Wed, Jan 21, 2026 at 01:48:27PM +0100, Daniel Wagner wrote:
> > Sure, I'll update the documentation.
> > 
> > On this note, It took me a while to understand that using
> > TEST_DEVS="/dev/nvme0n1 /dev/vdb /dev/vdc" is not populating the
> > TEST_DEV_ARRAY array.
> > 
> > Commit 653ace845911 ("check, new: introduce test_device_array()")
> > explains why:
> > 
> >     As to the test target devices defined in TEST_DEVS variable, blktests
> >     assumes that each test case with test_device() function is run for each
> >     single device defined in TEST_DEVS. On the other hand, it is suggested
> >     to support a test case for not a single device but multiple devices.
> > 
> > Maybe we could add a default config with all options listed and
> > documented but commented out.
> 
> The default config would be useful for sure.

Agreed. It can be the file named "config.example".

> But I also thing the TEST_DEVS vs TEST_DEV_ARRAY thing is weird, and the
> fact that you need to declare the array for multiple tests doesn't help.
> 
> IMHO having a TEST_DEV_ARRAY should imply that normal single device tests
> pick the first one from it if not explicit TEST_DEVS is set, and tests
> using multiple devices can grab as many as they support from it.  That
> would mirror what SCRATCH_DEV_POOL does in xfstests, which works very
> well.
> 
> I'd love to help with this, but I'm not sure my bash abilities are
> enough for this :(

When I introduced TEST_DEV_ARRAY, the motivation was the test case md/003. It
was the first test case that required multiple devices for testing. It tests
"NMVe Atomic Writes with MD devices". My assumption was that users wants to
specify test target devices unique to md/003 which are different devices from
other test cases (special NVMe with atomic write capability). Based on this
understanding, I introduced the associative array config option
TEST_CASE_DEV_ARRAY[X/0??]="/dev/Y /dev/Z", which can specify test target
devices unique to each test case (or multiple test cases specified with regular
expression). I think this TEST_CASE_DEV_ARRAY fits the use case of md/003.

On the other hand, reading the comment above, I find there is another different
expectation for testing with multiple devices. As to bcache/* test cases, the
test target devices can be common to other test groups. I can understand that
something similar as SCRATCH_DEV_POOL of fstests is desired to reduce the number
of config options to specify. We maybe able to introduce the new config option
"TEST_DEV_POOL", which will work as described above: for most of the test
cases with test_device() function, blktests can pick up only the first device
from TEST_DEV_POOL. If the test case has test_device_array(), all devices in
TEST_DEV_POOL can be provided to test_device_array() through TEST_DEV_ARRAY.
The user can specify only TEST_DEV_POOL, to cover both test cases with
test_device() and those with test_device_array().

I will try to find my time to prototype TEST_DEV_POOL to see if the expectation
can be fulfilled.

  reply	other threads:[~2026-01-22  9:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-20 13:28 [PATCH blktests] bcache: add bcache/001 Daniel Wagner
2026-01-21  7:56 ` Christoph Hellwig
2026-01-21 12:48   ` Daniel Wagner
2026-01-22  6:35     ` Christoph Hellwig
2026-01-22  9:13       ` Shinichiro Kawasaki [this message]
2026-01-21  8:19 ` Johannes Thumshirn
2026-01-21 12:36   ` Daniel Wagner

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=aXHbPWCf5SfycpBX@shinmob \
    --to=shinichiro.kawasaki@wdc.com \
    --cc=colyli@fnnas.com \
    --cc=dwagner@suse.de \
    --cc=hch@infradead.org \
    --cc=kent.overstreet@linux.dev \
    --cc=linux-bcache@vger.kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=starzhangzsd@gmail.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