All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Wagner <dwagner@suse.de>
To: Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Cc: Chaitanya Kulkarni <chaitanyak@nvidia.com>,
	Keith Busch <kbusch@kernel.org>,
	linux-block@vger.kernel.org, linux-nvme@lists.infradead.org,
	Daniel Wagner <dwagner@suse.de>
Subject: [PATCH blktests v1 1/2] nvme/rc: add reconnect-delay argument only for fabrics transports
Date: Mon,  4 Mar 2024 17:13:02 +0100	[thread overview]
Message-ID: <20240304161303.19681-2-dwagner@suse.de> (raw)
In-Reply-To: <20240304161303.19681-1-dwagner@suse.de>

The loop transport is also considered a fabric transport. But not
connect options are supported, in particular the reconnect-delay option.

nvme-cli can't figure this out as the kernel reports the option support
for all transports (union). Thus, we have to filter out this option for
this loop transport in blktests.

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

diff --git a/tests/nvme/rc b/tests/nvme/rc
index 2d6ebeab2f6f..5facbe8f2d2f 100644
--- a/tests/nvme/rc
+++ b/tests/nvme/rc
@@ -122,13 +122,25 @@ _require_nvme_test_img_size() {
 	return 0
 }
 
-_require_nvme_trtype() {
+_is_nvme_trtype() {
 	local trtype
+
 	for trtype in "$@"; do
 		if [[ "${nvme_trtype}" == "$trtype" ]]; then
 			return 0
 		fi
 	done
+
+	return 1
+}
+
+_require_nvme_trtype() {
+	local trtype
+
+	if _is_nvme_trtype "$@"; then
+		return 0
+	fi
+
 	SKIP_REASONS+=("nvme_trtype=${nvme_trtype} is not supported in this test")
 	return 1
 }
@@ -513,7 +525,8 @@ _nvme_connect_subsys() {
 	if [[ -n "${keep_alive_tmo}" ]]; then
 		ARGS+=(--keep-alive-tmo="${keep_alive_tmo}")
 	fi
-	if [[ -n "${reconnect_delay}" ]]; then
+	if ! _is_nvme_trtype loop &&
+	   [[ -n "${reconnect_delay}" ]]; then
 		ARGS+=(--reconnect-delay="${reconnect_delay}")
 	fi
 	if [[ -n "${ctrl_loss_tmo}" ]]; then
-- 
2.44.0


  reply	other threads:[~2024-03-04 16:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-04 16:13 [PATCH blktests v1 0/2] extend nvme/045 to reconnect with invalid key Daniel Wagner
2024-03-04 16:13 ` Daniel Wagner [this message]
2024-03-04 16:13 ` [PATCH blktests v1 2/2] nvme/048: add reconnect after ctrl key change Daniel Wagner
2024-03-05  9:38   ` Shinichiro Kawasaki
2024-03-05 11:08     ` Daniel Wagner
2024-03-05  9:44 ` [PATCH blktests v1 0/2] extend nvme/045 to reconnect with invalid key Shinichiro Kawasaki
2024-03-05 11:18   ` Daniel Wagner
2024-03-06  8:44     ` Shinichiro Kawasaki
2024-03-06  9:36       ` Daniel Wagner
2024-03-06 11:28         ` 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=20240304161303.19681-2-dwagner@suse.de \
    --to=dwagner@suse.de \
    --cc=chaitanyak@nvidia.com \
    --cc=kbusch@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.