This patch invokes chk_mptcp_info() to check subflows infos of userspace
PM tests and endpoint tests.
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
tools/testing/selftests/net/mptcp/mptcp_join.sh | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
index 582b763f652b..700e525750d6 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
@@ -3109,6 +3109,7 @@ userspace_tests()
sleep 1
chk_join_nr 1 1 1
chk_add_nr 1 1
+ chk_mptcp_info subflows_1
ip netns exec $ns1 ./pm_nl_ctl rem token $tk id $id
sp=$(grep "type:10" "$evts_ns1" |
sed -n 's/.*\(sport:\)\([[:digit:]]*\).*$/\2/p;q')
@@ -3120,6 +3121,7 @@ userspace_tests()
lport $sp rip $da rport $dp token $tk
wait_rm_addr $ns1 1
chk_rm_nr 1 1 invert
+ chk_mptcp_info subflows_0
kill_events_pids
kill_tests_wait
fi
@@ -3140,6 +3142,7 @@ userspace_tests()
rip $da rport $dp token $tk
sleep 1
chk_join_nr 1 1 1
+ chk_mptcp_info subflows_1
sp=$(grep "type:10" "$evts_ns2" |
sed -n 's/.*\(sport:\)\([[:digit:]]*\).*$/\2/p;q')
ip netns exec $ns2 ./pm_nl_ctl rem token $tk id $id
@@ -3147,6 +3150,7 @@ userspace_tests()
rip $da rport $dp token $tk
wait_rm_addr $ns2 1
chk_rm_nr 1 1
+ chk_mptcp_info subflows_0
kill_events_pids
kill_tests_wait
fi
@@ -3164,14 +3168,21 @@ endpoint_tests()
wait_mpj $ns1
pm_nl_check_endpoint 1 "creation" \
$ns2 10.0.2.2 id 1 flags implicit
+ chk_mptcp_info subflows_1
pm_nl_add_endpoint $ns2 10.0.2.2 id 33
pm_nl_check_endpoint 0 "ID change is prevented" \
$ns2 10.0.2.2 id 1 flags implicit
+ chk_mptcp_info subflows_1
pm_nl_add_endpoint $ns2 10.0.2.2 flags signal
pm_nl_check_endpoint 0 "modif is allowed" \
$ns2 10.0.2.2 id 1 flags signal
+ chk_mptcp_info subflows_1
+
+ pm_nl_del_endpoint $ns2 1 10.0.2.2
+ wait_rm_addr ${ns2} 1
+ chk_mptcp_info subflows_0
kill_tests_wait
fi
--
2.35.3