From: "Yang Xu (Fujitsu)" <xuyang2018.jy@fujitsu.com>
To: Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Cc: "linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>
Subject: Re: [PATCH blktests] nvme/{016,017}: use _check_genctr instead of _filter_discovery
Date: Wed, 31 May 2023 05:40:32 +0000 [thread overview]
Message-ID: <46f93bc9-e657-4a14-4b0f-2588fec31a4a@fujitsu.com> (raw)
In-Reply-To: <6fbgjc5ykve3jyko4vlzudrnwueou4ehgn6n2dtihjko3qv7ww@sqlyuxx4ijt5>
on 2023/05/31 13:36, Shinichiro Kawasaki wrote:
> CC+: linux-nvme
>
> On May 31, 2023 / 09:07, Yang Xu wrote:
>> Since commit 328943e3 ("Update tests for discovery log page changes"),
>> blktests also include the discovery subsystem itself. But it
>> will lead these cases fails on older nvme-cli system.
>
> Thanks for this report. What is the nvme-cli version with the issue?
I used nvme-cli-1.16-7.el8.x86_64.
Best Regards
Yang Xu
>
>>
>> To avoid this, like nvme/002, use _check_genctr to check instead of
>> comparing many discovery Log Entry output.
>>
>> Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
>
> The change looks fine to me, but I'd wait for comments by nvme developers.
>
>> ---
>> tests/nvme/016 | 4 +++-
>> tests/nvme/016.out | 7 -------
>> tests/nvme/017 | 5 ++++-
>> tests/nvme/017.out | 7 -------
>> 4 files changed, 7 insertions(+), 16 deletions(-)
>>
>> diff --git a/tests/nvme/016 b/tests/nvme/016
>> index c0c31a5..f617cf1 100755
>> --- a/tests/nvme/016
>> +++ b/tests/nvme/016
>> @@ -24,6 +24,7 @@ test() {
>> _setup_nvmet
>>
>> loop_dev="$(losetup -f)"
>> + local genctr=1
>>
>> _create_nvmet_subsystem "${subsys_nqn}" "${loop_dev}"
>>
>> @@ -34,7 +35,8 @@ test() {
>> port="$(_create_nvmet_port "${nvme_trtype}")"
>> _add_nvmet_subsys_to_port "$port" "${subsys_nqn}"
>>
>> - _nvme_discover loop | _filter_discovery
>> + genctr=$(_check_genctr "${genctr}" "adding a subsystem to a port")
>> +
>> _remove_nvmet_subsystem_from_port "${port}" "${subsys_nqn}"
>> _remove_nvmet_port "${port}"
>>
>> diff --git a/tests/nvme/016.out b/tests/nvme/016.out
>> index ee631a4..fd244d5 100644
>> --- a/tests/nvme/016.out
>> +++ b/tests/nvme/016.out
>> @@ -1,9 +1,2 @@
>> Running nvme/016
>> -Discovery Log Number of Records 2, Generation counter X
>> -=====Discovery Log Entry 0======
>> -trtype: loop
>> -subnqn: nqn.2014-08.org.nvmexpress.discovery
>> -=====Discovery Log Entry 1======
>> -trtype: loop
>> -subnqn: blktests-subsystem-1
>> Test complete
>> diff --git a/tests/nvme/017 b/tests/nvme/017
>> index e167450..3dbb7c1 100755
>> --- a/tests/nvme/017
>> +++ b/tests/nvme/017
>> @@ -27,6 +27,8 @@ test() {
>>
>> truncate -s "${nvme_img_size}" "${file_path}"
>>
>> + local genctr=1
>> +
>> _create_nvmet_subsystem "${subsys_name}" "${file_path}" \
>> "91fdba0d-f87b-4c25-b80f-db7be1418b9e"
>>
>> @@ -37,7 +39,8 @@ test() {
>> port="$(_create_nvmet_port "${nvme_trtype}")"
>> _add_nvmet_subsys_to_port "${port}" "${subsys_name}"
>>
>> - _nvme_discover loop | _filter_discovery
>> + genctr=$(_check_genctr "${genctr}" "adding a subsystem to a port")
>> +
>> _remove_nvmet_subsystem_from_port "${port}" "${subsys_name}"
>> _remove_nvmet_port "${port}"
>>
>> diff --git a/tests/nvme/017.out b/tests/nvme/017.out
>> index 12787f7..6ce9a80 100644
>> --- a/tests/nvme/017.out
>> +++ b/tests/nvme/017.out
>> @@ -1,9 +1,2 @@
>> Running nvme/017
>> -Discovery Log Number of Records 2, Generation counter X
>> -=====Discovery Log Entry 0======
>> -trtype: loop
>> -subnqn: nqn.2014-08.org.nvmexpress.discovery
>> -=====Discovery Log Entry 1======
>> -trtype: loop
>> -subnqn: blktests-subsystem-1
>> Test complete
>> --
>> 2.39.1
next prev parent reply other threads:[~2023-05-31 5:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1685495221-4598-1-git-send-email-xuyang2018.jy@fujitsu.com>
2023-05-31 5:36 ` [PATCH blktests] nvme/{016,017}: use _check_genctr instead of _filter_discovery Shinichiro Kawasaki
2023-05-31 5:40 ` Yang Xu (Fujitsu) [this message]
2023-05-31 7:50 ` Shinichiro Kawasaki
2023-06-05 23:18 ` Sagi Grimberg
2023-06-06 3:20 ` Chaitanya Kulkarni
2023-06-06 5:14 ` Shinichiro Kawasaki
2023-06-06 5:22 ` Yang Xu (Fujitsu)
2023-06-06 6:45 ` Sagi Grimberg
2023-06-07 2:14 ` Shinichiro Kawasaki
2023-06-07 3:35 ` Chaitanya Kulkarni
2023-06-07 8:04 ` 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=46f93bc9-e657-4a14-4b0f-2588fec31a4a@fujitsu.com \
--to=xuyang2018.jy@fujitsu.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-nvme@lists.infradead.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