From 67e25d71bc5800e0c3cbdace342583812329e587 Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Thu, 7 Nov 2024 20:13:51 +0900 Subject: [PATCH] nvme/052: do not create namespace when setting up the target Simplify the testcase by not creating a namespace when setting up the target and have to loop iterating over all namespaces. [Shin'ichiro: use for loop instead of seq per style guideline] Signed-off-by: Hannes Reinecke [Shin'ichiro: resolved conflicts] Reviewed-by: Daniel Wagner Signed-off-by: Shin'ichiro Kawasaki --- tests/nvme/052 | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/tests/nvme/052 b/tests/nvme/052 index 2548f5ce..8443c90e 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