[PATCH mptcp-next] Squash to "selftests: mptcp: update userspace pm test helpers"

Geliang Tang posted 1 patch 6 months, 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/41268eba89466b176262dc6113528af49f051c41.1697301801.git.geliang.tang@suse.com
Maintainers: Matthieu Baerts <matttbe@kernel.org>, Mat Martineau <martineau@kernel.org>, "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>
tools/testing/selftests/net/mptcp/mptcp_join.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH mptcp-next] Squash to "selftests: mptcp: update userspace pm test helpers"
Posted by Geliang Tang 6 months, 2 weeks ago
Fix userspace pm errors reported by CI:

[11:10:11.889] # 112 userspace pm add & remove address
[11:10:29.692] #       syn                                 [ ok ]
[11:10:30.294] #       synack                              [ ok ]
[11:10:30.686] #       ack                                 [ ok ]
[11:10:31.263] #       add                                 [ ok ]
[11:10:31.653] #       echo                                [ ok ]
[11:10:33.644] #       mptcp_info subflows=1:1             [ ok ]
[11:10:35.761] #       subflows_total 2:2                  [ ok ]
[11:10:36.762] #       mptcp_info add_addr_signal=1:1      [ ok ]
[11:10:44.932] #       rm                                  [ ok ]
[11:10:45.321] #       rmsf                                [ ok ]
[11:10:45.325] #       Info: invert
[11:10:46.405] #       mptcp_info subflows=0:0             [ ok ]
[11:10:48.048] #       subflows_total 1:1                  [fail] got subflows 0:0 expected 1:1
[11:10:48.052] # Server ns stats
[11:10:48.310] # TcpPassiveOpens                 2                  0.0
[11:10:48.315] # TcpInSegs                       118                0.0

Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
 tools/testing/selftests/net/mptcp/mptcp_join.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
index 01480663c102..4803ba1ab42d 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
@@ -3316,7 +3316,7 @@ userspace_pm_rm_addr()
 	tk=$(mptcp_lib_evts_get_info token "$evts")
 
 	ip netns exec $1 ./pm_nl_ctl rem token $tk id $2
-	wait_rm_addr $1 1
+	wait_rm_addr $1
 }
 
 # $1: ns ; $2: addr ; $3: id
@@ -3352,7 +3352,7 @@ userspace_pm_rm_sf()
 
 	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
 }
 
 userspace_tests()
-- 
2.35.3
Re: [PATCH mptcp-next] Squash to "selftests: mptcp: update userspace pm test helpers"
Posted by Matthieu Baerts 6 months, 2 weeks ago
Hi Geliang,

14 Oct 2023 18:42:28 Geliang Tang <geliang.tang@suse.com>:

> Fix userspace pm errors reported by CI:
>
> [11:10:11.889] # 112 userspace pm add & remove address
> [11:10:29.692] #       syn                                 [ ok ]
> [11:10:30.294] #       synack                              [ ok ]
> [11:10:30.686] #       ack                                 [ ok ]
> [11:10:31.263] #       add                                 [ ok ]
> [11:10:31.653] #       echo                                [ ok ]
> [11:10:33.644] #       mptcp_info subflows=1:1             [ ok ]
> [11:10:35.761] #       subflows_total 2:2                  [ ok ]
> [11:10:36.762] #       mptcp_info add_addr_signal=1:1      [ ok ]
> [11:10:44.932] #       rm                                  [ ok ]
> [11:10:45.321] #       rmsf                                [ ok ]
> [11:10:45.325] #       Info: invert
> [11:10:46.405] #       mptcp_info subflows=0:0             [ ok ]
> [11:10:48.048] #       subflows_total 1:1                  [fail] got subflows 0:0 expected 1:1
> [11:10:48.052] # Server ns stats
> [11:10:48.310] # TcpPassiveOpens                 2                  0.0
> [11:10:48.315] # TcpInSegs                       118                0.0

Thank you for looking at that!

Do you mind explaining why it is fixing the issue and/or why it was not OK before please?

> diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> index 01480663c102..4803ba1ab42d 100755
> --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
> +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> @@ -3316,7 +3316,7 @@ userspace_pm_rm_addr()
>     tk=$(mptcp_lib_evts_get_info token "$evts")
>
>     ip netns exec $1 ./pm_nl_ctl rem token $tk id $2
> -   wait_rm_addr $1 1
> +   wait_rm_addr $1

From what I understand, this will skip the wait: the number of RM_ADDR will always be different than an empty string.

The second argument represents the number of RM_ADDR before sending the command.

Should it not be 0 issue of 1?

Or better:

  local cnt

  (...)

  cnt=$(rm_addr_count ${1})
  ip netns exec $1 ./pm_nl_ctl rem token $tk id $2
  wait_rm_addr $1 "${cnt}"

No?

> }
>
> # $1: ns ; $2: addr ; $3: id
> @@ -3352,7 +3352,7 @@ userspace_pm_rm_sf()
>
>     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

Same here, you need to pass a second argument to the function otherwise it does nothing. So same as suggested above but with "rm_sf_count" instead.

But I don't know if this will fix the issue.

Cheers,
Matt


> }
>
> userspace_tests()
> --
> 2.35.3

--
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net