[PATCH mptcp-next v2] Squash to "selftests: mptcp: add the MP_FAIL testcases v6"

Geliang Tang posted 1 patch 2 years, 2 months ago
Failed in applying to current master (apply log)
.../testing/selftests/net/mptcp/mptcp_join.sh | 22 +++++++------------
1 file changed, 8 insertions(+), 14 deletions(-)
[PATCH mptcp-next v2] Squash to "selftests: mptcp: add the MP_FAIL testcases v6"
Posted by Geliang Tang 2 years, 2 months ago
Add delays and drop 'retry' in the multiple subflows test.

Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
v2:
 - add delays in fail_tests, instead of reset_with_fail.
---
 .../testing/selftests/net/mptcp/mptcp_join.sh | 22 +++++++------------
 1 file changed, 8 insertions(+), 14 deletions(-)

diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
index dbc73e28cc06..0b8f253d95cd 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
@@ -2291,20 +2291,14 @@ pedit_action_pkts()
 fail_tests()
 {
 	# multiple subflows
-	# If the tc rules didn't produce the bit flips, retry three times.
-	for n in `seq 1 3`; do
-		reset_with_fail 2
-		pm_nl_set_limits $ns1 0 2
-		pm_nl_set_limits $ns2 0 2
-		pm_nl_add_endpoint $ns2 10.0.2.2 dev ns2eth2 flags subflow
-		pm_nl_add_endpoint $ns2 10.0.3.2 dev ns2eth3 flags subflow
-		run_tests $ns1 $ns2 10.0.1.1 1024
-		if [ $(pedit_action_pkts) -gt 0 ]; then
-			break
-		else
-			printf "%03u %s\n" "$TEST_COUNT" "MP_FAIL MP_RST: retry $n"
-		fi
-	done
+	reset_with_fail 2
+	tc -n $ns2 qdisc add dev ns2eth1 root netem rate 20mbit delay 1
+	tc -n $ns2 qdisc add dev ns2eth3 root netem rate 20mbit delay 1
+	pm_nl_set_limits $ns1 0 2
+	pm_nl_set_limits $ns2 0 2
+	pm_nl_add_endpoint $ns2 10.0.2.2 dev ns2eth2 flags subflow
+	pm_nl_add_endpoint $ns2 10.0.3.2 dev ns2eth3 flags subflow
+	run_tests $ns1 $ns2 10.0.1.1 1024
 	chk_join_nr "MP_FAIL MP_RST: $(pedit_action_pkts) corrupted pkts" 2 2 2 1 1
 
 	# single subflow
-- 
2.34.1