[PATCH mptcp-net] selftests: mptcp: allow more slack for slow test-case

Paolo Abeni posted 1 patch 1 year, 2 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/9da09e4407af3ccd51489686c71a3c07c2cb6d3b.1675101940.git.pabeni@redhat.com
Maintainers: Matthieu Baerts <matthieu.baerts@tessares.net>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Shuah Khan <shuah@kernel.org>, Mat Martineau <mathew.j.martineau@linux.intel.com>
tools/testing/selftests/net/mptcp/mptcp_join.sh | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
[PATCH mptcp-net] selftests: mptcp: allow more slack for slow test-case
Posted by Paolo Abeni 1 year, 2 months ago
A test-case is frequently failing on some extremelly slow VMs.
The mptcp transfer completes before the script is able to do
all the required PM manipulation.

Address the issue in the simplest possible way, making the
transfer even more slow.

Additionally dump more info in case of failures, to help debugging
similar problems in the future.

Fixes: e274f7154008 ("selftests: mptcp: add subflow limits test-cases")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
this is just a wild guess, since I can't repro the issue at all. Ideally
it would be great to have a loop with mpj 115 to validate this
---
 tools/testing/selftests/net/mptcp/mptcp_join.sh | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
index 387abdcec011..4e428871f961 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
@@ -1704,7 +1704,12 @@ chk_subflow_nr()
 		echo "[ ok ]"
 	fi
 
-	[ "${dump_stats}" = 1 ] && ( ss -N $ns1 -tOni ; ss -N $ns1 -tOni | grep token; ip -n $ns1 mptcp endpoint )
+	if [ "${dump_stats}" = 1 ]; then
+		ss -N $ns1 -tOni
+		ss -N $ns1 -tOni | grep token
+		ip -n $ns1 mptcp endpoint
+		dump_stats
+	fi
 }
 
 chk_link_usage()
@@ -3103,7 +3108,7 @@ endpoint_tests()
 		pm_nl_set_limits $ns1 1 1
 		pm_nl_set_limits $ns2 1 1
 		pm_nl_add_endpoint $ns2 10.0.2.2 id 2 dev ns2eth2 flags subflow
-		run_tests $ns1 $ns2 10.0.1.1 4 0 0 slow &
+		run_tests $ns1 $ns2 10.0.1.1 4 0 0 speed_20 &
 
 		wait_mpj $ns2
 		pm_nl_del_endpoint $ns2 2 10.0.2.2
-- 
2.39.1
Re: [PATCH mptcp-net] selftests: mptcp: allow more slack for slow test-case
Posted by Matthieu Baerts 1 year, 2 months ago
Hi Paolo,

On 30/01/2023 19:06, Paolo Abeni wrote:
> A test-case is frequently failing on some extremelly slow VMs.
> The mptcp transfer completes before the script is able to do
> all the required PM manipulation.
> 
> Address the issue in the simplest possible way, making the
> transfer even more slow.
> 
> Additionally dump more info in case of failures, to help debugging
> similar problems in the future.

Thank you for looking at this!

> Fixes: e274f7154008 ("selftests: mptcp: add subflow limits test-cases")
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> ---
> this is just a wild guess, since I can't repro the issue at all. Ideally
> it would be great to have a loop with mpj 115 to validate this

It looks like I can still reproduce it on my side when I stress the host
and lower the priority of the VM as mentioned on the ticket:

https://github.com/multipath-tcp/mptcp_net-next/issues/323

I also have the long waiting time after having displayed the 2 OK
messages as described on the ticket but no more ignored error is
displayed, I guess this is fixed by one of your recent patch :-)

For the "long waiting time" issue, it is longer with the patch but not
new: it was already present before your modification. I can share a
patch to stop the transfer earlier and avoid waiting for nothing.


Just one detail below:

> ---
>  tools/testing/selftests/net/mptcp/mptcp_join.sh | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> index 387abdcec011..4e428871f961 100755
> --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
> +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> @@ -1704,7 +1704,12 @@ chk_subflow_nr()
>  		echo "[ ok ]"
>  	fi
>  
> -	[ "${dump_stats}" = 1 ] && ( ss -N $ns1 -tOni ; ss -N $ns1 -tOni | grep token; ip -n $ns1 mptcp endpoint )
> +	if [ "${dump_stats}" = 1 ]; then

I just noticed 'dump_stats' var is not reset/init (and marked as local)
at the beginning of the function.

I can add:

  local dump_stats

above as part of this fix if that's OK for you :)

Other than that:

Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net>

Cheers,
Matt
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net