Skip to content

Commit e0bb3dc

Browse files
yizhanglinuxkawasaki
authored andcommitted
tests/nvme/031: fix connecting faiure
allow_any_host was disabled during _create_nvmet_subsystem, call _create_nvmet_host before connecting to allow the host to connect. [76096.420586] nvmet: adding nsid 1 to subsystem blktests-subsystem-0 [76096.440595] nvmet_tcp: enabling port 0 (127.0.0.1:4420) [76096.491344] nvmet: connect by host nqn.2014-08.org.nvmexpress:uuid:0f01fb42-9f7f-4856-b0b3-51e60b8de349 for subsystem blktests-subsystem-0 not allowed [76096.505049] nvme nvme2: Connect for subsystem blktests-subsystem-0 is not allowed, hostnqn: nqn.2014-08.org.nvmexpress:uuid:0f01fb42-9f7f-4856-b0b3-51e60b8de349 [76096.519609] nvme nvme2: failed to connect queue: 0 ret=16772 Signed-off-by: Yi Zhang <[email protected]> Fixes: c32b233 ("nvme/rc: Add helper for adding/removing to allow list") Link: https://lore.kernel.org/linux-block/[email protected]/ Reviewed-by: Daniel Wagner <[email protected]> Signed-off-by: Shin'ichiro Kawasaki <[email protected]>
1 parent 2045e8d commit e0bb3dc

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

tests/nvme/031

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,12 @@ test() {
4242
for ((i = 0; i < iterations; i++)); do
4343
_create_nvmet_subsystem "${subsys}$i" "${loop_dev}"
4444
_add_nvmet_subsys_to_port "${port}" "${subsys}$i"
45+
_create_nvmet_host "${subsys}$i" "${def_hostnqn}"
4546
_nvme_connect_subsys "${nvme_trtype}" "${subsys}$i"
4647
_nvme_disconnect_subsys "${subsys}$i" >> "${FULL}" 2>&1
4748
_remove_nvmet_subsystem_from_port "${port}" "${subsys}$i"
4849
_remove_nvmet_subsystem "${subsys}$i"
50+
_remove_nvmet_host "${def_hostnqn}"
4951
done
5052

5153
_remove_nvmet_port "${port}"

0 commit comments

Comments
 (0)