Series |
selftests: mptcp: skip tests when features are not supported
|
expand
-
[mptcp-net,v2,00/37] selftests: mptcp: skip tests when features are not supported
-
[mptcp-net,v2,01/37] selftests: mptcp: connect: skip if MPTCP is not supported
-
[mptcp-net,v2,02/37] selftests: mptcp: pm nl: skip if MPTCP is not supported
-
[mptcp-net,v2,03/37] selftests: mptcp: join: skip if MPTCP is not supported
-
[mptcp-net,v2,04/37] selftests: mptcp: diag: skip if MPTCP is not supported
-
[mptcp-net,v2,05/37] selftests: mptcp: simult flows: skip if MPTCP is not supported
-
[mptcp-net,v2,06/37] selftests: mptcp: sockopt: skip if MPTCP is not supported
-
[mptcp-net,v2,07/37] selftests: mptcp: userspace pm: skip if MPTCP is not supported
-
[mptcp-net,v2,08/37] selftests: mptcp: lib: skip if missing symbol
-
[mptcp-net,v2,09/37] selftests: mptcp: lib: skip if not below kernel version
-
[mptcp-net,v2,10/37] selftests: mptcp: connect: skip transp tests if not supported
-
[mptcp-net,v2,11/37] selftests: mptcp: connect: skip disconnect tests if not supported
-
[mptcp-net,v2,12/37] selftests: mptcp: connect: skip TFO tests if not supported
-
[mptcp-net,v2,13/37] selftests: mptcp: diag: skip listen tests if not supported
-
[mptcp-net,v2,14/37] selftests: mptcp: diag: skip inuse tests if not supported
-
[mptcp-net,v2,15/37] selftests: mptcp: pm nl: remove hardcoded default limits
-
[mptcp-net,v2,16/37] selftests: mptcp: pm nl: skip fullmesh flag checks if not supported
-
[mptcp-net,v2,17/37] selftests: mptcp: sockopt: relax expected returned size
-
[mptcp-net,v2,18/37] selftests: mptcp: sockopt: skip getsockopt checks if not supported
-
[mptcp-net,v2,19/37] selftests: mptcp: sockopt: skip TCP_INQ checks if not supported
-
[mptcp-net,v2,20/37] selftests: mptcp: userspace pm: skip if 'ip' tool is unavailable
-
[mptcp-net,v2,21/37] selftests: mptcp: userspace pm: skip if not supported
-
[mptcp-net,v2,22/37] selftests: mptcp: userspace pm: skip PM listener events tests if unavailable
-
[mptcp-net,v2,23/37] selftests: mptcp: join: use 'iptables-legacy' if available
-
[mptcp-net,v2,24/37] selftests: mptcp: join: helpers to skip tests
-
[mptcp-net,v2,25/37] selftests: mptcp: join: skip check if MIB counter not supported
-
[mptcp-net,v2,26/37] selftests: mptcp: join: skip test if iptables/tc cmds fail
-
[mptcp-net,v2,27/37] selftests: mptcp: join: support local endpoint being tracked or not
-
[mptcp-net,v2,28/37] selftests: mptcp: join: skip Fastclose tests if not supported
-
[mptcp-net,v2,29/37] selftests: mptcp: join: support RM_ADDR for used endpoints or not
-
[mptcp-net,v2,30/37] selftests: mptcp: join: skip implicit tests if not supported
-
[mptcp-net,v2,31/37] selftests: mptcp: join: skip backup if set flag on ID not supported
-
[mptcp-net,v2,32/37] selftests: mptcp: join: skip fullmesh flag tests if not supported
-
[mptcp-net,v2,33/37] selftests: mptcp: join: skip userspace PM tests if not supported
-
[mptcp-net,v2,34/37] selftests: mptcp: join: skip fail tests if not supported
-
[mptcp-net,v2,35/37] selftests: mptcp: join: skip MPC backups tests if not supported
-
[mptcp-net,v2,36/37] selftests: mptcp: join: skip PM listener tests if not supported
-
[mptcp-net,v2,37/37] selftests: mptcp: join: skip mixed tests if not supported
|
Selftests are supposed to run on any kernels, including the old ones not supporting all MPTCP features. These different patches allow the different MPTCP selftests to be executed on older kernels. I tried to minimise the modifications and do the checks from the bash script not to have to detect the feature when being used in a .c file, then pass the info to the bash script, skip the test, clean the environment, etc. As you can see, even with this minimalistic way, a lot of modifications have been done to support old kernels. Note that if we expect to have all features available, SELFTESTS_MPTCP_LIB_EXPECT_ALL_FEATURES env var can be set to 1 to mark the tests as failed instead of skipped and track regressions just in case one of these checks is wrong. The public CI already set this env var to 1. This is a big series impacting new development. Probably best to apply it "quickly" in our tree and fix issues later to avoid multiple rebases. Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/368 Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> --- Changes in v2: - The first patches are almost the same as in v1, the main modifications are in mptcp_lib.sh (and in the commit messages): new helpers but also the use of SELFTESTS_MPTCP_LIB_EXPECT_ALL_FEATURES env var. - Link to v1: https://lore.kernel.org/r/20230406-mptcp-issue-368-selftests-old-kernels-v1-0-246ac567724d@tessares.net --- Matthieu Baerts (37): 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 selftests: mptcp: lib: skip if missing symbol selftests: mptcp: lib: skip if not below kernel version selftests: mptcp: connect: skip transp tests if not supported selftests: mptcp: connect: skip disconnect tests if not supported selftests: mptcp: connect: skip TFO tests if not supported selftests: mptcp: diag: skip listen tests if not supported selftests: mptcp: diag: skip inuse tests if not supported selftests: mptcp: pm nl: remove hardcoded default limits selftests: mptcp: pm nl: skip fullmesh flag checks if not supported selftests: mptcp: sockopt: relax expected returned size selftests: mptcp: sockopt: skip getsockopt checks if not supported selftests: mptcp: sockopt: skip TCP_INQ checks if not supported selftests: mptcp: userspace pm: skip if 'ip' tool is unavailable selftests: mptcp: userspace pm: skip if not supported selftests: mptcp: userspace pm: skip PM listener events tests if unavailable selftests: mptcp: join: use 'iptables-legacy' if available selftests: mptcp: join: helpers to skip tests selftests: mptcp: join: skip check if MIB counter not supported selftests: mptcp: join: skip test if iptables/tc cmds fail selftests: mptcp: join: support local endpoint being tracked or not selftests: mptcp: join: skip Fastclose tests if not supported selftests: mptcp: join: support RM_ADDR for used endpoints or not selftests: mptcp: join: skip implicit tests if not supported selftests: mptcp: join: skip backup if set flag on ID not supported selftests: mptcp: join: skip fullmesh flag tests if not supported selftests: mptcp: join: skip userspace PM tests if not supported selftests: mptcp: join: skip fail tests if not supported selftests: mptcp: join: skip MPC backups tests if not supported selftests: mptcp: join: skip PM listener tests if not supported selftests: mptcp: join: skip mixed tests if not supported tools/testing/selftests/net/mptcp/Makefile | 2 +- tools/testing/selftests/net/mptcp/config | 1 + tools/testing/selftests/net/mptcp/diag.sh | 46 +- tools/testing/selftests/net/mptcp/mptcp_connect.sh | 24 + tools/testing/selftests/net/mptcp/mptcp_join.sh | 510 +++++++++++++-------- tools/testing/selftests/net/mptcp/mptcp_lib.sh | 99 ++++ tools/testing/selftests/net/mptcp/mptcp_sockopt.c | 12 +- tools/testing/selftests/net/mptcp/mptcp_sockopt.sh | 24 +- tools/testing/selftests/net/mptcp/pm_netlink.sh | 31 +- tools/testing/selftests/net/mptcp/simult_flows.sh | 4 + tools/testing/selftests/net/mptcp/userspace_pm.sh | 17 +- 11 files changed, 546 insertions(+), 224 deletions(-) --- base-commit: 194dd0efe579cb5d3a746d248b3476f4b3fc0b48 change-id: 20230406-mptcp-issue-368-selftests-old-kernels-fffd69d67d91 Best regards,