[PATCH blktests] nvme/43: use a valid hostkey

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The test does not generate a hostkey and uses a NULL when setting
up and connecting to a target. The test passes, but a valid hotkey
should be used. This patch generates a valid hostkey and uses it
when setting up the target.

Signed-off-by: Alan Adamson <alan.adamson@xxxxxxxxxx>
Reviewed-by: Hannes Reinecke <hare@xxxxxxx>
---
 tests/nvme/043 | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/nvme/043 b/tests/nvme/043
index a030884aa4ed..d498fd7ae885 100755
--- a/tests/nvme/043
+++ b/tests/nvme/043
@@ -39,6 +39,11 @@ test() {
 		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"
+		return 1
+	fi
 
 	_setup_nvmet
 
-- 
2.31.1




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux