From: Allison Henderson <achender@kernel.org>
To: netdev@vger.kernel.org, pabeni@redhat.com, edumazet@google.com,
kuba@kernel.org, horms@kernel.org, linux-rdma@vger.kernel.org,
achender@kernel.org
Subject: [PATCH net-next v1 3/6] selftests: rds: Add timeout flag to run.sh
Date: Mon, 27 Apr 2026 16:29:24 -0700 [thread overview]
Message-ID: <20260427232927.2712755-4-achender@kernel.org> (raw)
In-Reply-To: <20260427232927.2712755-1-achender@kernel.org>
Add a -t flag to run.sh to optionally override the default
timeout. The --timeout flag is already supported in test.py,
so just add the shorthand -t flag
Signed-off-by: Allison Henderson <achender@kernel.org>
---
tools/testing/selftests/net/rds/run.sh | 11 ++++++++---
tools/testing/selftests/net/rds/test.py | 2 +-
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/net/rds/run.sh b/tools/testing/selftests/net/rds/run.sh
index 73a9b986b0ef..bc2e53126aab 100755
--- a/tools/testing/selftests/net/rds/run.sh
+++ b/tools/testing/selftests/net/rds/run.sh
@@ -154,8 +154,9 @@ LOG_DIR="$current_dir"/rds_logs
PLOSS=0
PCORRUPT=0
PDUP=0
+TIMEOUT=$timeout
GENERATE_GCOV_REPORT=1
-while getopts "d:l:c:u:" opt; do
+while getopts "d:l:c:u:t:" opt; do
case ${opt} in
d)
LOG_DIR=${OPTARG}
@@ -166,12 +167,15 @@ while getopts "d:l:c:u:" opt; do
c)
PCORRUPT=${OPTARG}
;;
+ t)
+ TIMEOUT=${OPTARG}
+ ;;
u)
PDUP=${OPTARG}
;;
:)
echo "USAGE: run.sh [-d logdir] [-l packet_loss] [-c packet_corruption]" \
- "[-u packet_duplicate]"
+ "[-u packet_duplicate] [-t timeout]"
exit 1
;;
?)
@@ -198,7 +202,8 @@ echo running RDS tests...
echo Traces will be logged to "$TRACE_FILE"
rm -f "$TRACE_FILE"
strace -T -tt -o "$TRACE_FILE" python3 "$(dirname "$0")/test.py" \
- --timeout "$timeout" -d "$LOG_DIR" -l "$PLOSS" -c "$PCORRUPT" -u "$PDUP"
+ -t "$TIMEOUT" -d "$LOG_DIR" -l "$PLOSS" -c "$PCORRUPT" \
+ -u "$PDUP"
test_rc=$?
dmesg > "${LOG_DIR}/dmesg.out"
diff --git a/tools/testing/selftests/net/rds/test.py b/tools/testing/selftests/net/rds/test.py
index 93e23e8b256c..90f9adad18b3 100755
--- a/tools/testing/selftests/net/rds/test.py
+++ b/tools/testing/selftests/net/rds/test.py
@@ -79,7 +79,7 @@ parser = argparse.ArgumentParser(description="init script args",
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument("-d", "--logdir", action="store",
help="directory to store logs", default="/tmp")
-parser.add_argument('--timeout', help="timeout to terminate hung test",
+parser.add_argument('-t', '--timeout', help="timeout to terminate hung test",
type=int, default=0)
parser.add_argument('-l', '--loss', help="Simulate tcp packet loss",
type=int, default=0)
--
2.25.1
next prev parent reply other threads:[~2026-04-27 23:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-27 23:29 [PATCH net-next v1 0/6] selftests: rds: Log collection, TAP compliance and cleanups Allison Henderson
2026-04-27 23:29 ` [PATCH net-next v1 1/6] selftests: rds: Increase selftest timeout Allison Henderson
2026-04-27 23:29 ` [PATCH net-next v1 2/6] selftests: rds: Update USAGE string for run.sh Allison Henderson
2026-04-27 23:29 ` Allison Henderson [this message]
2026-04-27 23:29 ` [PATCH net-next v1 4/6] selftests: rds: Fix gcov and pcap collection Allison Henderson
2026-04-27 23:29 ` [PATCH net-next v1 5/6] selftests: rds: Collect pcaps on timeout Allison Henderson
2026-04-27 23:29 ` [PATCH net-next v1 6/6] selftests: rds: Make rds selftests TAP compliant Allison Henderson
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=20260427232927.2712755-4-achender@kernel.org \
--to=achender@kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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