diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh index 403200394aa769..e603baa1d4a8c7 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -3372,6 +3372,18 @@ userspace_pm_dump() ip netns exec $1 ./pm_nl_ctl dump token $tk } +# $1: ns ; $2: id +userspace_pm_get_addr() +{ + local evts=$evts_ns1 + local tk + + [ "$1" == "$ns2" ] && evts=$evts_ns2 + tk=$(mptcp_lib_evts_get_info token "$evts") + + ip netns exec $1 ./pm_nl_ctl get $2 token $tk +} + check_output() { local cmd="$1" @@ -3602,6 +3614,8 @@ userspace_tests() chk_subflows_total 2 2 chk_mptcp_info add_addr_signal 1 add_addr_accepted 1 local dump="id 10 flags signal 10.0.2.1" + check_output "userspace_pm_get_addr $ns1 10" \ + "$dump" " get id 10 addr" check_output "userspace_pm_dump $ns1" \ "$dump" " dump addrs signal" kill_events_pids @@ -3624,6 +3638,8 @@ userspace_tests() chk_mptcp_info subflows 1 subflows 1 chk_subflows_total 2 2 local dump="id 20 flags subflow 10.0.3.2" + check_output "userspace_pm_get_addr $ns2 20" \ + "$dump" " get id 20 addr" check_output "userspace_pm_dump $ns2" \ "$dump" " dump addrs subflow" kill_events_pids