mptcp.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/3] selftests: mptcp: relax conditions in SYN_TX validation
@ 2025-01-09 13:32 Gang Yan
  2025-01-09 17:39 ` Matthieu Baerts
  0 siblings, 1 reply; 2+ messages in thread
From: Gang Yan @ 2025-01-09 13:32 UTC (permalink / raw)
  To: Matthieu Baerts, Mat Martineau, Geliang Tang; +Cc: Gang Yan, mptcp

From: Gang Yan <yangang@kylinos.cn>

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.

Signed-off-by: Gang Yan <yangang@kylinos.cn>
---
 tools/testing/selftests/net/mptcp/mptcp_join.sh | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
index c07e2bd3a315..6b0705d10840 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
@@ -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"
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-01-09 17:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-09 13:32 [PATCH 2/3] selftests: mptcp: relax conditions in SYN_TX validation Gang Yan
2025-01-09 17:39 ` Matthieu Baerts

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).