Re: [PATCH net 09/11] selftests: mptcp: join: userspace: longer timeout

From: Geliang Tang
Date: Tue Nov 18 2025 - 03:41:28 EST


Hi Matt,

On Tue, 2025-11-18 at 08:20 +0100, Matthieu Baerts (NGI0) wrote:
> 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")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@xxxxxxxxxx>

This patch looks good to me.

Reviewed-by: Geliang Tang <geliang@xxxxxxxxxx>

Thanks,
-Geliang

> ---
>  tools/testing/selftests/net/mptcp/mptcp_join.sh | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh
> b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> index 93d38ded5e4e..74632beae2c6 100755
> --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
> +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> @@ -3804,7 +3804,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
> @@ -3837,7 +3837,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
> @@ -3865,7 +3865,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
> @@ -3886,7 +3886,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
> @@ -3910,7 +3910,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