mptcp_join 'implicit EP' test currently fails when using ip mptcp:
$ ./mptcp_join.sh -iI
<snip>
001 implicit EP creation[fail] expected '10.0.2.2 10.0.2.2 id 1 implicit' found '10.0.2.2 id 1 rawflags 10 '
Error: too many addresses or duplicate one: -22.
ID change is prevented[fail] expected '10.0.2.2 10.0.2.2 id 1 implicit' found '10.0.2.2 id 1 rawflags 10 '
modif is allowed[fail] expected '10.0.2.2 10.0.2.2 id 1 signal' found '10.0.2.2 id 1 signal '
This happens because of two reasons:
- iproute v6.3.0 does not support the implicit flag, fixed with
iproute2-next commit 3a2535a41854 ("mptcp: add support for implicit
flag")
- pm_nl_check_endpoint wrongly expects the ip address to be repeated two
times in iproute output, and does not account for a final whitespace
in it.
This fixes the issue trimming the whitespace in the output string and
removing the double address in the expected string.
Fixes: 34aa6e3bccd8 ("selftests: mptcp: add ip mptcp wrappers")
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
---
tools/testing/selftests/net/mptcp/mptcp_join.sh | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
index b972feb9a3a2..4938baa4c5fe 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
@@ -769,10 +769,11 @@ pm_nl_check_endpoint()
fi
if [ $ip_mptcp -eq 1 ]; then
+ # get line and trim trailing whitespace
line=$(ip -n $ns mptcp endpoint show $id)
+ line="${line% }"
# the dump order is: address id flags port dev
- expected_line="$addr"
- [ -n "$addr" ] && expected_line="$expected_line $addr"
+ [ -n "$addr" ] && expected_line="$addr"
expected_line="$expected_line $id"
[ -n "$_flags" ] && expected_line="$expected_line ${_flags//","/" "}"
[ -n "$dev" ] && expected_line="$expected_line $dev"
--
2.41.0
Hi Andrea,
On 27/07/2023 13:08, Andrea Claudi wrote:
> mptcp_join 'implicit EP' test currently fails when using ip mptcp:
>
> $ ./mptcp_join.sh -iI
> <snip>
> 001 implicit EP creation[fail] expected '10.0.2.2 10.0.2.2 id 1 implicit' found '10.0.2.2 id 1 rawflags 10 '
> Error: too many addresses or duplicate one: -22.
> ID change is prevented[fail] expected '10.0.2.2 10.0.2.2 id 1 implicit' found '10.0.2.2 id 1 rawflags 10 '
> modif is allowed[fail] expected '10.0.2.2 10.0.2.2 id 1 signal' found '10.0.2.2 id 1 signal '
>
> This happens because of two reasons:
> - iproute v6.3.0 does not support the implicit flag, fixed with
> iproute2-next commit 3a2535a41854 ("mptcp: add support for implicit
> flag")
> - pm_nl_check_endpoint wrongly expects the ip address to be repeated two
> times in iproute output, and does not account for a final whitespace
> in it.
>
> This fixes the issue trimming the whitespace in the output string and
> removing the double address in the expected string.
>
> Fixes: 34aa6e3bccd8 ("selftests: mptcp: add ip mptcp wrappers")
I guess it is not the right one to use, you might want to keep the one
you had in v1:
Fixes: 69c6ce7b6eca ("selftests: mptcp: add implicit endpoint test case")
No?
Cheers,
Matt
--
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net
On Thu, Jul 27, 2023 at 06:52:50PM +0200, Matthieu Baerts wrote:
> Hi Andrea,
>
> On 27/07/2023 13:08, Andrea Claudi wrote:
> > mptcp_join 'implicit EP' test currently fails when using ip mptcp:
> >
> > $ ./mptcp_join.sh -iI
> > <snip>
> > 001 implicit EP creation[fail] expected '10.0.2.2 10.0.2.2 id 1 implicit' found '10.0.2.2 id 1 rawflags 10 '
> > Error: too many addresses or duplicate one: -22.
> > ID change is prevented[fail] expected '10.0.2.2 10.0.2.2 id 1 implicit' found '10.0.2.2 id 1 rawflags 10 '
> > modif is allowed[fail] expected '10.0.2.2 10.0.2.2 id 1 signal' found '10.0.2.2 id 1 signal '
> >
> > This happens because of two reasons:
> > - iproute v6.3.0 does not support the implicit flag, fixed with
> > iproute2-next commit 3a2535a41854 ("mptcp: add support for implicit
> > flag")
> > - pm_nl_check_endpoint wrongly expects the ip address to be repeated two
> > times in iproute output, and does not account for a final whitespace
> > in it.
> >
> > This fixes the issue trimming the whitespace in the output string and
> > removing the double address in the expected string.
> >
> > Fixes: 34aa6e3bccd8 ("selftests: mptcp: add ip mptcp wrappers")
>
> I guess it is not the right one to use, you might want to keep the one
> you had in v1:
>
> Fixes: 69c6ce7b6eca ("selftests: mptcp: add implicit endpoint test case")
>
> No?
Yes, the one in v1 is the correct one. I somehow mixed it up amending
the patch, sorry for that.
>
> Cheers,
> Matt
> --
> Tessares | Belgium | Hybrid Access Solutions
> www.tessares.net
>
© 2016 - 2026 Red Hat, Inc.