Skip to contentSkip to conversation

selftests: mptcp: relax conditions in SYN_TX validation

PATCH In review Gang Yan 2 participants 2 messages Jan 9, 2025

Subsystems (3)
lore
Share & tools
lore

Gang Yan

author
#0 lore raw

PATCH 2/3 selftests: mptcp: relax conditions in SYN_TX validation

From: Gang Yan <[email protected]>

In ADD_ADDR timeout test cases, the syn_tx MIB counter is not an accurate number. This patch introduces '+n' to 'join_syn_tx' to relax the strict condition.

---
 tools/testing/selftests/net/mptcp/mptcp_join.sh | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
tools/testing/selftests/net/mptcp/mptcp_join.sh +8 -1
index c07e2bd3a315..6b0705d10840 100755
@@ -1361,13 +1361,20 @@ chk_join_tx_nr()
 	local create=${join_create_err:-0}
 	local bind=${join_bind_err:-0}
 	local connect=${join_connect_err:-0}
+	local allow_multi_syn_tx=0
 	local rc=${KSFT_PASS}
 	local count
 
+	if [[ "${join_syn_tx}" = "+"* ]]; then
+                allow_multi_syn_tx=1
+                syn_tx=${join_syn_tx:1}
+        fi
+
 	count=$(mptcp_lib_get_counter ${ns2} "MPTcpExtMPJoinSynTx")
 	if [ -z "$count" ]; then
 		rc=${KSFT_SKIP}
-	elif [ "$count" != "$syn_tx" ]; then
+	elif { [ "$count" != $syn_tx ] && [ $allow_multi_syn_tx -eq 0 ]; } ||
+             { [ "$count" -lt $syn_tx ] && [ $allow_multi_syn_tx -eq 1 ]; }; then
 		rc=${KSFT_FAIL}
 		print_check "syn tx"
 		fail_test "got $count JOIN[s] syn tx expected $syn_tx"
Signature · 1 line
2.25.1
maintainer
#1 lore raw

Hi Gang,

Quoted 4 lines · Gang Yan

From: Gang Yan <[email protected]>

In ADD_ADDR timeout test cases, the syn_tx MIB counter is not an accurate number.

Please explain why this counter is not an accurate number.

When you say that, it sounds like there is something to fix in the kernel, but not in the tests.

(It might help to squash this patch with the next one, or to rephrase it to say that a future test will do some retransmissions)

Quoted 2 lines

This patch introduces '+n' to 'join_syn_tx'
to relax the strict condition.

(...)

Cheers,
Matt

Signature · 1 line
Sponsored by the NGI0 Core fund.