Skip to content

Commit b5e2fb8

Browse files
Paolo Abenidavem330
authored andcommitted
selftests: mptcp: add explicit test case for remove/readd
Delete and re-create a signal endpoint and ensure that the PM actually deletes and re-create the subflow. Signed-off-by: Paolo Abeni <pabeni@redhat.com> Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 4b317e0 commit b5e2fb8

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

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

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3526,6 +3526,35 @@ endpoint_tests()
35263526
chk_mptcp_info subflows 1 subflows 1
35273527
mptcp_lib_kill_wait $tests_pid
35283528
fi
3529+
3530+
# remove and re-add
3531+
if reset "delete re-add signal" &&
3532+
mptcp_lib_kallsyms_has "subflow_rebuild_header$"; then
3533+
pm_nl_set_limits $ns1 1 1
3534+
pm_nl_set_limits $ns2 1 1
3535+
pm_nl_add_endpoint $ns1 10.0.2.1 id 1 flags signal
3536+
test_linkfail=4 speed=20 \
3537+
run_tests $ns1 $ns2 10.0.1.1 &
3538+
local tests_pid=$!
3539+
3540+
wait_mpj $ns2
3541+
pm_nl_check_endpoint "creation" \
3542+
$ns1 10.0.2.1 id 1 flags signal
3543+
chk_subflow_nr "before delete" 2
3544+
chk_mptcp_info subflows 1 subflows 1
3545+
3546+
pm_nl_del_endpoint $ns1 1 10.0.2.1
3547+
sleep 0.5
3548+
chk_subflow_nr "after delete" 1
3549+
chk_mptcp_info subflows 0 subflows 0
3550+
3551+
pm_nl_add_endpoint $ns1 10.0.2.1 flags signal
3552+
wait_mpj $ns2
3553+
chk_subflow_nr "after re-add" 2
3554+
chk_mptcp_info subflows 1 subflows 1
3555+
mptcp_lib_kill_wait $tests_pid
3556+
fi
3557+
35293558
}
35303559

35313560
# [$1: error message]

0 commit comments

Comments
 (0)