[PATCH blktests v6 1/2] nvme/rc: Add timeout argument parsing to _nvme_connect_subsys()
Daniel Wagner
dwagner at suse.de
Thu Apr 6 01:30:49 PDT 2023
Add the possiblity for tests to specify the timeout values. This makes
it possible to reduce the test runtime.
Signed-off-by: Daniel Wagner <dwagner at suse.de>
---
tests/nvme/rc | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/tests/nvme/rc b/tests/nvme/rc
index a3c9b42d91e6..b44239446dcf 100644
--- a/tests/nvme/rc
+++ b/tests/nvme/rc
@@ -338,6 +338,9 @@ _nvme_connect_subsys() {
local nr_io_queues=""
local nr_write_queues=""
local nr_poll_queues=""
+ local keep_alive_tmo=""
+ local reconnect_delay=""
+ local ctrl_loss_tmo=""
while [[ $# -gt 0 ]]; do
case $1 in
@@ -381,6 +384,18 @@ _nvme_connect_subsys() {
nr_poll_queues="$2"
shift 2
;;
+ -k|--keep-alive-tmo)
+ keep_alive_tmo="$2"
+ shift 2
+ ;;
+ -c|--reconnect-delay)
+ reconnect_delay="$2"
+ shift 2
+ ;;
+ -l|--ctrl-loss-tmo)
+ ctrl_loss_tmo="$2"
+ shift 2
+ ;;
*)
positional_args+=("$1")
shift
@@ -420,6 +435,15 @@ _nvme_connect_subsys() {
if [[ -n "${nr_poll_queues}" ]]; then
ARGS+=(--nr-poll-queues="${nr_poll_queues}")
fi
+ if [[ -n "${keep_alive_tmo}" ]]; then
+ ARGS+=(--keep-alive-tmo="${keep_alive_tmo}")
+ fi
+ if [[ -n "${reconnect_delay}" ]]; then
+ ARGS+=(--reconnect-delay="${reconnect_delay}")
+ fi
+ if [[ -n "${ctrl_loss_tmo}" ]]; then
+ ARGS+=(--ctrl-loss-tmo="${ctrl_loss_tmo}")
+ fi
nvme connect "${ARGS[@]}" 2> /dev/null
}
--
2.40.0
More information about the Linux-nvme
mailing list