public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Daniel Wagner <dwagner@suse.de>
To: linux-nvme@lists.infradead.org
Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org,
	Chaitanya Kulkarni <kch@nvidia.com>,
	Shin'ichiro Kawasaki <shinichiro@fastmail.com>,
	Sagi Grimberg <sagi@grimberg.me>, Hannes Reinecke <hare@suse.de>,
	James Smart <jsmart2021@gmail.com>,
	Martin Belanger <Martin.Belanger@dell.com>,
	Daniel Wagner <dwagner@suse.de>
Subject: [PATCH blktests v1 3/3] nvme/{041,042,043,044,045}: Use default hostnqn and hostid
Date: Tue, 20 Jun 2023 15:27:03 +0200	[thread overview]
Message-ID: <20230620132703.20648-4-dwagner@suse.de> (raw)
In-Reply-To: <20230620132703.20648-1-dwagner@suse.de>

The host might have enabled the udev/systemd auto connect feature.
This disturbs the blktests for the fc transport. nvme-cli is able
to distinguish between the different invocations via the --context
option. In order to get this working we have to use the default
hostnqn and hostid and not randon generated IDs for every single
run.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
 tests/nvme/041 | 8 ++------
 tests/nvme/042 | 8 ++------
 tests/nvme/043 | 8 ++------
 tests/nvme/044 | 8 ++------
 tests/nvme/045 | 8 ++------
 5 files changed, 10 insertions(+), 30 deletions(-)

