Skip to content

Commit

Permalink
selftests: mptcp: userspace pm send RM_ADDR for ID 0
Browse files Browse the repository at this point in the history
This patch adds a selftest for userpsace PM to remove id 0 address.
Use userspace_pm_add_addr() helper to add a id 10 address, then use
userspace_pm_rm_addr() helper to remove id 0 address.

Signed-off-by: Geliang Tang <[email protected]>
Message-Id: <b729ef20b982fa6a205af202aa8bc12c3784036d.1697017655.git.geliang.tang@suse.com>
  • Loading branch information
geliangtang authored and Patchew Applier committed Oct 11, 2023
1 parent a418316 commit 86e0125
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions tools/testing/selftests/net/mptcp/mptcp_join.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3512,6 +3512,31 @@ userspace_tests()
kill_events_pids
wait $tests_pid
fi

# userspace pm send RM_ADDR for ID 0
if reset_with_events "userspace pm send RM_ADDR for ID 0" &&
continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/pm_type'; then
set_userspace_pm $ns1
pm_nl_set_limits $ns2 1 1
speed=10 \
run_tests $ns1 $ns2 10.0.1.1 &
local tests_pid=$!
wait_mpj $ns1
userspace_pm_add_addr $ns1 10.0.2.1 10
chk_join_nr 1 1 1
chk_add_nr 1 1
chk_mptcp_info subflows 1 subflows 1
chk_subflows_total 2 2
chk_mptcp_info add_addr_signal 1 add_addr_accepted 1
userspace_pm_rm_addr $ns1 0
sleep 0.5
chk_rm_nr 1 0 invert
chk_rst_nr 0 0 invert
chk_mptcp_info subflows 1 subflows 1
chk_subflows_total 2 2
kill_events_pids
wait $tests_pid
fi
}

endpoint_tests()
Expand Down

0 comments on commit 86e0125

Please sign in to comment.