From: Yi Zhang <yi.zhang@redhat.com>
To: shinichiro.kawasaki@wdc.com
Cc: linux-block@vger.kernel.org, hch@infradead.org,
Hannes Reinecke <hare@suse.de>
Subject: [PATCH V2 blktests] tests/nvme: set hostnqn after hostid uuidgen
Date: Tue, 18 Oct 2022 21:17:58 +0800 [thread overview]
Message-ID: <20221018131758.763311-1-yi.zhang@redhat.com> (raw)
hostid will not be appended to hostnqn as it was generated after set
hostnqn, so let's set hostnqn after hostid generated.
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Yi Zhang <yi.zhang@redhat.com>
---
tests/nvme/041 | 3 ++-
tests/nvme/042 | 3 ++-
tests/nvme/043 | 3 ++-
tests/nvme/044 | 3 ++-
tests/nvme/045 | 3 ++-
5 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/tests/nvme/041 b/tests/nvme/041
index 98c443e..b311229 100755
--- a/tests/nvme/041
+++ b/tests/nvme/041
@@ -23,7 +23,7 @@ test() {
local port
local subsys_name="blktests-subsystem-1"
local hostid
- local hostnqn="nqn.2014-08.org.nvmexpress:uuid:${hostid}"
+ local hostnqn
local file_path="${TMPDIR}/img"
local hostkey
local ctrldev
@@ -35,6 +35,7 @@ test() {
echo "uuidgen failed"
return 1
fi
+ hostnqn="nqn.2014-08.org.nvmexpress:uuid:${hostid}"
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 06e5d3d..30a638d 100755
--- a/tests/nvme/042
+++ b/tests/nvme/042
@@ -23,7 +23,7 @@ test() {
local port
local subsys_name="blktests-subsystem-1"
local hostid
- local hostnqn="nqn.2014-08.org.nvmexpress:uuid:${hostid}"
+ local hostnqn
local file_path="${TMPDIR}/img"
local hmac
local key_len
@@ -37,6 +37,7 @@ test() {
echo "uuidgen failed"
return 1
fi
+ hostnqn="nqn.2014-08.org.nvmexpress:uuid:${hostid}"
_setup_nvmet
diff --git a/tests/nvme/043 b/tests/nvme/043
index 87273e5..84e1666 100755
--- a/tests/nvme/043
+++ b/tests/nvme/043
@@ -24,7 +24,7 @@ test() {
local port
local subsys_name="blktests-subsystem-1"
local hostid
- local hostnqn="nqn.2014-08.org.nvmexpress:uuid:${hostid}"
+ local hostnqn
local file_path="${TMPDIR}/img"
local hash
local dhgroup
@@ -38,6 +38,7 @@ test() {
echo "uuidgen failed"
return 1
fi
+ hostnqn="nqn.2014-08.org.nvmexpress:uuid:${hostid}"
_setup_nvmet
diff --git a/tests/nvme/044 b/tests/nvme/044
index 1301965..0eb36cc 100755
--- a/tests/nvme/044
+++ b/tests/nvme/044
@@ -24,7 +24,7 @@ test() {
local port
local subsys_name="blktests-subsystem-1"
local hostid
- local hostnqn="nqn.2014-08.org.nvmexpress:uuid:${hostid}"
+ local hostnqn
local file_path="${TMPDIR}/img"
local hostkey
local ctrlkey
@@ -37,6 +37,7 @@ test() {
echo "uuidgen failed"
return 1
fi
+ hostnqn="nqn.2014-08.org.nvmexpress:uuid:${hostid}"
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 264f210..389e434 100755
--- a/tests/nvme/045
+++ b/tests/nvme/045
@@ -24,7 +24,7 @@ test() {
local port
local subsys_name="blktests-subsystem-1"
local hostid
- local hostnqn="nqn.2014-08.org.nvmexpress:uuid:${hostid}"
+ local hostnqn
local file_path="${TMPDIR}/img"
local hostkey
local new_hostkey
@@ -39,6 +39,7 @@ test() {
echo "uuidgen failed"
return 1
fi
+ hostnqn="nqn.2014-08.org.nvmexpress:uuid:${hostid}"
hostkey="$(nvme gen-dhchap-key -n ${subsys_name} 2> /dev/null)"
if [ -z "$hostkey" ] ; then
--
2.34.1
next reply other threads:[~2022-10-18 13:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-18 13:17 Yi Zhang [this message]
2022-10-20 11:50 ` [PATCH V2 blktests] tests/nvme: set hostnqn after hostid uuidgen 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=20221018131758.763311-1-yi.zhang@redhat.com \
--to=yi.zhang@redhat.com \
--cc=hare@suse.de \
--cc=hch@infradead.org \
--cc=linux-block@vger.kernel.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