[PATCH blktests v3 12/20] nvme/031: do not open code target setup/cleanup
Daniel Wagner
dwagner at suse.de
Tue Mar 26 06:13:54 PDT 2024
No need to open code the target setup and cleanup step. Just use the
common helper to setup and cleanup the target.
Signed-off-by: Daniel Wagner <dwagner at suse.de>
---
tests/nvme/031 | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tests/nvme/031 b/tests/nvme/031
index ed5f19668674..204ba7d2892f 100755
--- a/tests/nvme/031
+++ b/tests/nvme/031
@@ -40,14 +40,14 @@ test() {
port="$(_create_nvmet_port "${nvme_trtype}")"
for ((i = 0; i < iterations; i++)); do
- _create_nvmet_subsystem "${subsys}$i" "${loop_dev}"
- _add_nvmet_subsys_to_port "${port}" "${subsys}$i"
- _create_nvmet_host "${subsys}$i" "${def_hostnqn}"
+ _nvmet_target_setup --subsysnqn "${subsys}$i" \
+ --blkdev "${loop_dev}"
+
_nvme_connect_subsys "${nvme_trtype}" "${subsys}$i"
_nvme_disconnect_subsys "${subsys}$i" >> "${FULL}" 2>&1
- _remove_nvmet_subsystem_from_port "${port}" "${subsys}$i"
- _remove_nvmet_subsystem "${subsys}$i"
- _remove_nvmet_host "${def_hostnqn}"
+
+ _nvmet_target_cleanup --subsysnqn "${subsys}$i" \
+ --blkdev "${loop_dev}"
done
_remove_nvmet_port "${port}"
--
2.44.0
More information about the Linux-nvme
mailing list