public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net 0/8] selftests: mptcp: skip tests not supported by old kernels (part 1)
@ 2023-05-28 17:35 Matthieu Baerts
  2023-05-28 17:35 ` [PATCH net 1/8] selftests: mptcp: join: avoid using 'cmp --bytes' Matthieu Baerts
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Matthieu Baerts @ 2023-05-28 17:35 UTC (permalink / raw)
  To: mptcp, Mat Martineau, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Shuah Khan, Christoph Paasch,
	Florian Westphal, Davide Caratti, Kishen Maloor
  Cc: netdev, linux-kselftest, linux-kernel, Matthieu Baerts, stable

After a few years of increasing test coverage in the MPTCP selftests, we
realised [1] the last version of the selftests is supposed to run on old
kernels without issues.

Supporting older versions is not that easy for this MPTCP case: these
selftests are often validating the internals by checking packets that
are exchanged, when some MIB counters are incremented after some
actions, how connections are getting opened and closed in some cases,
etc. In other words, it is not limited to the socket interface between
the userspace and the kernelspace. In addition, the current selftests
run a lot of different sub-tests but the TAP13 protocol used in the
selftests don't support sub-tests: in other words, one failure in
sub-tests implies that the whole selftest is seen as failed at the end
because sub-tests are not tracked. It is then important to skip
sub-tests not supported by old kernels.

To minimise the modifications and reduce the complexity to support old
versions, the idea is to look at external signs and skip the whole
selftests or just some sub-tests before starting them.

This first part focuses on marking the different selftests as skipped
if MPTCP is not even supported. That's what is done in patches 2 to 8.
Patch 2/8 introduces a new file (mptcp_lib.sh) to be able to re-use some
helpers in the different selftests. The first MPTCP selftest has been
introduced in v5.6.

Patch 1/8 is a bit different but still linked: it modifies mptcp_join.sh
selftest not to use 'cmp --bytes' which is not supported by the BusyBox
implementation. It is apparently quite common to use BusyBox in CI
environments. This tool is needed for a subtest introduced in v6.1.

Link: https://lore.kernel.org/stable/CA+G9fYtDGpgT4dckXD-y-N92nqUxuvue_7AtDdBcHrbOMsDZLg@mail.gmail.com/ [1]
Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
---
Matthieu Baerts (8):
      selftests: mptcp: join: avoid using 'cmp --bytes'
      selftests: mptcp: connect: skip if MPTCP is not supported
      selftests: mptcp: pm nl: skip if MPTCP is not supported
      selftests: mptcp: join: skip if MPTCP is not supported
      selftests: mptcp: diag: skip if MPTCP is not supported
      selftests: mptcp: simult flows: skip if MPTCP is not supported
      selftests: mptcp: sockopt: skip if MPTCP is not supported
      selftests: mptcp: userspace pm: skip if MPTCP is not supported

 tools/testing/selftests/net/mptcp/Makefile         |  2 +-
 tools/testing/selftests/net/mptcp/diag.sh          |  4 +++
 tools/testing/selftests/net/mptcp/mptcp_connect.sh |  4 +++
 tools/testing/selftests/net/mptcp/mptcp_join.sh    | 17 +++++++--
 tools/testing/selftests/net/mptcp/mptcp_lib.sh     | 40 ++++++++++++++++++++++
 tools/testing/selftests/net/mptcp/mptcp_sockopt.sh |  4 +++
 tools/testing/selftests/net/mptcp/pm_netlink.sh    |  4 +++
 tools/testing/selftests/net/mptcp/simult_flows.sh  |  4 +++
 tools/testing/selftests/net/mptcp/userspace_pm.sh  |  4 +++
 9 files changed, 80 insertions(+), 3 deletions(-)
---
base-commit: 9b9e46aa07273ceb96866b2e812b46f1ee0b8d2f
change-id: 20230528-upstream-net-20230528-mptcp-selftests-support-old-kernels-part-1-305638f4dbc0

Best regards,
-- 
Matthieu Baerts <matthieu.baerts@tessares.net>


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-05-30 11:50 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-28 17:35 [PATCH net 0/8] selftests: mptcp: skip tests not supported by old kernels (part 1) Matthieu Baerts
2023-05-28 17:35 ` [PATCH net 1/8] selftests: mptcp: join: avoid using 'cmp --bytes' Matthieu Baerts
2023-05-28 17:35 ` [PATCH net 2/8] selftests: mptcp: connect: skip if MPTCP is not supported Matthieu Baerts
2023-05-28 17:35 ` [PATCH net 3/8] selftests: mptcp: pm nl: " Matthieu Baerts
2023-05-28 17:35 ` [PATCH net 4/8] selftests: mptcp: join: " Matthieu Baerts
2023-05-28 17:35 ` [PATCH net 5/8] selftests: mptcp: diag: " Matthieu Baerts
2023-05-28 17:35 ` [PATCH net 6/8] selftests: mptcp: simult flows: " Matthieu Baerts
2023-05-28 17:35 ` [PATCH net 7/8] selftests: mptcp: sockopt: " Matthieu Baerts
2023-05-28 17:35 ` [PATCH net 8/8] selftests: mptcp: userspace pm: " Matthieu Baerts
2023-05-30 11:50 ` [PATCH net 0/8] selftests: mptcp: skip tests not supported by old kernels (part 1) patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox