Skip to contentSkip to conversation

selftests: mptcp: join: longer timeout

PATCH In review Matthieu Baerts (NGI0) 3 participants 8 messages Nov 12, 2025 – Nov 18, 2025

Subsystems (3)
lore
Share & tools
lore

Matthieu Baerts (NGI0)

author maintainer
#0 lore raw

cover selftests: mptcp: join: longer timeout

A previous attempt was helping, but not enough as the background connections were still stopped after the timeout. That's what the MPTCP CI recently reported with the "delete and re-add" subtest taking a bit more than one minute in a debug environment.

To play it safe, and because increasing the timeout for the background connections doesn't change anything to the end result (the transfer is not checked in this case), all subtests with a background connection not waiting for it to end now have a longer timeout.

---
Matthieu Baerts (NGI0) (2):
selftests: mptcp: join: endpoints: longer timeout
selftests: mptcp: join: userspace: longer timeout

 tools/testing/selftests/net/mptcp/mptcp_join.sh | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

---
base-commit: 83290f9ea1dc9994e0064956147443b2fc290dca
change-id: 20251112-slft-longer-timeout-5a48e854a933

Best regards,

Signature · 1 line
Matthieu Baerts (NGI0) <[email protected]>
author maintainer
#1 lore raw

PATCH 1/2 selftests: mptcp: join: endpoints: longer timeout

In rare cases, when the test environment is very slow, some endpoints tests can fail because some expected events have not been seen.

Because the tests are expecting a long on-going connection, and they are not waiting for the end of the transfer, it is fine to have a longer timeout, and even go over the default one. This connection will be killed at the end, after the verifications: increasing the timeout doesn't change anything, apart from avoiding it to end before the end of the verifications.

To play it safe, all endpoints tests not waiting for the end of the transfer are now having a longer timeout: 2 minutes.

The Fixes commit was making the connection longer, but still, the default timeout would have stopped it after 1 minute, which might not be enough in very slow environments.

Fixes 6457595db987 ("selftests: mptcp: join: endpoints: longer transfer")
---
 tools/testing/selftests/net/mptcp/mptcp_join.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
tools/testing/selftests/net/mptcp/mptcp_join.sh +4 -4
index 41ce0eeed72c..b058f78ea0bd 100755
@@ -4090,7 +4090,7 @@ endpoint_tests()
 		pm_nl_set_limits $ns1 2 2
 		pm_nl_set_limits $ns2 2 2
 		pm_nl_add_endpoint $ns1 10.0.2.1 flags signal
-		{ test_linkfail=128 speed=slow \
+		{ timeout_test=120 test_linkfail=128 speed=slow \
 			run_tests $ns1 $ns2 10.0.1.1 & } 2>/dev/null
 		local tests_pid=$!
 
@@ -4117,7 +4117,7 @@ endpoint_tests()
 		pm_nl_set_limits $ns2 0 3
 		pm_nl_add_endpoint $ns2 10.0.1.2 id 1 dev ns2eth1 flags subflow
 		pm_nl_add_endpoint $ns2 10.0.2.2 id 2 dev ns2eth2 flags subflow
-		{ test_linkfail=128 speed=5 \
+		{ timeout_test=120 test_linkfail=128 speed=5 \
 			run_tests $ns1 $ns2 10.0.1.1 & } 2>/dev/null
 		local tests_pid=$!
 
@@ -4195,7 +4195,7 @@ endpoint_tests()
 		# broadcast IP: no packet for this address will be received on ns1
 		pm_nl_add_endpoint $ns1 224.0.0.1 id 2 flags signal
 		pm_nl_add_endpoint $ns1 10.0.1.1 id 42 flags signal
-		{ test_linkfail=128 speed=5 \
+		{ timeout_test=120 test_linkfail=128 speed=5 \
 			run_tests $ns1 $ns2 10.0.1.1 & } 2>/dev/null
 		local tests_pid=$!
 
@@ -4275,7 +4275,7 @@ endpoint_tests()
 		# broadcast IP: no packet for this address will be received on ns1
 		pm_nl_add_endpoint $ns1 224.0.0.1 id 2 flags signal
 		pm_nl_add_endpoint $ns2 10.0.3.2 id 3 flags subflow
-		{ test_linkfail=128 speed=20 \
+		{ timeout_test=120 test_linkfail=128 speed=20 \
 			run_tests $ns1 $ns2 10.0.1.1 & } 2>/dev/null
 		local tests_pid=$!
 
Signature · 1 line
2.51.0
author maintainer
#2 lore raw

PATCH 2/2 selftests: mptcp: join: userspace: longer timeout

In reply to Matthieu Baerts (NGI0)

In rare cases, when the test environment is very slow, some userspace tests can fail because some expected events have not been seen.

Because the tests are expecting a long on-going connection, and they are not waiting for the end of the transfer, it is fine to have a longer timeout, and even go over the default one. This connection will be killed at the end, after the verifications: increasing the timeout doesn't change anything, apart from avoiding it to end before the end of the verifications.

To play it safe, all userspace tests not waiting for the end of the transfer are now having a longer timeout: 2 minutes.

The Fixes commit was making the connection longer, but still, the default timeout would have stopped it after 1 minute, which might not be enough in very slow environments.

Fixes 290493078b96 ("selftests: mptcp: join: userspace: longer transfer")
---
 tools/testing/selftests/net/mptcp/mptcp_join.sh | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
tools/testing/selftests/net/mptcp/mptcp_join.sh +5 -5
index b058f78ea0bd..541c2676c79e 100755
@@ -3953,7 +3953,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 2 2
-		{ test_linkfail=128 speed=5 \
+		{ timeout_test=120 test_linkfail=128 speed=5 \
 			run_tests $ns1 $ns2 10.0.1.1 & } 2>/dev/null
 		local tests_pid=$!
 		wait_mpj $ns1
@@ -3986,7 +3986,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
-		{ test_linkfail=128 speed=5 \
+		{ timeout_test=120 test_linkfail=128 speed=5 \
 			run_tests $ns1 $ns2 10.0.1.1 & } 2>/dev/null
 		local tests_pid=$!
 		wait_mpj $ns2
@@ -4014,7 +4014,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
-		{ test_linkfail=128 speed=5 \
+		{ timeout_test=120 test_linkfail=128 speed=5 \
 			run_tests $ns1 $ns2 10.0.1.1 & } 2>/dev/null
 		local tests_pid=$!
 		wait_mpj $ns2
@@ -4035,7 +4035,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
-		{ test_linkfail=128 speed=5 \
+		{ timeout_test=120 test_linkfail=128 speed=5 \
 			run_tests $ns1 $ns2 10.0.1.1 & } 2>/dev/null
 		local tests_pid=$!
 		wait_mpj $ns2
@@ -4059,7 +4059,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
-		{ test_linkfail=128 speed=5 \
+		{ timeout_test=120 test_linkfail=128 speed=5 \
 			run_tests $ns1 $ns2 10.0.1.1 & } 2>/dev/null
 		local tests_pid=$!
 		wait_mpj $ns1
Signature · 1 line
2.51.0
#3 lore raw
In reply to Matthieu Baerts (NGI0)

Hi Matthieu,

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): Success! ✅
- KVM Validation: normal (only selftest_mptcp_join): Success! ✅
- KVM Validation: debug (except selftest_mptcp_join): Unstable: 1 failed test(s): selftest_diag 🔴
- KVM Validation: debug (only selftest_mptcp_join): Success! ✅
- KVM Validation: btf-normal (only bpftest_all): Success! ✅
- KVM Validation: btf-debug (only bpftest_all): Success! ✅
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/19293439106

Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/fcb8a7e51251
Patchwork: https://patchwork.kernel.org/project/mptcp/list/?series=1022413

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-normal

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 (NGI0 Core)

author maintainer
#4 lore raw
In reply to Matthieu Baerts (NGI0)

Hello,

Quoted 9 lines · On 12/11/2025 10:45, Matthieu Baerts (NGI0) wrote:

A previous attempt was helping, but not enough as the background connections were still stopped after the timeout. That's what the MPTCP CI recently reported with the "delete and re-add" subtest taking a bit more than one minute in a debug environment.

To play it safe, and because increasing the timeout for the background connections doesn't change anything to the end result (the transfer is not checked in this case), all subtests with a background connection not waiting for it to end now have a longer timeout.

I hope it is OK if I apply these patches now: they are simple, linked to recent patches, and we still have quite a few patches in the queue.

I'm planning to send them with other patches we have in the queue for net ideally today.

Cheers,
Matt

Signature · 1 line
Sponsored by the NGI0 Core fund.
author maintainer
#5 lore raw
Quoted 8 lines · Matthieu Baerts

Hello,

Quoted 5 lines · On 12/11/2025 10:45, Matthieu Baerts (NGI0) wrote:

A previous attempt was helping, but not enough as the background connections were still stopped after the timeout. That's what the MPTCP CI recently reported with the "delete and re-add" subtest taking a bit more than one minute in a debug environment.

Quoted 7 lines
Quoted 4 lines

To play it safe, and because increasing the timeout for the background connections doesn't change anything to the end result (the transfer is not checked in this case), all subtests with a background connection not waiting for it to end now have a longer timeout.

I hope it is OK if I apply these patches now: they are simple, linked to recent patches, and we still have quite a few patches in the queue.

Done:

New patches for t/upstream-net and t/upstream:
- 16a4ac47cd40: selftests: mptcp: join: endpoints: longer timeout
- 5dd3ee3a0e67: selftests: mptcp: join: userspace: longer timeout
- Results: b6737ab5301a..7cd73169934a (export-net)
- Results: 622c76f2be66..f642d28cfc23 (export)

Tests are now in progress:

- export-net:
https://github.com/multipath-tcp/mptcp_net-next/commit/660070b99dec84a338e2efd835be9a68f63316a1/checks
- export:
https://github.com/multipath-tcp/mptcp_net-next/commit/89520dc46a1f4d65bffc7bac94b57b3ecf12cbe9/checks

Cheers,
Matt

Signature · 1 line
Sponsored by the NGI0 Core fund.
reviewer
#6 lore raw
In reply to Matthieu Baerts

Hi Matt,

Quoted 18 lines · Matthieu Baerts

Hello,

Quoted 7 lines · On 12/11/2025 10:45, Matthieu Baerts (NGI0) wrote:

A previous attempt was helping, but not enough as the background connections were still stopped after the timeout. That's what the MPTCP
CI recently reported with the "delete and re-add" subtest taking a bit
more than one minute in a debug environment.

Quoted 7 lines

To play it safe, and because increasing the timeout for the background
connections doesn't change anything to the end result (the transfer is
not checked in this case), all subtests with a background connection not
waiting for it to end now have a longer timeout.

Quoted 6 lines

I hope it is OK if I apply these patches now: they are simple, linked to
recent patches, and we still have quite a few patches in the queue.

I'm planning to send them with other patches we have in the queue for net ideally today.

Sorry for the delay. I just replied my RB tags to them for -net.

Thanks,
-Geliang

Quoted 3 lines

Cheers,
Matt

author maintainer
#7 lore raw

Hi Geliang,

Quoted 17 lines · Geliang Tang
Quoted 16 lines · Matthieu Baerts
Quoted 14 lines · On 12/11/2025 10:45, Matthieu Baerts (NGI0) wrote:

A previous attempt was helping, but not enough as the background connections were still stopped after the timeout. That's what the MPTCP
CI recently reported with the "delete and re-add" subtest taking a bit
more than one minute in a debug environment.

To play it safe, and because increasing the timeout for the background
connections doesn't change anything to the end result (the transfer is
not checked in this case), all subtests with a background connection not
waiting for it to end now have a longer timeout.

Quoted 8 lines
Quoted 6 lines

I hope it is OK if I apply these patches now: they are simple, linked to
recent patches, and we still have quite a few patches in the queue.

I'm planning to send them with other patches we have in the queue for net ideally today.

Sorry for the delay. I just replied my RB tags to them for -net.

No problem, I'm sure that kind of simple patch in the selftests would have been accepted without additional tags. Thank you for having sent them!

Cheers,
Matt

Signature · 1 line
Sponsored by the NGI0 Core fund.