Linux block layer
 help / color / mirror / Atom feed
From: John Garry <john.g.garry@oracle.com>
To: Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Cc: "linux-block@vger.kernel.org" <linux-block@vger.kernel.org>
Subject: Re: [PATCH blktests 4/7] md/003: add NVMe atomic write tests for stacked devices
Date: Thu, 18 Sep 2025 08:44:18 +0100	[thread overview]
Message-ID: <eaeacc53-c476-443b-b724-15b0067f771c@oracle.com> (raw)
In-Reply-To: <jp7exzjz55humms5qayfgvy6eu2eiu6kwpqs6la34cq76nu2ii@n5bgakd4ll2v>

On 18/09/2025 05:27, Shinichiro Kawasaki wrote:
> On Sep 12, 2025 / 09:57, John Garry wrote:
>> md/002 only tests SCSI via scsi_debug.
>>
>> It is also useful to test NVMe, so add a specific test for that.
>>
>> The results for 002 and 003 should be the same, so link them.
>>
>> _md_atomics_test requires 4x devices with atomics support, so check for
>> that.
>>
>> Signed-off-by: John Garry <john.g.garry@oracle.com>
> [...]
>> diff --git a/tests/md/003 b/tests/md/003
>> new file mode 100755
>> index 0000000..8128f8d
>> --- /dev/null
>> +++ b/tests/md/003
>> @@ -0,0 +1,51 @@
>> +#!/bin/bash
>> +# SPDX-License-Identifier: GPL-3.0+
>> +# Copyright (C) 2025 Oracle and/or its affiliates
>> +#
>> +# Test NMVe Atomic Writes with MD devices
>> +
>> +. tests/nvme/rc
> 
> It is not recommended to introduce dependencies across tests/* groups. If you
> need some nvme related helper functions, they should be placed not in
> tests/nvme/rc but in common/nvme.
> 
> IIUC, tests/nvme/rc is required to call _nvme_requries() in requries(), but I
> think _nvme_requires() is too much for this test case. 

I thought that we would need _nvme_requries() for ensuring that we have 
the appropriate driver, i.e. the nvme core driver

> I gueess it is enough to
> call _require_test_dev_is_nvme() from device_requires() in md/003.
> To do that, I
> suggest to add another preparation patch which moves _require_test_dev_is_nvme()
> from tests/nvme/rc to common/nvme. (This comment assumes the test_device_array()
> support series.)

ok

> 
>> +. common/xfs
>> +
>> +DESCRIPTION="test md atomic writes for NVMe drives"
>> +QUICK=1
>> +
>> +requires() {
>> +	_nvme_requires
>> +}
>> +
>> +test() {
>> +	local ns
>> +	local testdev_count=0
>> +	declare -A NVME_TEST_DEVS
>> +	declare -A NVME_TEST_DEVS_NAME
>> +	declare -A NVME_TEST_DEVS_SYSFS
>> +
>> +	echo "Running md_atomics_test"
>> +
>> +	for i in "${!TEST_DEV_SYSFS_DIRS[@]}"; do
>> +		TEST_DEV=${TEST_DEV_SYSFS_DIRS[$i]}
>> +		if readlink -f "$TEST_DEV" | grep -q nvme; then
> 
> If _require_test_dev_is_nvme() is called from device_requires(), the check
> above will not be required.

ok, sure

thanks,
John

  reply	other threads:[~2025-09-18  7:44 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-12  9:57 [PATCH blktests 0/7] Further stacked device atomic writes testing John Garry
2025-09-12  9:57 ` [PATCH blktests 1/7] common/rc: add _min() John Garry
2025-09-18  4:08   ` Shinichiro Kawasaki
2025-09-18  7:33     ` John Garry
2025-09-12  9:57 ` [PATCH blktests 2/7] md/rc: add _md_atomics_test John Garry
2025-09-18  4:17   ` Shinichiro Kawasaki
2025-09-18  7:36     ` John Garry
2025-09-12  9:57 ` [PATCH blktests 3/7] md/002: convert to use _md_atomics_test John Garry
2025-09-12  9:57 ` [PATCH blktests 4/7] md/003: add NVMe atomic write tests for stacked devices John Garry
2025-09-18  4:27   ` Shinichiro Kawasaki
2025-09-18  7:44     ` John Garry [this message]
2025-09-12  9:57 ` [PATCH blktests 5/7] md/rc: test atomic writes for dm-linear John Garry
2025-09-12  9:57 ` [PATCH blktests 6/7] md/rc: test atomic writes for dm-stripe John Garry
2025-09-12  9:57 ` [PATCH blktests 7/7] md/rc: test atomic writes for dm-mirror John Garry
2025-09-16  8:55 ` [PATCH blktests 0/7] Further stacked device atomic writes testing Shinichiro Kawasaki
2025-09-16 10:20   ` John Garry
2025-09-16 11:55     ` John Garry
2025-09-16 12:23       ` Shinichiro Kawasaki
2025-09-16 12:27         ` John Garry
2025-09-17 12:02           ` Shinichiro Kawasaki
2025-09-17 13:12             ` John Garry
2025-09-17 16:22               ` John Garry
2025-09-18  4:36                 ` Shinichiro Kawasaki
2025-09-18  7:48                   ` John Garry
2025-09-18 10:37                     ` Shinichiro Kawasaki

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=eaeacc53-c476-443b-b724-15b0067f771c@oracle.com \
    --to=john.g.garry@oracle.com \
    --cc=linux-block@vger.kernel.org \
    --cc=shinichiro.kawasaki@wdc.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