Skip to content

Commit d4954a2

Browse files
Dwyane-Yanintel-lab-lkp
authored andcommitted
selftests: mptcp: relax conditions in SYN_TX validation
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 <[email protected]>
1 parent cdeb506 commit d4954a2

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tools/testing/selftests/net/mptcp/mptcp_join.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1361,13 +1361,20 @@ chk_join_tx_nr()
13611361
local create=${join_create_err:-0}
13621362
local bind=${join_bind_err:-0}
13631363
local connect=${join_connect_err:-0}
1364+
local allow_multi_syn_tx=0
13641365
local rc=${KSFT_PASS}
13651366
local count
13661367

1368+
if [[ "${join_syn_tx}" = "+"* ]]; then
1369+
allow_multi_syn_tx=1
1370+
syn_tx=${join_syn_tx:1}
1371+
fi
1372+
13671373
count=$(mptcp_lib_get_counter ${ns2} "MPTcpExtMPJoinSynTx")
13681374
if [ -z "$count" ]; then
13691375
rc=${KSFT_SKIP}
1370-
elif [ "$count" != "$syn_tx" ]; then
1376+
elif { [ "$count" != $syn_tx ] && [ $allow_multi_syn_tx -eq 0 ]; } ||
1377+
{ [ "$count" -lt $syn_tx ] && [ $allow_multi_syn_tx -eq 1 ]; }; then
13711378
rc=${KSFT_FAIL}
13721379
print_check "syn tx"
13731380
fail_test "got $count JOIN[s] syn tx expected $syn_tx"

0 commit comments

Comments
 (0)