From: Martin Wilck <mwilck@suse.com>
To: Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Cc: Nilay Shroff <nilay@linux.ibm.com>,
Daniel Wagner <dwagner@suse.de>,
Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com>,
Hannes Reinecke <hare@suse.de>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>
Subject: Re: [PATCH v2 3/3] nvme: add test for controller rescan under I/O load
Date: Tue, 03 Sep 2024 17:07:19 +0200 [thread overview]
Message-ID: <2cf0066ad278cfa740d8c50f604ca686b0e3cfae.camel@suse.com> (raw)
In-Reply-To: <vq34kiz6wkjmea6z2p2amqcypixattafudkjmiqh63atmsh2e7@tgz7tjdcvlbu>
On Tue, 2024-09-03 at 00:16 +0000, Shinichiro Kawasaki wrote:
> On Sep 02, 2024 / 15:53, Martin Wilck wrote:
> > On Thu, 2024-08-29 at 07:36 +0000, Shinichiro Kawasaki wrote:
> >
> >
> > > Shellcheck reports a warning here:
> > >
> > > tests/nvme/053:47:9: warning: Prefer mapfile or read -a to
> > > split
> > > command output (or quote to avoid splitting). [SC2207]
> > >
> > > It is a bit lengthy, but let's replace the line above with this:
> > >
> > > while read -r line ; do ctrls+=("$line"); done <
> > > <(_nvme_get_ctrl_list)
> >
> > Thanks for the review. If you don't mind, I'll just use "mapfile -
> > t",
> > as suggested by shellcheck.
>
> The reason I did not suggest the "mapfile -t" solution was that
> SC2207
> recommends it for bash versions 4.4+ [1]. On the other hand, blktests
> README.md
> requires bash version >= 4.2. So I assume that some blktests users
> use bash
> version 4.2 or 4.3. I took a glance in the bash change history [2],
> and there
> are some mpafile related bug fixes between bash version v4.2 an v4.4.
> So I think
> it's the better to not use "mpafile -t" in blktests.
Sorry, I forgot the requirement to be compatible with bash 4.2.
> Do you have any specific reason to use "mapfile -t"?
Just the fact that the code looks simpler and more elegant.
Side note: as we know that _nvme_get_ctrl_list() prints paths from
sysfs, and that these won't contain spaces or glob characters, we might
as well just ignore SC2207 here.
Anyway, I agree that it's better to be on the safe side.
I'll send a new version.
Thanks,
Martin
next prev parent reply other threads:[~2024-09-03 15:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-23 20:08 [PATCH v2 1/3] blktests: nvme: skip passthru tests on multipath devices Martin Wilck
2024-08-23 20:08 ` [PATCH v2 2/3] blktests: nvme/032: skip on non-PCI devices Martin Wilck
2024-08-23 20:08 ` [PATCH v2 3/3] nvme: add test for controller rescan under I/O load Martin Wilck
2024-08-26 5:37 ` Nilay Shroff
2024-08-26 7:58 ` Martin Wilck
2024-08-29 7:36 ` Shinichiro Kawasaki
2024-09-02 13:53 ` Martin Wilck
2024-09-03 0:16 ` Shinichiro Kawasaki
2024-09-03 15:07 ` Martin Wilck [this message]
2024-08-29 7:40 ` [PATCH v2 1/3] blktests: nvme: skip passthru tests on multipath devices 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=2cf0066ad278cfa740d8c50f604ca686b0e3cfae.camel@suse.com \
--to=mwilck@suse.com \
--cc=Chaitanya.Kulkarni@wdc.com \
--cc=dwagner@suse.de \
--cc=hare@suse.de \
--cc=linux-block@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=nilay@linux.ibm.com \
--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