[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230818141537.22332-2-dwagner@suse.de>
Date: Fri, 18 Aug 2023 16:15:35 +0200
From: Daniel Wagner <dwagner@...e.de>
To: linux-nvme@...ts.infradead.org
Cc: linux-kernel@...r.kernel.org, linux-block@...r.kernel.org,
Chaitanya Kulkarni <kch@...dia.com>,
Shin'ichiro Kawasaki <shinichiro.kawasaki@....com>,
Hannes Reinecke <hare@...e.de>,
Sagi Grimberg <sagi@...mberg.me>,
Jason Gunthorpe <jgg@...pe.ca>, Daniel Wagner <dwagner@...e.de>
Subject: [PATCH blktests v2 1/3] nvme/{033,034,035,036}: use default subsysnqn variable directly
There is no need to introduce an extra local variable when it
uses the default subsysnqn anyway.
Signed-off-by: Daniel Wagner <dwagner@...e.de>
---
tests/nvme/033 | 9 ++++-----
tests/nvme/034 | 9 ++++-----
tests/nvme/035 | 9 ++++-----
tests/nvme/036 | 11 +++++------
4 files changed, 17 insertions(+), 21 deletions(-)
diff --git a/tests/nvme/033 b/tests/nvme/033
index 46a520ae01fa..d924883460c2 100755
--- a/tests/nvme/033
+++ b/tests/nvme/033
@@ -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"
}
diff --git a/tests/nvme/034 b/tests/nvme/034
index 3c65d92cbaea..e79eef5e756d 100755
--- a/tests/nvme/034
+++ b/tests/nvme/034
@@ -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"
}
diff --git a/tests/nvme/035 b/tests/nvme/035
index c705d9cf25a4..f0dfc92ceeea 100755
--- a/tests/nvme/035
+++ b/tests/nvme/035
@@ -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"
}
diff --git a/tests/nvme/036 b/tests/nvme/036
index 2e933cc41928..61b9e2309da7 100755
--- a/tests/nvme/036
+++ b/tests/nvme/036
@@ -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"
}
--
2.41.0
Powered by blists - more mailing lists