]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
selftests: rds: Add ksft timeout
authorAllison Henderson <achender@kernel.org>
Sun, 8 Mar 2026 05:58:34 +0000 (22:58 -0700)
committerJakub Kicinski <kuba@kernel.org>
Wed, 11 Mar 2026 01:54:15 +0000 (18:54 -0700)
rds/run.sh sets a timer of 400s when calling test.py.  However when
tests are run through ksft, a default 45s timer is applied.  Fix this
by adding a ksft timeout in tools/testing/selftests/net/rds/settings

Signed-off-by: Allison Henderson <achender@kernel.org>
Link: https://patch.msgid.link/20260308055835.1338257-3-achender@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/rds/Makefile
tools/testing/selftests/net/rds/run.sh
tools/testing/selftests/net/rds/settings [new file with mode: 0644]

index 762845cc973c3d9680238b36d9d2ee3973122f52..fe363be8e3586ee457f841d4423c4bcfc288d000 100644 (file)
@@ -7,6 +7,7 @@ TEST_PROGS := run.sh
 
 TEST_FILES := \
        include.sh \
+       settings \
        test.py \
 # end of TEST_FILES
 
index 8aee244f582a3eac34f53651125fb43a25e0b8f1..897d17d1b8dbfc8002d35c8611a1036ebd87194c 100755 (executable)
@@ -19,6 +19,9 @@ if test -f "$build_include"; then
        build_dir="$mk_build_dir"
 fi
 
+# Source settings for timeout value (also used by ksft runner)
+source "$current_dir"/settings
+
 # This test requires kernel source and the *.gcda data therein
 # Locate the top level of the kernel source, and the net/rds
 # subfolder with the appropriate *.gcno object files
@@ -194,8 +197,8 @@ set +e
 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 400 -d "$LOG_DIR" \
-       -l "$PLOSS" -c "$PCORRUPT" -u "$PDUP"
+strace -T -tt -o "$TRACE_FILE" python3 "$(dirname "$0")/test.py" \
+       --timeout "$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/settings b/tools/testing/selftests/net/rds/settings
new file mode 100644 (file)
index 0000000..d2009a6
--- /dev/null
@@ -0,0 +1 @@
+timeout=400