Skip to content

Commit b9fb176

Browse files
geliangtangkuba-moo
authored andcommitted
selftests: mptcp: userspace pm send RM_ADDR for ID 0
This patch adds a selftest for userspace PM to remove id 0 address. Use userspace_pm_add_addr() helper to add an id 10 address, then use userspace_pm_rm_addr() helper to remove id 0 address. Reviewed-by: Matthieu Baerts <[email protected]> Signed-off-by: Geliang Tang <[email protected]> Signed-off-by: Mat Martineau <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent e3b47e4 commit b9fb176

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3538,6 +3538,32 @@ userspace_tests()
35383538
kill_events_pids
35393539
wait $tests_pid
35403540
fi
3541+
3542+
# userspace pm send RM_ADDR for ID 0
3543+
if reset_with_events "userspace pm send RM_ADDR for ID 0" &&
3544+
continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/pm_type'; then
3545+
set_userspace_pm $ns1
3546+
pm_nl_set_limits $ns2 1 1
3547+
speed=5 \
3548+
run_tests $ns1 $ns2 10.0.1.1 &
3549+
local tests_pid=$!
3550+
wait_mpj $ns1
3551+
userspace_pm_add_addr $ns1 10.0.2.1 10
3552+
chk_join_nr 1 1 1
3553+
chk_add_nr 1 1
3554+
chk_mptcp_info subflows 1 subflows 1
3555+
chk_subflows_total 2 2
3556+
chk_mptcp_info add_addr_signal 1 add_addr_accepted 1
3557+
userspace_pm_rm_addr $ns1 0
3558+
# we don't look at the counter linked to the subflows that
3559+
# have been removed but to the one linked to the RM_ADDR
3560+
chk_rm_nr 1 0 invert
3561+
chk_rst_nr 0 0 invert
3562+
chk_mptcp_info subflows 1 subflows 1
3563+
chk_subflows_total 1 1
3564+
kill_events_pids
3565+
wait $tests_pid
3566+
fi
35413567
}
35423568

35433569
endpoint_tests()

0 commit comments

Comments
 (0)