Commit b2e2248f authored by Geliang Tang's avatar Geliang Tang Committed by Jakub Kicinski

selftests: mptcp: userspace pm create id 0 subflow

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_subflows_total shows two subflows in each
namespace.
Reviewed-by: default avatarMatthieu Baerts <matttbe@kernel.org>
Signed-off-by: default avatarGeliang Tang <geliang.tang@suse.com>
Signed-off-by: default avatarMat Martineau <martineau@kernel.org>
Link: https://lore.kernel.org/r/20231128-send-net-next-2023107-v4-5-8d6b94150f6b@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 757c828c
...@@ -3495,6 +3495,25 @@ userspace_tests() ...@@ -3495,6 +3495,25 @@ userspace_tests()
kill_events_pids kill_events_pids
wait $tests_pid wait $tests_pid
fi 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=5 \
run_tests $ns1 $ns2 10.0.1.1 &
local tests_pid=$!
wait_mpj $ns2
chk_mptcp_info subflows 0 subflows 0
chk_subflows_total 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_subflows_total 2 2
kill_events_pids
wait $tests_pid
fi
} }
endpoint_tests() endpoint_tests()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment