Skip to contentSkip to conversation

fix userspace pm CI failures

PATCH Superseded Geliang Tang 2 participants 5 messages Oct 16, 2023

Subsystems (3)

v2 of 17 Superseded Latest is v17 →

lore
Share & tools
lore
#0 lore raw

v2 cover fix userspace pm CI failures

From: Geliang Tang <[email protected]>

v2:
- set speed to 5

Geliang Tang (3):
selftests: mptcp: run userspace pm tests slower
selftests: mptcp: fix wait_rm_addr/sf parameters Squash to "selftests: mptcp: userspace pm create id 0 subflow"

 tools/testing/selftests/net/mptcp/mptcp_join.sh | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)
Signature · 1 line
2.35.3
#1 lore raw

PATCH v2 1/3 selftests: mptcp: run userspace pm tests slower

From: Geliang Tang <[email protected]>

Some userspace pm tests failed are reported by CI:

112 userspace pm add & remove address

      syn                                 [ ok ]
      synack                              [ ok ]
      ack                                 [ ok ]
      add                                 [ ok ]
      echo                                [ ok ]
      mptcp_info subflows=1:1             [ ok ]
      subflows_total 2:2                  [ ok ]
      mptcp_info add_addr_signal=1:1      [ ok ]
      rm                                  [ ok ]
      rmsf                                [ ok ]

Info: invert
mptcp_info subflows=0:0 [ ok ]
subflows_total 1:1 [fail]
got subflows 0:0 expected 1:1
Server ns stats

TcpPassiveOpens                 2                  0.0
TcpInSegs                       118                0.0

This patch fixes them by change 'speed' to 5 to run the tests much more slower.

Fixes 4369c198e599 ("selftests: mptcp: test userspace pm out of transfer")
---
 tools/testing/selftests/net/mptcp/mptcp_join.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/testing/selftests/net/mptcp/mptcp_join.sh +2 -2
index 01480663c102..1fc33bb3aba1 100755
@@ -3435,7 +3435,7 @@ userspace_tests()
 	   continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/pm_type'; then
 		set_userspace_pm $ns1
 		pm_nl_set_limits $ns2 1 1
-		speed=10 \
+		speed=5 \
 			run_tests $ns1 $ns2 10.0.1.1 &
 		local tests_pid=$!
 		wait_mpj $ns1
@@ -3459,7 +3459,7 @@ userspace_tests()
 	   continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/pm_type'; then
 		set_userspace_pm $ns2
 		pm_nl_set_limits $ns1 0 1
-		speed=10 \
+		speed=5 \
 			run_tests $ns1 $ns2 10.0.1.1 &
 		local tests_pid=$!
 		wait_mpj $ns2
Signature · 1 line
2.35.3
#2 lore raw

PATCH v2 2/3 selftests: mptcp: fix wait_rm_addr/sf parameters

In reply to Geliang Tang

From: Geliang Tang <[email protected]>

The second input parameter of 'wait_rm_addr/sf $1 1' is misused. If it's 1, wait_rm_addr/sf will never break, and will loop ten times, then 'wait_rm_addr/sf' equals to 'sleep 1'. This delay time is too long, which can sometimes make the tests failures.

A better way to use wait_rm_addr/sf is to use rm_addr/sf_count to obtain the current value, and then pass into wait_rm_addr/sf.

Fixes 4369c198e599 ("selftests: mptcp: test userspace pm out of transfer")
---
 tools/testing/selftests/net/mptcp/mptcp_join.sh | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
tools/testing/selftests/net/mptcp/mptcp_join.sh +6 -2
index 1fc33bb3aba1..b1386b07e312 100755
@@ -3311,12 +3311,14 @@ userspace_pm_rm_addr()
 {
 	local evts=$evts_ns1
 	local tk
+	local cnt
 
 	[ "$1" == "$ns2" ] && evts=$evts_ns2
 	tk=$(mptcp_lib_evts_get_info token "$evts")
 
+	cnt=$(rm_addr_count ${1})
 	ip netns exec $1 ./pm_nl_ctl rem token $tk id $2
-	wait_rm_addr $1 1
+	wait_rm_addr $1 "${cnt}"
 }
 
 # $1: ns ; $2: addr ; $3: id
