public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Daniel Wagner <dwagner@suse.de>
To: linux-nvme@lists.infradead.org
Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org,
	Chaitanya Kulkarni <kch@nvidia.com>,
	Shin'ichiro Kawasaki <shinichiro@fastmail.com>,
	Daniel Wagner <dwagner@suse.de>
Subject: [PATCH blktests v2 9/9] nvme: Make the number iterations configurable
Date: Thu, 20 Apr 2023 20:31:21 +0200	[thread overview]
Message-ID: <20230420183121.4489-13-dwagner@suse.de> (raw)
In-Reply-To: <20230420183121.4489-1-dwagner@suse.de>

Some tests hard code high values of iterations. This makes them run
relatively long compared to the other tests. Introduce a new environment
variable nvme_num_iter to allow tune the runtime.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
 tests/nvme/002 | 2 +-
 tests/nvme/016 | 2 +-
 tests/nvme/017 | 2 +-
 tests/nvme/rc  | 1 +
 4 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/tests/nvme/002 b/tests/nvme/002
index 6b8484844b4d..c28035483514 100755
--- a/tests/nvme/002
+++ b/tests/nvme/002
@@ -20,7 +20,7 @@ test() {
 
 	_setup_nvmet
 
-	local iterations=1000
+	local iterations="${nvme_num_iter}"
 	local port
 	port="$(_create_nvmet_port "${nvme_trtype}")"
 
diff --git a/tests/nvme/016 b/tests/nvme/016
index 4eba30223a08..c0c31a55b190 100755
--- a/tests/nvme/016
+++ b/tests/nvme/016
@@ -17,7 +17,7 @@ test() {
 	echo "Running ${TEST_NAME}"
 
 	local port
-	local iterations=1000
+	local iterations="${nvme_num_iter}"
 	local loop_dev
 	local subsys_nqn="blktests-subsystem-1"
 
diff --git a/tests/nvme/017 b/tests/nvme/017
index 0248aee9bc41..e1674508f654 100755
--- a/tests/nvme/017
+++ b/tests/nvme/017
@@ -18,7 +18,7 @@ test() {
 
 	local port
 	local file_path
-	local iterations=1000
+	local iterations="${nvme_num_iter}"
 	local subsys_name="blktests-subsystem-1"
 
 	_setup_nvmet
diff --git a/tests/nvme/rc b/tests/nvme/rc
index 2aa34fb0c9b8..bb135502220a 100644
--- a/tests/nvme/rc
+++ b/tests/nvme/rc
@@ -18,6 +18,7 @@ def_hostnqn="$(cat /etc/nvme/hostnqn 2> /dev/null)"
 def_hostid="$(cat /etc/nvme/hostid 2> /dev/null)"
 nvme_trtype=${nvme_trtype:-"loop"}
 nvme_img_size=${nvme_img_size:-"350M"}
+nvme_num_iter=${nvme_num_iter:-"100"}
 
 _nvme_requires() {
 	_have_program nvme
-- 
2.40.0



  parent reply	other threads:[~2023-04-20 18:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-20 18:31 [PATCH blktests v2 0/9] nvme testsuite runtime optimization Daniel Wagner
2023-04-20 18:31 ` [PATCH blktests v2 1/9] nvme-rc: Auto convert test device size info Daniel Wagner
2023-04-20 18:31 ` [PATCH blktests v2 2/9] nvme: Do not hard code device size for dd test Daniel Wagner
2023-04-20 18:31 ` [PATCH blktests v2 2/4] nvme: Make test image size configurable Daniel Wagner
2023-04-20 18:31 ` [PATCH blktests v2 3/9] common-xfs: Make size argument optional for _xfs_run_fio_verify_io Daniel Wagner
2023-04-20 18:31 ` [PATCH blktests v2 3/4] nvme-rc: Move discovery generation counter code to rc Daniel Wagner
2023-04-20 18:31 ` [PATCH blktests v2 4/4] nvme: Make the number iterations configurable Daniel Wagner
2023-04-20 18:31 ` [PATCH blktests v2 4/9] nvme: Use runtime fio background jobs Daniel Wagner
2023-04-20 18:31 ` [PATCH blktests v2 5/9] nvme: Make test image size configurable Daniel Wagner
2023-04-20 18:31 ` [PATCH blktests v2 6/9] nvme-rc: Add minimal test image size requirement Daniel Wagner
2023-04-20 18:31 ` [PATCH blktests v2 7/9] nvme-rc: Calculate IO size for fio jobs Daniel Wagner
2023-04-20 18:31 ` [PATCH blktests v2 8/9] nvme-rc: Move discovery generation counter code to rc Daniel Wagner
2023-04-20 18:31 ` Daniel Wagner [this message]
2023-04-21  5:59 ` [PATCH blktests v2 0/9] nvme testsuite runtime optimization Daniel Wagner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230420183121.4489-13-dwagner@suse.de \
    --to=dwagner@suse.de \
    --cc=kch@nvidia.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=shinichiro@fastmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox