Skip to content

Commit

Permalink
selftests: mptcp: join: add io thread tests
Browse files Browse the repository at this point in the history
This io thread mode is used in BPF selftests bpf_tcp_ca and MPTCP, and
it is not very stable for MPTCP sched tests. This patch adds them into
mptcp_join tests (-T) to make sure this scene is also covered.

These tests only run in ns1 for 100 times. The failed output looks like:

 001 io thread tests
 recv 2884500 expected 10485760
 send 8005500 expected 10485760
 Failed in thread_ret -11
 Test no. 12 failed.
       syn                        [FAIL] got 12 JOIN[s] syn expected 100
       synack                     [ OK ]
       ack                        [FAIL] got 12 JOIN[s] ack expected 100

Signed-off-by: Geliang Tang <[email protected]>
  • Loading branch information
Geliang Tang authored and intel-lab-lkp committed Aug 2, 2024
1 parent 5b7e72b commit 282f8d4
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tools/testing/selftests/net/mptcp/mptcp_join.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3663,6 +3663,24 @@ endpoint_tests()
fi
}

io_thread_tests()
{
if reset "io thread tests"; then
local nr=0 max=100
mptcp_lib_pm_nl_set_limits $ns1 8 8
mptcp_lib_pm_nl_add_endpoint $ns1 10.0.2.1 flags subflow
while [ $nr -lt $max ]; do
nr=$((nr + 1))
ip netns exec $ns1 ./mptcp_connect -l 10.0.1.1 -m "thread" -O 3000
if [ $? -ne 0 ]; then
echo "Test no. $nr failed."
break;
fi
done
chk_join_nr $max 0 $max
fi
}

# [$1: error message]
usage()
{
Expand Down Expand Up @@ -3711,6 +3729,7 @@ all_tests_sorted=(
F@fail_tests
u@userspace_tests
I@endpoint_tests
T@io_thread_tests
)

all_tests_args=""
Expand Down

0 comments on commit 282f8d4

Please sign in to comment.