Skip to content

Commit

Permalink
selftests: mptcp: add testcases for removing addrs
Browse files Browse the repository at this point in the history
This patch added the testcases for removing a list of addresses. Used
the netlink to flush the addresses in the testcases.

Reviewed-by: Mat Martineau <[email protected]>
Signed-off-by: Geliang Tang <[email protected]>
  • Loading branch information
geliangtang authored and jenkins-tessares committed Feb 18, 2021
1 parent 26f4ca2 commit ab09cf3
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tools/testing/selftests/net/mptcp/mptcp_join.sh
Original file line number Diff line number Diff line change
Expand Up @@ -890,6 +890,29 @@ remove_tests()
chk_join_nr "flush subflows and signal" 3 3 3
chk_add_nr 1 1
chk_rm_nr 2 2

# subflows flush
reset
ip netns exec $ns1 ./pm_nl_ctl limits 3 3
ip netns exec $ns2 ./pm_nl_ctl limits 3 3
ip netns exec $ns2 ./pm_nl_ctl add 10.0.2.2 flags subflow id 150
ip netns exec $ns2 ./pm_nl_ctl add 10.0.3.2 flags subflow
ip netns exec $ns2 ./pm_nl_ctl add 10.0.4.2 flags subflow
run_tests $ns1 $ns2 10.0.1.1 0 -8 -8 slow
chk_join_nr "flush subflows" 3 3 3
chk_rm_nr 3 3

# addresses flush
reset
ip netns exec $ns1 ./pm_nl_ctl limits 3 3
ip netns exec $ns1 ./pm_nl_ctl add 10.0.2.1 flags signal id 250
ip netns exec $ns1 ./pm_nl_ctl add 10.0.3.1 flags signal
ip netns exec $ns1 ./pm_nl_ctl add 10.0.4.1 flags signal
ip netns exec $ns2 ./pm_nl_ctl limits 3 3
run_tests $ns1 $ns2 10.0.1.1 0 -8 -8 slow
chk_join_nr "flush addresses" 3 3 3
chk_add_nr 3 3
chk_rm_nr 3 3 invert
}

add_tests()
Expand Down

0 comments on commit ab09cf3

Please sign in to comment.