[PATCH blktests 5/8] nvme/052: do not create namespace when setting up the target
Shin'ichiro Kawasaki
shinichiro.kawasaki at wdc.com
Thu Nov 7 03:13:51 PST 2024
From: Hannes Reinecke <hare at suse.de>
Simplify the testcase by not creating a namespace when setting up
the target and have to loop iterating over all namespaces.
Signed-off-by: Hannes Reinecke <hare at suse.de>
[Shin'ichiro: resolved conflicts]
[Shin'ichiro: use for loop instead of seq per style guideline]
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki at wdc.com>
---
tests/nvme/052 | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/tests/nvme/052 b/tests/nvme/052
index 2548f5c..8443c90 100755
--- a/tests/nvme/052
+++ b/tests/nvme/052
@@ -51,17 +51,14 @@ test() {
_setup_nvmet
- local iterations=20
+ local i iterations=20
local uuid nsid filepath
- _nvmet_target_setup
+ _nvmet_target_setup --blkdev none
_nvme_connect_subsys
- # start iteration from def_nsid+1 because def_nsid is created
- # by default when nvme target is setup. Also def_nsid is
- # deleted when nvme target is cleaned up.
- for ((i = 2; i <= iterations; i++)); do {
+ for ((i = 1; i <= iterations; i++)); do
nsid=$((def_nsid + i - 1))
filepath="$(_nvme_def_file_path).${nsid}"
truncate -s "${NVME_IMG_SIZE}" "$filepath"
@@ -84,7 +81,6 @@ test() {
fi
rm "$filepath"
- }
done
_nvme_disconnect_subsys >> "${FULL}" 2>&1
--
2.47.0
More information about the Linux-nvme
mailing list