]> www.infradead.org Git - users/sagi/blktests.git/commitdiff
nvme/{016,017}: Make the number iterations configurable
authorDaniel Wagner <dwagner@suse.de>
Thu, 11 May 2023 14:09:53 +0000 (16:09 +0200)
committerShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Thu, 25 May 2023 23:45:27 +0000 (08:45 +0900)
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.

Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Documentation/running-tests.md
tests/nvme/016
tests/nvme/017
tests/nvme/rc

index 4d8393f2002d19adce0e0dcf34e60336b94fa6ae..b35ae10316e4d4b66c120a7d14cbc5022b816110 100644 (file)
@@ -107,6 +107,8 @@ The NVMe tests can be additionally parameterized via environment variables.
 - nvme_img_size: '1G' (default)
   Run the tests with given image size in bytes. 'm', 'M', 'g'
        and 'G' postfix are supported.
+- nvme_num_iter: 1000 (default)
+  The number of iterations a test should do.
 
 ### Running nvme-rdma nvmeof-mp srp tests
 
index 4eba30223a0847fd87f8982eb48e418ddc8f0a4c..c0c31a55b19051dedebbd3f3ef83ca40840708b8 100755 (executable)
@@ -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"
 
index 0248aee9bc419753b986194786d5ed0d9b537f44..e1674508f6543a1a08a66e44796937d52a3c912d 100755 (executable)
@@ -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
index fe12c5a826c2bffcc6490b784692901f5fa76f6d..a41e56432972a653582e51b8b8b2581bf55dabc8 100644 (file)
@@ -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:-"1G"}
+nvme_num_iter=${nvme_num_iter:-"1000"}
 
 _nvme_requires() {
        _have_program nvme