linux/tools/testing/selftests/net/mptcp
Andrea Claudi c8c101ae39 selftests: mptcp: join: fix 'implicit EP' test
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: 69c6ce7b6e ("selftests: mptcp: add implicit endpoint test case")
Cc: stable@vger.kernel.org
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Link: https://lore.kernel.org/r/20230803-upstream-net-20230803-misc-fixes-6-5-v1-2-6671b1ab11cc@tessares.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-08-04 18:26:27 -07:00
..
.gitignore selftests: mptcp: add inq test case 2021-12-07 11:36:30 -08:00
Makefile selftests: mptcp: connect: skip if MPTCP is not supported 2023-05-30 13:21:02 +02:00
config selftests: mptcp: depend on SYN_COOKIES 2023-07-05 10:51:14 +01:00
diag.sh selftests: mptcp: diag: skip inuse tests if not supported 2023-06-10 00:02:16 -07:00
mptcp_connect.c selftests: mptcp: remove duplicated entries in usage 2023-04-17 08:25:33 +01:00
mptcp_connect.sh selftests: mptcp: connect: fail if nft supposed to work 2023-07-05 10:51:14 +01:00
mptcp_inq.c selftests: mptcp: Initialize variables to quiet gcc 12 warnings 2022-06-28 20:45:43 -07:00
mptcp_join.sh selftests: mptcp: join: fix 'implicit EP' test 2023-08-04 18:26:27 -07:00
mptcp_lib.sh selftests: mptcp: lib: skip if not below kernel version 2023-06-12 16:55:42 -07:00
mptcp_sockopt.c selftests: mptcp: add MPTCP_FULL_INFO testcase 2023-06-21 22:45:58 -07:00
mptcp_sockopt.sh selftests: mptcp: sockopt: return error if wrong mark 2023-07-05 10:51:14 +01:00
pm_netlink.sh selftests: mptcp: pm nl: skip fullmesh flag checks if not supported 2023-06-10 00:02:16 -07:00
pm_nl_ctl.c selftests: mptcp: pm_nl_ctl: fix 32-bit support 2023-07-05 10:51:14 +01:00
settings selftests: mptcp: increase timeout to 20 minutes 2022-02-17 19:59:58 -08:00
simult_flows.sh selftests: mptcp: simult flows: skip if MPTCP is not supported 2023-05-30 13:21:03 +02:00
userspace_pm.sh selftests: mptcp: userspace_pm: report errors with 'remove' tests 2023-07-05 10:51:14 +01:00