[PATCH mptcp-net v2 1/6] selftests: mptcp: connect: fix fallback note due to OoO

Matthieu Baerts (NGI0) posted 6 patches 3 weeks, 4 days ago
[PATCH mptcp-net v2 1/6] selftests: mptcp: connect: fix fallback note due to OoO
Posted by Matthieu Baerts (NGI0) 3 weeks, 4 days ago
The "fallback due to TCP OoO" was never printed because the stat_ooo_now
variable was checked twice: once in the parent if-statement, and one in
the child one. The second condition was then always true then, and the
'else' branch was never taken.

The idea is that when there are more ACK + MP_CAPABLE than expected, the
test either fails if there was no out of order packets, or a notice is
printed.

Fixes: 69ca3d29a755 ("mptcp: update selftest for fallback due to OoO")
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
 tools/testing/selftests/net/mptcp/mptcp_connect.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
index 47ecb5b3836e..9b7b93f8eb0c 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
@@ -492,7 +492,7 @@ do_transfer()
 				  "than expected (${expect_synrx})"
 		retc=1
 	fi
-	if [ ${stat_ackrx_now_l} -lt ${expect_ackrx} ] && [ ${stat_ooo_now} -eq 0 ]; then
+	if [ ${stat_ackrx_now_l} -lt ${expect_ackrx} ]; then
 		if [ ${stat_ooo_now} -eq 0 ]; then
 			mptcp_lib_pr_fail "lower MPC ACK rx (${stat_ackrx_now_l})" \
 					  "than expected (${expect_ackrx})"

-- 
2.51.0
Re: [PATCH mptcp-net v2 1/6] selftests: mptcp: connect: fix fallback note due to OoO
Posted by Geliang Tang 3 weeks, 2 days ago
Hi Matt,

On Sun, 2025-11-02 at 12:30 +0100, Matthieu Baerts (NGI0) wrote:
> The "fallback due to TCP OoO" was never printed because the
> stat_ooo_now
> variable was checked twice: once in the parent if-statement, and one
> in
> the child one. The second condition was then always true then, and
> the
> 'else' branch was never taken.

Good catch!

Reviewed-by: Geliang Tang <geliang@kernel.org>

Thanks,
-Geliang

> 
> The idea is that when there are more ACK + MP_CAPABLE than expected,
> the
> test either fails if there was no out of order packets, or a notice
> is
> printed.
> 
> Fixes: 69ca3d29a755 ("mptcp: update selftest for fallback due to
> OoO")
> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
> ---
>  tools/testing/selftests/net/mptcp/mptcp_connect.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh
> b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
> index 47ecb5b3836e..9b7b93f8eb0c 100755
> --- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh
> +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
> @@ -492,7 +492,7 @@ do_transfer()
>  				  "than expected (${expect_synrx})"
>  		retc=1
>  	fi
> -	if [ ${stat_ackrx_now_l} -lt ${expect_ackrx} ] && [
> ${stat_ooo_now} -eq 0 ]; then
> +	if [ ${stat_ackrx_now_l} -lt ${expect_ackrx} ]; then
>  		if [ ${stat_ooo_now} -eq 0 ]; then
>  			mptcp_lib_pr_fail "lower MPC ACK rx
> (${stat_ackrx_now_l})" \
>  					  "than expected
> (${expect_ackrx})"
>