diff --git a/tests/nvme/041 b/tests/nvme/041
index 308655dd6090..5b04b99b128e 100755
--- a/tests/nvme/041
+++ b/tests/nvme/041
@@ -30,12 +30,8 @@ test() {
 
 	echo "Running ${TEST_NAME}"
 
-	hostid="$(uuidgen)"
-	if [ -z "$hostid" ] ; then
-		echo "uuidgen failed"
-		return 1
-	fi
-	hostnqn="nqn.2014-08.org.nvmexpress:uuid:${hostid}"
+	hostid="${def_hostid}"
+	hostnqn="${def_hostnqn}"
 	hostkey="$(nvme gen-dhchap-key -n ${subsys_name} 2> /dev/null)"
 	if [ -z "$hostkey" ] ; then
 		echo "nvme gen-dhchap-key failed"
diff --git a/tests/nvme/042 b/tests/nvme/042
index fed2efead013..8df5ed37aacc 100755
--- a/tests/nvme/042
+++ b/tests/nvme/042
@@ -32,12 +32,8 @@ test() {
 
 	echo "Running ${TEST_NAME}"
 
-	hostid="$(uuidgen)"
-	if [ -z "$hostid" ] ; then
-		echo "uuidgen failed"
-		return 1
-	fi
-	hostnqn="nqn.2014-08.org.nvmexpress:uuid:${hostid}"
+	hostid="${def_hostid}"
+	hostnqn="${def_hostnqn}"
 
 	_setup_nvmet
 
diff --git a/tests/nvme/043 b/tests/nvme/043
index a030884aa4ed..b591e39d0706 100755
--- a/tests/nvme/043
+++ b/tests/nvme/043
@@ -33,12 +33,8 @@ test() {
 
 	echo "Running ${TEST_NAME}"
 
-	hostid="$(uuidgen)"
-	if [ -z "$hostid" ] ; then
-		echo "uuidgen failed"
-		return 1
-	fi
-	hostnqn="nqn.2014-08.org.nvmexpress:uuid:${hostid}"
+	hostid="${def_hostid}"
+	hostnqn="${def_hostnqn}"
 
 	_setup_nvmet
 
diff --git a/tests/nvme/044 b/tests/nvme/044
index 9928bcc55397..fca0897af27b 100755
--- a/tests/nvme/044
+++ b/tests/nvme/044
@@ -32,12 +32,8 @@ test() {
 
 	echo "Running ${TEST_NAME}"
 
-	hostid="$(uuidgen)"
-	if [ -z "$hostid" ] ; then
-		echo "uuidgen failed"
-		return 1
-	fi
-	hostnqn="nqn.2014-08.org.nvmexpress:uuid:${hostid}"
+	hostid="${def_hostid}"
+	hostnqn="${def_hostnqn}"
 
 	hostkey="$(nvme gen-dhchap-key -n ${subsys_name} 2> /dev/null)"
 	if [ -z "$hostkey" ] ; then
diff --git a/tests/nvme/045 b/tests/nvme/045
index 26a55335a92c..eca629a18691 100755
--- a/tests/nvme/045
+++ b/tests/nvme/045
@@ -36,12 +36,8 @@ test() {
 
 	echo "Running ${TEST_NAME}"
 
-	hostid="$(uuidgen)"
-	if [ -z "$hostid" ] ; then
-		echo "uuidgen failed"
-		return 1
-	fi
-	hostnqn="nqn.2014-08.org.nvmexpress:uuid:${hostid}"
+	hostid="${def_hostid}"
+	hostnqn="${def_hostnqn}"
 
 	hostkey="$(nvme gen-dhchap-key -n ${subsys_name} 2> /dev/null)"
 	if [ -z "$hostkey" ] ; then
-- 
2.41.0



  parent reply	other threads:[~2023-06-20 13:27 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-20 13:27 [PATCH blktests v1 0/3] More fixes for FC enabling Daniel Wagner
2023-06-20 13:27 ` [PATCH blktests v1 1/3] nvme/048: Check for queue count check directly Daniel Wagner
2023-06-20 13:49   ` Sagi Grimberg
2023-06-20 17:37     ` Daniel Wagner
2023-06-21  9:50       ` Sagi Grimberg
2023-06-21 11:19         ` Daniel Wagner
2023-06-27 10:13   ` Shinichiro Kawasaki
2023-06-28  5:52     ` Daniel Wagner
2023-06-20 13:27 ` [PATCH blktests v1 2/3] nvme/rc: Avoid triggering host nvme-cli autoconnect Daniel Wagner
2023-06-20 14:07   ` Sagi Grimberg
2023-06-20 17:43     ` Daniel Wagner
2023-06-21  9:02       ` Daniel Wagner
2023-06-27 10:22   ` Shinichiro Kawasaki
2023-06-28  6:09     ` Daniel Wagner
2023-06-28 10:04       ` Shinichiro Kawasaki
2023-06-28 15:00         ` Daniel Wagner
2023-07-06 16:11   ` Max Gurtovoy
2023-07-10  8:27     ` Daniel Wagner
2023-07-10  9:53       ` Max Gurtovoy
2023-07-10 10:19         ` Daniel Wagner
2023-07-10 12:31           ` Max Gurtovoy
2023-07-10 15:03             ` Daniel Wagner
2023-07-10 16:30               ` Max Gurtovoy
2023-07-12 12:04                 ` Daniel Wagner
2023-07-13  0:12                   ` Max Gurtovoy
2023-07-13  6:00                     ` Hannes Reinecke
2023-07-13  8:49                       ` Max Gurtovoy
2023-07-13 10:14                         ` Hannes Reinecke
2023-07-13 10:30                           ` Daniel Wagner
2023-07-13 10:44                             ` Daniel Wagner
2023-07-13 10:50                               ` Max Gurtovoy
2023-06-20 13:27 ` Daniel Wagner [this message]
2023-06-27 10:24   ` [PATCH blktests v1 3/3] nvme/{041,042,043,044,045}: Use default hostnqn and hostid Shinichiro Kawasaki
2023-07-06 16:06   ` Max Gurtovoy
2023-07-10  8:32     ` 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=20230620132703.20648-4-dwagner@suse.de \
    --to=dwagner@suse.de \
    --cc=Martin.Belanger@dell.com \
    --cc=hare@suse.de \
    --cc=jsmart2021@gmail.com \
    --cc=kch@nvidia.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    --cc=shinichiro@fastmail.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