Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Wagner <dwagner@suse.de>
To: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Cc: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org,
	Chaitanya Kulkarni <chaitanyak@nvidia.com>,
	Hannes Reinecke <hare@suse.de>, Daniel Wagner <dwagner@suse.de>
Subject: [PATCH blktests v1 06/18] nvme/rc: use long command line option for nvme
Date: Thu, 21 Mar 2024 10:47:15 +0100	[thread overview]
Message-ID: <20240321094727.6503-7-dwagner@suse.de> (raw)
In-Reply-To: <20240321094727.6503-1-dwagner@suse.de>

The long format of the command line option are more descriptive and more
likely to stay stable.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
 tests/nvme/rc | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/tests/nvme/rc b/tests/nvme/rc
index 0b4c88c37f6c..f8bbad873a5f 100644
--- a/tests/nvme/rc
+++ b/tests/nvme/rc
@@ -148,7 +148,7 @@ _require_nvme_trtype_is_fabrics() {
 }
 
 _require_nvme_cli_auth() {
-	if ! nvme gen-dhchap-key -n nvmf-test-subsys > /dev/null 2>&1 ; then
+	if ! nvme gen-dhchap-key --nqn nvmf-test-subsys > /dev/null 2>&1 ; then
 		SKIP_REASONS+=("nvme gen-dhchap-key command missing")
 		return 1
 	fi
@@ -396,13 +396,13 @@ _setup_nvmet() {
 _nvme_disconnect_ctrl() {
 	local ctrl="$1"
 
-	nvme disconnect -d "${ctrl}"
+	nvme disconnect --device "${ctrl}"
 }
 
 _nvme_disconnect_subsys() {
 	local subsysnqn="$1"
 
-	nvme disconnect -n "${subsysnqn}" |& tee -a "$FULL" |
+	nvme disconnect --nqn "${subsysnqn}" |& tee -a "$FULL" |
 		grep -o "disconnected.*"
 }
 
@@ -496,11 +496,11 @@ _nvme_connect_subsys() {
 	trtype="$1"
 	subsysnqn="$2"
 
-	ARGS=(-t "${trtype}" -n "${subsysnqn}")
+	ARGS=(--transport "${trtype}" --nqn "${subsysnqn}")
 	if [[ "${trtype}" == "fc" ]] ; then
-		ARGS+=(-a "${traddr}" -w "${host_traddr}")
+		ARGS+=(--traddr "${traddr}" --host-traddr "${host_traddr}")
 	elif [[ "${trtype}" != "loop" ]]; then
-		ARGS+=(-a "${traddr}" -s "${trsvcid}")
+		ARGS+=(--traddr "${traddr}" --trsvcid "${trsvcid}")
 	fi
 	ARGS+=(--hostnqn="${hostnqn}")
 	ARGS+=(--hostid="${hostid}")
@@ -565,13 +565,13 @@ _nvme_discover() {
 	local host_traddr="${3:-$def_host_traddr}"
 	local trsvcid="${3:-$def_trsvcid}"
 
-	ARGS=(-t "${trtype}")
+	ARGS=(--transport "${trtype}")
 	ARGS+=(--hostnqn="${def_hostnqn}")
 	ARGS+=(--hostid="${def_hostid}")
 	if [[ "${trtype}" = "fc" ]]; then
-		ARGS+=(-a "${traddr}" -w "${host_traddr}")
+		ARGS+=(--traddr "${traddr}" --host-traddr "${host_traddr}")
 	elif [[ "${trtype}" != "loop" ]]; then
-		ARGS+=(-a "${traddr}" -s "${trsvcid}")
+		ARGS+=(--traddr "${traddr}" --trsvcid "${trsvcid}")
 	fi
 	nvme discover "${ARGS[@]}"
 }
-- 
2.44.0



  parent reply	other threads:[~2024-03-21 11:02 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-21  9:47 [PATCH blktests v1 00/18] refactoring and various cleanups/fixes Daniel Wagner
2024-03-21  9:47 ` [PATCH blktests v1 01/18] nvme/rc: silence error on module unload for fc Daniel Wagner
2024-03-21  9:47 ` [PATCH blktests v1 02/18] nvme/rc: silence fcloop cleanup failures Daniel Wagner
2024-03-21  9:57   ` Daniel Wagner
2024-03-22  9:14     ` Shinichiro Kawasaki
2024-03-21  9:47 ` [PATCH blktests v1 03/18] nvme/rc: log error if stale configuration is found Daniel Wagner
2024-03-21  9:47 ` [PATCH blktests v1 04/18] common/xfs: propagate errors from _xfs_run_fio_verify_io Daniel Wagner
2024-03-21  9:47 ` [PATCH blktests v1 05/18] nvme/{012,013,035}: check return value of _xfs_run_fio_verify_io Daniel Wagner
2024-03-21  9:47 ` Daniel Wagner [this message]
2024-03-21  9:47 ` [PATCH blktests v1 07/18] nvme/{014,015,018,019,020,023,024,026,045,046}: use long command line option for nvme Daniel Wagner
2024-03-21  9:47 ` [PATCH blktests v1 08/18] nvme/rc: connect subsys only support long options Daniel Wagner
2024-03-21  9:47 ` [PATCH blktests v1 09/18] nvme/rc: add nqn/uuid args to target setup/cleanup helper Daniel Wagner
2024-03-22  9:17   ` Shinichiro Kawasaki
2024-03-21  9:47 ` [PATCH blktests v1 10/18] nvme/rc: remove unused connect options Daniel Wagner
2024-03-21  9:47 ` [PATCH blktests v1 11/18] nvme/rc: remove correct port from target Daniel Wagner
2024-03-22  9:19   ` Shinichiro Kawasaki
2024-03-21  9:47 ` [PATCH blktests v1 12/18] nvme/031: do not open code target setup/cleanup Daniel Wagner
2024-03-21  9:47 ` [PATCH blktests v1 13/18] nvme/{rc,031}: do not cleanup external managed loop device Daniel Wagner
2024-03-22  9:21   ` Shinichiro Kawasaki
2024-03-21  9:47 ` [PATCH blktests v1 14/18] nvme: drop default trtype argument for _nvmet_connect_subsys Daniel Wagner
2024-03-22  9:23   ` Shinichiro Kawasaki
2024-03-21  9:47 ` [PATCH blktests v1 15/18] nvme: drop default subsysnqn argument from _nvme_{connect|disconnect}_subsys Daniel Wagner
2024-03-22  9:26   ` Shinichiro Kawasaki
2024-03-21  9:47 ` [PATCH blktests v1 16/18] nvme/{041,042,043,044,045,048}: do not pass default host{nqn|id} to _nvme_connect_subsys Daniel Wagner
2024-03-21  9:47 ` [PATCH blktests v1 17/18] nvme: don't assume namespace id Daniel Wagner
2024-03-21 10:19   ` Daniel Wagner
2024-03-22  9:35   ` Shinichiro Kawasaki
2024-03-22 12:34     ` Daniel Wagner
2024-03-21  9:47 ` [PATCH blktests v1 18/18] nvme/028: drop unused nvmedev Daniel Wagner
2024-03-22  9:38 ` [PATCH blktests v1 00/18] refactoring and various cleanups/fixes Shinichiro Kawasaki
2024-03-22 12:35   ` 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=20240321094727.6503-7-dwagner@suse.de \
    --to=dwagner@suse.de \
    --cc=chaitanyak@nvidia.com \
    --cc=hare@suse.de \
    --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