Skip to content

Commit

Permalink
selftests: mptcp: timeout testcases for multi addresses
Browse files Browse the repository at this point in the history
This patch added the timeout testcases for multi addresses, valid and
invalid.

These testcases need to transmit 8 ADD_ADDRs, so add a new speed level
'least' to set 10 to mptcp_connect to slow down the transmitting process.
The original speed level 'slow' still uses 50.

Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
  • Loading branch information
geliangtang authored and jenkins-tessares committed Feb 26, 2021
1 parent ce3735d commit a398ebc
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions tools/testing/selftests/net/mptcp/mptcp_join.sh
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,10 @@ do_transfer()

if [ $speed = "fast" ]; then
mptcp_connect="./mptcp_connect -j"
else
mptcp_connect="./mptcp_connect -r"
elif [ $speed = "slow" ]; then
mptcp_connect="./mptcp_connect -r 50"
elif [ $speed = "least" ]; then
mptcp_connect="./mptcp_connect -r 10"
fi

local local_addr
Expand Down Expand Up @@ -802,6 +804,26 @@ add_addr_timeout_tests()
run_tests $ns1 $ns2 dead:beef:1::1 0 0 0 slow
chk_join_nr "signal address, ADD_ADDR6 timeout" 1 1 1
chk_add_nr 4 0

# signal addresses timeout
reset_with_add_addr_timeout
ip netns exec $ns1 ./pm_nl_ctl limits 2 2
ip netns exec $ns1 ./pm_nl_ctl add 10.0.2.1 flags signal
ip netns exec $ns1 ./pm_nl_ctl add 10.0.3.1 flags signal
ip netns exec $ns2 ./pm_nl_ctl limits 2 2
run_tests $ns1 $ns2 10.0.1.1 0 0 0 least
chk_join_nr "signal addresses, ADD_ADDR timeout" 2 2 2
chk_add_nr 8 0

# signal invalid addresses timeout
reset_with_add_addr_timeout
ip netns exec $ns1 ./pm_nl_ctl limits 2 2
ip netns exec $ns1 ./pm_nl_ctl add 10.0.12.1 flags signal
ip netns exec $ns1 ./pm_nl_ctl add 10.0.3.1 flags signal
ip netns exec $ns2 ./pm_nl_ctl limits 2 2
run_tests $ns1 $ns2 10.0.1.1 0 0 0 least
chk_join_nr "invalid address, ADD_ADDR timeout" 1 1 1
chk_add_nr 8 0
}

remove_tests()
Expand Down

0 comments on commit a398ebc

Please sign in to comment.