Skip to content

Commit

Permalink
selftests: mptcp: userspace pm create id 0 subflow
Browse files Browse the repository at this point in the history
This patch adds a selftest to create id 0 subflow. Pass id 0 to the
helper userspace_pm_add_sf() to create id 0 subflow. chk_mptcp_info
shows one subflow but chk_all_subflows shows two subflows in each
namespace.

Signed-off-by: Geliang Tang <geliang.tang@suse.com>
  • Loading branch information
geliangtang authored and intel-lab-lkp committed Sep 14, 2023
1 parent e5727cf commit c2713e9
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 @@ -3477,6 +3477,25 @@ userspace_tests()
wait $tests_pid
fi

# userspace pm create id 0 subflow
if reset_with_events "userspace pm create id 0 subflow" &&
continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/pm_type'; then
set_userspace_pm $ns2
pm_nl_set_limits $ns1 0 1
speed=10 \
run_tests $ns1 $ns2 10.0.1.1 &
local tests_pid=$!
wait_mpj $ns2
chk_mptcp_info subflows 0 subflows 0
chk_all_subflows 1 1
userspace_pm_add_sf $ns2 10.0.3.2 0
chk_join_nr 1 1 1
chk_mptcp_info subflows 1 subflows 1
chk_all_subflows 2 2
kill_events_pids
wait $tests_pid
fi

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

0 comments on commit c2713e9

Please sign in to comment.