@@ -49,18 +49,17 @@ test_device() {
_setup_nvmet
- local subsys="${def_subsysnqn}"
local nsdev
local port
- port=$(_nvmet_passthru_target_setup "${subsys}")
+ port=$(_nvmet_passthru_target_setup "${def_subsysnqn}")
- nsdev=$(_nvmet_passthru_target_connect "${nvme_trtype}" "${subsys}")
+ nsdev=$(_nvmet_passthru_target_connect "${nvme_trtype}" "${def_subsysnqn}")
compare_dev_info "${nsdev}"
- _nvme_disconnect_subsys "${subsys}"
- _nvmet_passthru_target_cleanup "${port}" "${subsys}"
+ _nvme_disconnect_subsys "${def_subsysnqn}"
+ _nvmet_passthru_target_cleanup "${port}" "${def_subsysnqn}"
echo "Test complete"
}
@@ -19,18 +19,17 @@ test_device() {
_setup_nvmet
- local subsys="${def_subsysnqn}"
local ctrldev
local nsdev
local port
- port=$(_nvmet_passthru_target_setup "${subsys}")
- nsdev=$(_nvmet_passthru_target_connect "${nvme_trtype}" "${subsys}")
+ port=$(_nvmet_passthru_target_setup "${def_subsysnqn}")
+ nsdev=$(_nvmet_passthru_target_connect "${nvme_trtype}" "${def_subsysnqn}")
_run_fio_verify_io --size="${nvme_img_size}" --filename="${nsdev}"
- _nvme_disconnect_subsys "${subsys}"
- _nvmet_passthru_target_cleanup "${port}" "${subsys}"
+ _nvme_disconnect_subsys "${def_subsysnqn}"
+ _nvmet_passthru_target_cleanup "${port}" "${def_subsysnqn}"
echo "Test complete"
}
@@ -25,18 +25,17 @@ test_device() {
_setup_nvmet
- local subsys="${def_subsysnqn}"
local ctrldev
local nsdev
local port
- port=$(_nvmet_passthru_target_setup "${subsys}")
- nsdev=$(_nvmet_passthru_target_connect "${nvme_trtype}" "${subsys}")
+ port=$(_nvmet_passthru_target_setup "${def_subsysnqn}")
+ nsdev=$(_nvmet_passthru_target_connect "${nvme_trtype}" "${def_subsysnqn}")
_xfs_run_fio_verify_io "${nsdev}" "${nvme_img_size}"
- _nvme_disconnect_subsys "${subsys}"
- _nvmet_passthru_target_cleanup "${port}" "${subsys}"
+ _nvme_disconnect_subsys "${def_subsysnqn}"
+ _nvmet_passthru_target_cleanup "${port}" "${def_subsysnqn}"
echo "Test complete"
}
@@ -18,21 +18,20 @@ test_device() {
_setup_nvmet
- local subsys="${def_subsysnqn}"
local ctrldev
local port
- port=$(_nvmet_passthru_target_setup "${subsys}")
- nsdev=$(_nvmet_passthru_target_connect "${nvme_trtype}" "${subsys}")
+ port=$(_nvmet_passthru_target_setup "${def_subsysnqn}")
+ nsdev=$(_nvmet_passthru_target_connect "${nvme_trtype}" "${def_subsysnqn}")
- ctrldev=$(_find_nvme_dev "${subsys}")
+ ctrldev=$(_find_nvme_dev "${def_subsysnqn}")
if ! nvme reset "/dev/${ctrldev}" >> "$FULL" 2>&1; then
echo "ERROR: reset failed"
fi
- _nvme_disconnect_subsys "${subsys}"
- _nvmet_passthru_target_cleanup "${port}" "${subsys}"
+ _nvme_disconnect_subsys "${def_subsysnqn}"
+ _nvmet_passthru_target_cleanup "${port}" "${def_subsysnqn}"
echo "Test complete"
}
There is no need to introduce an extra local variable when it uses the default subsysnqn anyway. Signed-off-by: Daniel Wagner <dwagner@suse.de> --- tests/nvme/033 | 9 ++++----- tests/nvme/034 | 9 ++++----- tests/nvme/035 | 9 ++++----- tests/nvme/036 | 11 +++++------ 4 files changed, 17 insertions(+), 21 deletions(-)