@@ -3342,6 +3344,7 @@ userspace_pm_rm_sf()
 	local t=${3:-1}
 	local ip=4
 	local tk da dp sp
+	local cnt
 
 	[ "$1" == "$ns2" ] && evts=$evts_ns2
 	if is_v6 $2; then ip=6; fi
@@ -3350,9 +3353,10 @@ userspace_pm_rm_sf()
 	dp=$(mptcp_lib_evts_get_info dport "$evts" $t)
 	sp=$(mptcp_lib_evts_get_info sport "$evts" $t)
 
+	cnt=$(rm_sf_count ${1})
 	ip netns exec $1 ./pm_nl_ctl dsf lip $2 lport $sp \
 				rip $da rport $dp token $tk
-	wait_rm_sf $1 1
+	wait_rm_sf $1 "${cnt}"
 }
 
 userspace_tests()
Signature · 1 line
2.35.3
#3 lore raw

PATCH v2 3/3 Squash to "selftests: mptcp: userspace pm create id 0 subflow"

In reply to Geliang Tang

From: Geliang Tang <[email protected]>

Change speed to 5 too.

---
 tools/testing/selftests/net/mptcp/mptcp_join.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/net/mptcp/mptcp_join.sh +1 -1
index b1386b07e312..7456dac7c321 100755
@@ -3485,7 +3485,7 @@ userspace_tests()
 	   continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/pm_type'; then
 		set_userspace_pm $ns2
 		pm_nl_set_limits $ns1 0 1
-		speed=10 \
+		speed=5 \
 			run_tests $ns1 $ns2 10.0.1.1 &
 		local tests_pid=$!
 		wait_mpj $ns2
Signature · 1 line
2.35.3
#4 lore raw

Re: Squash to "selftests: mptcp: userspace pm create id 0 subflow": Tests Results

Hi Geliang,

Thank you for your modifications, that's great!

Our CI did some validations and here is its report:

- KVM Validation: normal (except selftest_mptcp_join):
- Unstable: 1 failed test(s): selftest_simult_flows 🔴:
- Task: https://cirrus-ci.com/task/4578649421119488
- Summary: https://api.cirrus-ci.com/v1/artifact/task/4578649421119488/summary/summary.txt

- KVM Validation: debug (only selftest_mptcp_join):
- Unstable: 1 failed test(s): selftest_mptcp_join 🔴:
- Task: https://cirrus-ci.com/task/6267499281383424
- Summary: https://api.cirrus-ci.com/v1/artifact/task/6267499281383424/summary/summary.txt

- KVM Validation: debug (except selftest_mptcp_join):
- Success! ✅:
- Task: https://cirrus-ci.com/task/5141599374540800
- Summary: https://api.cirrus-ci.com/v1/artifact/task/5141599374540800/summary/summary.txt

- KVM Validation: normal (only selftest_mptcp_join):
- Success! ✅:
- Task: https://cirrus-ci.com/task/5704549327962112
- Summary: https://api.cirrus-ci.com/v1/artifact/task/5704549327962112/summary/summary.txt

Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/73c27f3a33d9

If there are some issues, you can reproduce them using the same environment as the one used by the CI thanks to a docker image, e.g.:

    $ cd [kernel source code]
    $ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
        --pull always mptcp/mptcp-upstream-virtme-docker:latest \
        auto-debug

For more details:

https://github.com/multipath-tcp/mptcp-upstream-virtme-docker

Please note that despite all the efforts that have been already done to have a stable tests suite when executed on a public CI like here, it is possible some reported issues are not due to your modifications. Still, do not hesitate to help us improve that ;-)

Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (Tessares)