@@ -25,7 +25,7 @@ test() {
_nvmet_target_setup
- _nvme_connect_subsys "${nvme_trtype}" nqn.2014-08.org.nvmexpress.discovery
+ _nvme_connect_subsys nqn.2014-08.org.nvmexpress.discovery
# This is ugly but checking for the absence of error messages is ...
sleep 10
@@ -22,10 +22,9 @@ test() {
_setup_nvmet
-
_nvmet_target_setup
- _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}"
+ _nvme_connect_subsys "${def_subsysnqn}"
local nvmedev
nvmedev=$(_find_nvme_dev "${def_subsysnqn}")
@@ -25,7 +25,7 @@ test() {
_nvmet_target_setup
- _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}"
+ _nvme_connect_subsys "${def_subsysnqn}"
nvmedev=$(_find_nvme_dev "${def_subsysnqn}")
@@ -24,7 +24,7 @@ test() {
_nvmet_target_setup
- _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}"
+ _nvme_connect_subsys "${def_subsysnqn}"
nvmedev=$(_find_nvme_dev "${def_subsysnqn}")
_check_uuid "${nvmedev}"
@@ -23,7 +23,7 @@ test() {
_nvmet_target_setup --blkdev file
- _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}"
+ _nvme_connect_subsys "${def_subsysnqn}"
nvmedev=$(_find_nvme_dev "${def_subsysnqn}")
_check_uuid "${nvmedev}"
@@ -24,7 +24,7 @@ test() {
_nvmet_target_setup
- _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}"
+ _nvme_connect_subsys "${def_subsysnqn}"
nvmedev=$(_find_nvme_dev "${def_subsysnqn}")
_check_uuid "${nvmedev}"
@@ -24,7 +24,7 @@ test() {
_nvmet_target_setup --blkdev file
- _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}"
+ _nvme_connect_subsys "${def_subsysnqn}"
nvmedev=$(_find_nvme_dev "${def_subsysnqn}")
_check_uuid "${nvmedev}"
@@ -28,7 +28,7 @@ test() {
_nvmet_target_setup
- _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}"
+ _nvme_connect_subsys "${def_subsysnqn}"
nvmedev=$(_find_nvme_dev "${def_subsysnqn}")
_check_uuid "${nvmedev}"
@@ -27,7 +27,7 @@ test() {
_nvmet_target_setup --blkdev file
- _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}"
+ _nvme_connect_subsys "${def_subsysnqn}"
nvmedev=$(_find_nvme_dev "${def_subsysnqn}")
_check_uuid "${nvmedev}"
@@ -27,7 +27,7 @@ test() {
_nvmet_target_setup
- _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}"
+ _nvme_connect_subsys "${def_subsysnqn}"
nvmedev=$(_find_nvme_dev "${def_subsysnqn}")
_check_uuid "${nvmedev}"
@@ -27,7 +27,7 @@ test() {
_nvmet_target_setup --blkdev file
- _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}"
+ _nvme_connect_subsys "${def_subsysnqn}"
nvmedev=$(_find_nvme_dev "${def_subsysnqn}")
_check_uuid "${nvmedev}"
@@ -25,7 +25,7 @@ test() {
_nvmet_target_setup --blkdev file
- _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}"
+ _nvme_connect_subsys "${def_subsysnqn}"
nvmedev=$(_find_nvme_dev "${def_subsysnqn}")
_check_uuid "${nvmedev}"
@@ -26,7 +26,7 @@ test() {
_nvmet_target_setup
- _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}"
+ _nvme_connect_subsys "${def_subsysnqn}"
nvmedev=$(_find_nvme_dev "${def_subsysnqn}")
_check_uuid "${nvmedev}"
@@ -25,7 +25,7 @@ test() {
_nvmet_target_setup --blkdev file
- _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}"
+ _nvme_connect_subsys "${def_subsysnqn}"
nvmedev=$(_find_nvme_dev "${def_subsysnqn}")
_check_uuid "${nvmedev}"
@@ -24,7 +24,7 @@ test() {
_nvmet_target_setup --blkdev file
- _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}"
+ _nvme_connect_subsys "${def_subsysnqn}"
nvmedev=$(_find_nvme_dev "${def_subsysnqn}")
_check_uuid "${nvmedev}"
@@ -24,7 +24,7 @@ test() {
_nvmet_target_setup --blkdev file
- _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}"
+ _nvme_connect_subsys "${def_subsysnqn}"
nvmedev=$(_find_nvme_dev "${def_subsysnqn}")
_check_uuid "${nvmedev}"
@@ -24,7 +24,7 @@ test() {
_nvmet_target_setup
- _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}"
+ _nvme_connect_subsys "${def_subsysnqn}"
nvmedev=$(_find_nvme_dev "${def_subsysnqn}")
_check_uuid "${nvmedev}"
@@ -24,7 +24,7 @@ test() {
_nvmet_target_setup --blkdev file
- _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}"
+ _nvme_connect_subsys "${def_subsysnqn}"
nvmedev=$(_find_nvme_dev "${def_subsysnqn}")
_check_uuid "${nvmedev}"
@@ -24,7 +24,7 @@ test() {
_nvmet_target_setup --blkdev file
- _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}"
+ _nvme_connect_subsys "${def_subsysnqn}"
nvmedev=$(_find_nvme_dev "${def_subsysnqn}")
_check_uuid "${nvmedev}"
@@ -24,7 +24,7 @@ test() {
_nvmet_target_setup --blkdev file
- _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}"
+ _nvme_connect_subsys "${def_subsysnqn}"
nvmedev=$(_find_nvme_dev "${def_subsysnqn}")
_check_uuid "${nvmedev}"
@@ -24,7 +24,7 @@ test() {
_nvmet_target_setup --blkdev file
- _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}"
+ _nvme_connect_subsys "${def_subsysnqn}"
nvmedev=$(_find_nvme_dev "${def_subsysnqn}")
_check_uuid "${nvmedev}"
@@ -24,7 +24,7 @@ test() {
_nvmet_target_setup --blkdev file
- _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}"
+ _nvme_connect_subsys "${def_subsysnqn}"
nvmedev=$(_find_nvme_dev "${def_subsysnqn}")
_check_uuid "${nvmedev}"
@@ -58,7 +58,7 @@ test() {
_nvmet_target_setup
- _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}"
+ _nvme_connect_subsys "${def_subsysnqn}"
nvmedev=$(_find_nvme_dev "${def_subsysnqn}")
_check_uuid "${nvmedev}"
@@ -43,7 +43,7 @@ test() {
_nvmet_target_setup --subsysnqn "${subsys}$i" \
--blkdev "${loop_dev}"
- _nvme_connect_subsys "${nvme_trtype}" "${subsys}$i"
+ _nvme_connect_subsys "${subsys}$i"
_nvme_disconnect_subsys "${subsys}$i" >> "${FULL}" 2>&1
_nvmet_target_cleanup --subsysnqn "${subsys}$i" \
@@ -26,7 +26,7 @@ test() {
_nvmet_target_setup
- _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}"
+ _nvme_connect_subsys "${def_subsysnqn}"
nvmedev=$(_find_nvme_dev "${def_subsysnqn}")
# start fio job
@@ -38,7 +38,7 @@ test() {
# Test unauthenticated connection (should fail)
echo "Test unauthenticated connection (should fail)"
- _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" \
+ _nvme_connect_subsys "${def_subsysnqn}" \
--hostnqn "${def_hostnqn}" \
--hostid "${def_hostid}"
@@ -46,7 +46,7 @@ test() {
# Test authenticated connection
echo "Test authenticated connection"
- _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" \
+ _nvme_connect_subsys "${def_subsysnqn}" \
--hostnqn "${def_hostnqn}" \
--hostid "${def_hostid}" \
--dhchap-secret "${hostkey}"
@@ -41,7 +41,7 @@ test() {
fi
_set_nvmet_hostkey "${def_hostnqn}" "${hostkey}"
- _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" \
+ _nvme_connect_subsys "${def_subsysnqn}" \
--hostnqn "${def_hostnqn}" \
--hostid "${def_hostid}" \
--dhchap-secret "${hostkey}"
@@ -58,7 +58,7 @@ test() {
fi
_set_nvmet_hostkey "${def_hostnqn}" "${hostkey}"
- _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" \
+ _nvme_connect_subsys "${def_subsysnqn}" \
--hostnqn "${def_hostnqn}" \
--hostid "${def_hostid}" \
--dhchap-secret "${hostkey}"
@@ -45,7 +45,7 @@ test() {
_set_nvmet_hash "${def_hostnqn}" "${hash}"
- _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" \
+ _nvme_connect_subsys "${def_subsysnqn}" \
--hostnqn "${def_hostnqn}" \
--hostid "${def_hostid}" \
--dhchap-secret "${hostkey}"
@@ -59,7 +59,7 @@ test() {
_set_nvmet_dhgroup "${def_hostnqn}" "${dhgroup}"
- _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" \
+ _nvme_connect_subsys "${def_subsysnqn}" \
--hostnqn "${def_hostnqn}" \
--hostid "${def_hostid}" \
--dhchap-secret "${hostkey}"
@@ -49,7 +49,7 @@ test() {
# Step 1: Connect with host authentication only
echo "Test host authentication"
- _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" \
+ _nvme_connect_subsys "${def_subsysnqn}" \
--hostnqn "${def_hostnqn}" \
--hostid "${def_hostid}" \
--dhchap-secret "${hostkey}"
@@ -59,7 +59,7 @@ test() {
# Step 2: Connect with host authentication
# and invalid ctrl authentication
echo "Test invalid ctrl authentication (should fail)"
- _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" \
+ _nvme_connect_subsys "${def_subsysnqn}" \
--hostnqn "${def_hostnqn}" \
--hostid "${def_hostid}" \
--dhchap-secret "${hostkey}" \
@@ -70,7 +70,7 @@ test() {
# Step 3: Connect with host authentication
# and valid ctrl authentication
echo "Test valid ctrl authentication"
- _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" \
+ _nvme_connect_subsys "${def_subsysnqn}" \
--hostnqn "${def_hostnqn}" \
--hostid "${def_hostid}" \
--dhchap-secret "${hostkey}" \
@@ -82,7 +82,7 @@ test() {
# and invalid ctrl key
echo "Test invalid ctrl key (should fail)"
invkey="DHHC-1:00:Jc/My1o0qtLCWRp+sHhAVafdfaS7YQOMYhk9zSmlatobqB8C:"
- _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" \
+ _nvme_connect_subsys "${def_subsysnqn}" \
--hostnqn "${def_hostnqn}" \
--hostid "${def_hostid}" \
--dhchap-secret "${hostkey}" \
@@ -51,7 +51,7 @@ test() {
_set_nvmet_dhgroup "${def_hostnqn}" "ffdhe2048"
- _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" \
+ _nvme_connect_subsys "${def_subsysnqn}" \
--hostnqn "${def_hostnqn}" \
--hostid "${def_hostid}" \
--dhchap-secret "${hostkey}" \
@@ -27,7 +27,7 @@ test() {
_nvmet_target_setup
- _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" \
+ _nvme_connect_subsys \
--nr-write-queues 1 || echo FAIL
nvmedev=$(_find_nvme_dev "${def_subsysnqn}")
@@ -37,7 +37,7 @@ test() {
_nvme_disconnect_subsys "${def_subsysnqn}" >> "$FULL" 2>&1
- _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" \
+ _nvme_connect_subsys "${def_subsysnqn}" \
--nr-write-queues 1 \
--nr-poll-queues 1 || echo FAIL
@@ -99,7 +99,7 @@ test() {
_nvmet_target_setup --blkdev file
if [[ -f "${cfs_path}/attr_qid_max" ]] ; then
- _nvme_connect_subsys "${nvme_trtype}" "${def_subsysnqn}" \
+ _nvme_connect_subsys "${def_subsysnqn}" \
--hostnqn "${def_hostnqn}" \
--hostid "${def_hostid}" \
--keep-alive-tmo 1 \
@@ -408,7 +408,6 @@ _nvme_disconnect_subsys() {
_nvme_connect_subsys() {
local positional_args=()
- local trtype=""
local subsysnqn=""
local hostnqn="$def_hostnqn"
local hostid="$def_hostid"
@@ -478,13 +477,12 @@ _nvme_connect_subsys() {
set -- "${positional_args[@]}"
- trtype="$1"
- subsysnqn="$2"
+ subsysnqn="$1"
- ARGS=(--transport "${trtype}" --nqn "${subsysnqn}")
- if [[ "${trtype}" == "fc" ]] ; then
+ ARGS=(--transport "${nvme_trtype}" --nqn "${subsysnqn}")
+ if [[ "${nvme_trtype}" == "fc" ]] ; then
ARGS+=(--traddr "${def_traddr}" --host-traddr "${def_host_traddr}")
- elif [[ "${trtype}" != "loop" ]]; then
+ elif [[ "${nvme_trtype}" != "loop" ]]; then
ARGS+=(--traddr "${def_traddr}" --trsvcid "${def_trsvcid}")
fi
ARGS+=(--hostnqn="${hostnqn}")
@@ -902,7 +900,7 @@ _nvmet_passthru_target_connect() {
local trtype=$1
local subsys_name=$2
- _nvme_connect_subsys "${trtype}" "${subsys_name}" --no-wait || return
+ _nvme_connect_subsys "${subsys_name}" --no-wait || return
nsdev=$(_find_nvme_passthru_loop_dev "${subsys_name}")
# The following tests can race with the creation
Every invocation of _nvmet_connect_subsys passes in the default nvme_trtype argument. nvme/rc also assumes the test is always using nvme_trtype for trtype (e.g. cleanup code paths), thus just drop this argument. Signed-off-by: Daniel Wagner <dwagner@suse.de> --- tests/nvme/003 | 2 +- tests/nvme/004 | 3 +-- tests/nvme/005 | 2 +- tests/nvme/008 | 2 +- tests/nvme/009 | 2 +- tests/nvme/010 | 2 +- tests/nvme/011 | 2 +- tests/nvme/012 | 2 +- tests/nvme/013 | 2 +- tests/nvme/014 | 2 +- tests/nvme/015 | 2 +- tests/nvme/018 | 2 +- tests/nvme/019 | 2 +- tests/nvme/020 | 2 +- tests/nvme/021 | 2 +- tests/nvme/022 | 2 +- tests/nvme/023 | 2 +- tests/nvme/024 | 2 +- tests/nvme/025 | 2 +- tests/nvme/026 | 2 +- tests/nvme/027 | 2 +- tests/nvme/028 | 2 +- tests/nvme/029 | 2 +- tests/nvme/031 | 2 +- tests/nvme/040 | 2 +- tests/nvme/041 | 4 ++-- tests/nvme/042 | 4 ++-- tests/nvme/043 | 4 ++-- tests/nvme/044 | 8 ++++---- tests/nvme/045 | 2 +- tests/nvme/047 | 4 ++-- tests/nvme/048 | 2 +- tests/nvme/rc | 12 +++++------- 33 files changed, 44 insertions(+), 47 deletions(-)