All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH blktests] tests/nvme: set hostnqn after hostid uuidgen
@ 2022-10-11 17:43 Yi Zhang
  2022-10-12  6:38 ` Hannes Reinecke
  2022-10-17  7:47 ` Christoph Hellwig
  0 siblings, 2 replies; 4+ messages in thread
From: Yi Zhang @ 2022-10-11 17:43 UTC (permalink / raw)
  To: hare, shinichiro.kawasaki; +Cc: linux-block

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH blktests] tests/nvme: set hostnqn after hostid uuidgen
  2022-10-11 17:43 [PATCH blktests] tests/nvme: set hostnqn after hostid uuidgen Yi Zhang
@ 2022-10-12  6:38 ` Hannes Reinecke
  2022-10-17  7:47 ` Christoph Hellwig
  1 sibling, 0 replies; 4+ messages in thread
From: Hannes Reinecke @ 2022-10-12  6:38 UTC (permalink / raw)
  To: Yi Zhang, shinichiro.kawasaki; +Cc: linux-block

On 10/11/22 19:43, Yi Zhang wrote:
> 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(-)
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                Kernel Storage Architect
hare@suse.de                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Ivo Totev, Andrew
Myers, Andrew McDonald, Martje Boudien Moerman


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH blktests] tests/nvme: set hostnqn after hostid uuidgen
  2022-10-11 17:43 [PATCH blktests] tests/nvme: set hostnqn after hostid uuidgen Yi Zhang
  2022-10-12  6:38 ` Hannes Reinecke
@ 2022-10-17  7:47 ` Christoph Hellwig
  2022-10-18 13:23   ` Yi Zhang
  1 sibling, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2022-10-17  7:47 UTC (permalink / raw)
  To: Yi Zhang; +Cc: hare, shinichiro.kawasaki, linux-block

Please explain why here.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH blktests] tests/nvme: set hostnqn after hostid uuidgen
  2022-10-17  7:47 ` Christoph Hellwig
@ 2022-10-18 13:23   ` Yi Zhang
  0 siblings, 0 replies; 4+ messages in thread
From: Yi Zhang @ 2022-10-18 13:23 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: hare, shinichiro.kawasaki, linux-block

On Mon, Oct 17, 2022 at 3:48 PM Christoph Hellwig <hch@infradead.org> wrote:
>
> Please explain why here.
>
Hi Christoph
Here is part of the original code, hostid will not be appended to
hostnqn, I also added more info in V2, thanks for reviewing.

        local hostnqn="nqn.2014-08.org.nvmexpress:uuid:${hostid}"
        hostid="$(uuidgen)"
        if [ -z "$hostid" ] ; then
                echo "uuidgen failed"
                return 1
        fi
-- 
Best Regards,
  Yi Zhang


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-10-18 13:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-11 17:43 [PATCH blktests] tests/nvme: set hostnqn after hostid uuidgen Yi Zhang
2022-10-12  6:38 ` Hannes Reinecke
2022-10-17  7:47 ` Christoph Hellwig
2022-10-18 13:23   ` Yi Zhang

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.