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