linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Logan Gunthorpe <logang@deltatee.com>
To: Sagi Grimberg <sagi@grimberg.me>,
	linux-nvme@lists.infradead.org, linux-block@vger.kernel.org,
	Omar Sandoval <osandov@osandov.com>
Cc: Keith Busch <kbusch@kernel.org>,
	Bart Van Assche <bvanassche@acm.org>,
	Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com>,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH v4 2/7] nvme: consolidate some nvme-cli utility functions
Date: Fri, 14 Aug 2020 10:12:51 -0600	[thread overview]
Message-ID: <4523fcf6-bed3-a3b7-11b5-6246b4d63765@deltatee.com> (raw)
In-Reply-To: <20200814061815.536540-3-sagi@grimberg.me>



On 2020-08-14 12:18 a.m., Sagi Grimberg wrote:
> diff --git a/tests/nvme/004 b/tests/nvme/004
> index b841a8d4cd87..7ea539fda55e 100755
> --- a/tests/nvme/004
> +++ b/tests/nvme/004
> @@ -33,14 +33,14 @@ test() {
>  		"91fdba0d-f87b-4c25-b80f-db7be1418b9e"
>  	_add_nvmet_subsys_to_port "${port}" "blktests-subsystem-1"
>  
> -	nvme connect -t loop -n blktests-subsystem-1
> +	_nvme_connect_subsys "loop" "blktests-subsystem-1"

A bit of a nit, but the quotes around "loop" are unnecessary here and in
a bunch of other places.

> @@ -97,6 +97,33 @@ _setup_nvmet() {
>  	modprobe nvme-loop
>  }
>  
> +_nvme_disconnect_ctrl() {
> +	local ctrl="$1"
> +
> +	nvme disconnect -d ${ctrl}> +}
> +
> +_nvme_disconnect_subsys() {
> +	local subsysnqn="$1"
> +
> +	nvme disconnect -n ${subsysnqn}
> +}

Missing quotes around ctrl and subsysnqn.

> +
> +_nvme_connect_subsys() {
> +	local trtype="$1"
> +	local subsysnqn="$2"
> +
> +	cmd="nvme connect -t ${trtype} -n ${subsysnqn}"
> +	eval $cmd
> +}

I still don't understand why we are using eval here.  There are no
quotes round trtpe and subsysnqn and because of eval they need to be
doubled...

  reply	other threads:[~2020-08-14 16:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-14  6:18 [PATCH v4 0/7] blktests: Add support to run nvme tests with tcp/rdma transports Sagi Grimberg
2020-08-14  6:18 ` [PATCH v4 1/7] nvme: consolidate nvme requirements based on transport type Sagi Grimberg
2020-08-14  6:18 ` [PATCH v4 2/7] nvme: consolidate some nvme-cli utility functions Sagi Grimberg
2020-08-14 16:12   ` Logan Gunthorpe [this message]
2020-08-14  6:18 ` [PATCH v4 3/7] nvme: make tests transport type agnostic Sagi Grimberg
2020-08-14 16:24   ` Logan Gunthorpe
2020-08-14  6:18 ` [PATCH v4 4/7] tests/nvme: restrict tests to specific transports Sagi Grimberg
2020-08-14  6:18 ` [PATCH v4 5/7] nvme: support nvme-tcp when runinng tests Sagi Grimberg
2020-08-14  6:18 ` [PATCH v4 6/7] common: move module_unload to common Sagi Grimberg
2020-08-14  6:18 ` [PATCH v4 7/7] nvme: support rdma transport type Sagi Grimberg
2020-08-14 10:49   ` Yi Zhang
2020-08-14 15:45     ` Yi Zhang
2020-08-14 20:45       ` Sagi Grimberg
2020-08-14 20:44     ` Sagi Grimberg

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=4523fcf6-bed3-a3b7-11b5-6246b4d63765@deltatee.com \
    --to=logang@deltatee.com \
    --cc=Chaitanya.Kulkarni@wdc.com \
    --cc=bvanassche@acm.org \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=osandov@osandov.com \
    --cc=sagi@grimberg.me \
    /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;
as well as URLs for NNTP newsgroup(s).