[blktests,v2,9/9] nvme: Make the number iterations configurable
Commit Message
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(-)
@@ -20,7 +20,7 @@ test() {
_setup_nvmet
- local iterations=1000
+ local iterations="${nvme_num_iter}"
local port
port="$(_create_nvmet_port "${nvme_trtype}")"
@@ -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"
@@ -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
@@ -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