Skip to content

Commit

Permalink
selftests: mptcp: remove id 0 subflow & address
Browse files Browse the repository at this point in the history
This patch adds a selftest for userpsace PM to remove id 0 subflow and
id 0 address.

Signed-off-by: Geliang Tang <[email protected]>
  • Loading branch information
geliangtang authored and intel-lab-lkp committed Aug 8, 2023
1 parent cef6c6a commit fd8cd80
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tools/testing/selftests/net/mptcp/mptcp_join.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3434,6 +3434,30 @@ userspace_tests()
kill_events_pids
wait $tests_pid
fi

# userspace pm remove id 0 subflow & address
if reset_with_events "userspace pm remove id 0 subflow & address" &&
continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/pm_type'; then
local tk

set_userspace_pm $ns2
pm_nl_set_limits $ns1 0 2
speed=10 \
run_tests $ns1 $ns2 10.0.1.1 &
local tests_pid=$!
wait_mpj $ns2
userspace_pm_add_sf 10.0.1.2 0
userspace_pm_add_sf 10.0.3.2 20
chk_join_nr 2 2 2
chk_mptcp_info subflows 2 subflows 2
tk=$(sed -n 's/.*\(token:\)\([[:digit:]]*\).*$/\2/p;q' "$evts_ns2")
ip netns exec $ns2 ./pm_nl_ctl rem token $tk id 0
ip netns exec $ns2 ./pm_nl_ctl dsf token $tk id 0
chk_rm_nr 2 2
chk_mptcp_info subflows 1 subflows 1
kill_events_pids
wait $tests_pid
fi
}

endpoint_tests()
Expand Down

0 comments on commit fd8cd80

Please sign in to comment.