@@ -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"
@@ -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
@@ -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
@@ -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
@@ -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
@@ -93,12 +93,8 @@ test() {
_setup_nvmet
- 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}"
truncate -s "${nvme_img_size}" "${file_path}"
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 random 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 ++------ tests/nvme/048 | 8 ++------ 6 files changed, 12 insertions(+), 36 deletions(-)