[PATCH mptcp-next 7/9] selftests: mptcp: flush userspace addrs list

Geliang Tang posted 9 patches 2 years, 3 months ago
Only 7 patches received!
There is a newer version of this series
[PATCH mptcp-next 7/9] selftests: mptcp: flush userspace addrs list
Posted by Geliang Tang 2 years, 3 months ago
This patch adds some userspace addrs list flush commands in the
userspace tests. Without these changes, some tests will break.

Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
 tools/testing/selftests/net/mptcp/userspace_pm.sh | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tools/testing/selftests/net/mptcp/userspace_pm.sh b/tools/testing/selftests/net/mptcp/userspace_pm.sh
index 27ddbd8cf03f..17e182345bf4 100755
--- a/tools/testing/selftests/net/mptcp/userspace_pm.sh
+++ b/tools/testing/selftests/net/mptcp/userspace_pm.sh
@@ -560,6 +560,7 @@ test_subflows()
 	print_title "Subflows v4 or v6 only tests"
 
 	# Capture events on the network namespace running the server
+	ip netns exec "$ns1" ./pm_nl_ctl flush
 	:>"$server_evts"
 
 	# Attempt to add a listener at 10.0.2.2:<subflow-port>
@@ -638,6 +639,8 @@ test_subflows()
 	   "$client6_token"
 	sleep 0.5
 
+	ip netns exec "$ns2" ./pm_nl_ctl flush
+
 	# Attempt to add a listener at 10.0.2.2:<new-port>
 	ip netns exec "$ns2" ./pm_nl_ctl listen 10.0.2.2\
 	   $new4_port &
@@ -676,6 +679,7 @@ test_subflows()
 	   "$client4_token"
 
 	# Capture events on the network namespace running the client
+	ip netns exec "$ns1" ./pm_nl_ctl flush
 	:>"$client_evts"
 
 	# Attempt to add a listener at 10.0.2.1:<subflow-port>
@@ -753,6 +757,8 @@ test_subflows()
 	   "$server6_token"
 	sleep 0.5
 
+	ip netns exec "$ns1" ./pm_nl_ctl flush
+
 	# Attempt to add a listener at 10.0.2.1:<new-port>
 	ip netns exec "$ns1" ./pm_nl_ctl listen 10.0.2.1\
 	   $new4_port &
@@ -794,6 +800,8 @@ test_subflows_v4_v6_mix()
 {
 	print_title "Subflows v4 and v6 mix tests"
 
+	ip netns exec "$ns2" ./pm_nl_ctl flush
+
 	# Attempt to add a listener at 10.0.2.1:<subflow-port>
 	ip netns exec "$ns1" ./pm_nl_ctl listen 10.0.2.1\
 	   $app6_port &
-- 
2.35.3