mbox series

[net-next,00/15] selftests: mptcp: various improvements

Message ID 20240308-upstream-net-next-20240308-selftests-mptcp-unification-v1-0-4f42c347b653@kernel.org
Headers show
Series selftests: mptcp: various improvements | expand

Message

Matthieu Baerts March 8, 2024, 10:10 p.m. UTC
In this series from Geliang, there are various improvements in MPTCP
selftests: sharing code, doing actions the same way, colours, etc.

Patch 1 prints all error messages to stdout: what was done in almost all
other MPTCP selftests. This can be now easily changed later if needed.

Patch 2 makes sure the test counter is continuous in mptcp_connect.sh.

Patch 3 aligns the messages that are printed in mptcp_connect.sh.

Patch 4 prints each test results in mptcp_sockopt.sh, similar to what we
have in the TAP output.

Patch 5 moves the different test counters to a single one in
mptcp_lib.sh, to uniform how it is used.

Patch 6 moves how titles are printed from mptcp_join.sh to the lib, to
be reused in patch 7 by all other MPTCP selftests.

Patch 8 uses the '+=' operator to append strings instead of repeating
twice the variable name: that's shorter, easier to read.

Patch 9 adds colours for the [ OK ], [SKIP], [FAIL] and INFO keywords in
all MPTCP selftests.

Patch 10 to 12 are some preparation patches for patch 13: patch 10
modifies how some 'test_fail' helpers, patch 11 moves a helper from
userspace_pm.sh to the lib, and patch 12 changes where titles are
printed in userspace_pm.sh. Patch 13 moves some duplicated helpers from
mptcp_join.sh and userspace_pm.sh to mptcp_lib.sh.

Patch 14 moves duplicated read-only variables from mptcp_join.sh and
userspace_pm.sh to mptcp_lib.sh as well.

Patch 15 uses explicit variables instead of hard-coded numbers for the
exit status.

Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
Geliang Tang (15):
      selftests: mptcp: print all error messages to stdout
      selftests: mptcp: connect: add dedicated port counter
      selftests: mptcp: connect: fix misaligned output
      selftests: mptcp: sockopt: print every test result
      selftests: mptcp: export TEST_COUNTER variable
      selftests: mptcp: add print_title in mptcp_lib
      selftests: mptcp: print test results with counters
      selftests: mptcp: use += operator to append strings
      selftests: mptcp: print test results with colors
      selftests: mptcp: call test_fail without argument
      selftests: mptcp: extract mptcp_lib_check_expected
      selftests: mptcp: print_test out of verify_listener_events
      selftests: mptcp: add mptcp_lib_verify_listener_events
      selftests: mptcp: declare event macros in mptcp_lib
      selftests: mptcp: use KSFT_SKIP/KSFT_PASS/KSFT_FAIL

 tools/testing/selftests/net/mptcp/diag.sh          |  19 ++-
 tools/testing/selftests/net/mptcp/mptcp_connect.sh | 145 +++++++++++----------
 tools/testing/selftests/net/mptcp/mptcp_join.sh    | 120 +++++++----------
 tools/testing/selftests/net/mptcp/mptcp_lib.sh     | 113 ++++++++++++++--
 tools/testing/selftests/net/mptcp/mptcp_sockopt.sh |  53 ++++----
 tools/testing/selftests/net/mptcp/pm_netlink.sh    |  13 +-
 tools/testing/selftests/net/mptcp/simult_flows.sh  |  18 +--
 tools/testing/selftests/net/mptcp/userspace_pm.sh  | 117 +++++------------
 8 files changed, 312 insertions(+), 286 deletions(-)
---
base-commit: 19cfdc0d57696c92523da8eb26c0f3e092400bee
change-id: 20240308-upstream-net-next-20240308-selftests-mptcp-unification-6df178cc8f6a

Best regards,

Comments

patchwork-bot+netdevbpf@kernel.org March 11, 2024, 10:20 p.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Fri, 08 Mar 2024 23:10:07 +0100 you wrote:
> In this series from Geliang, there are various improvements in MPTCP
> selftests: sharing code, doing actions the same way, colours, etc.
> 
> Patch 1 prints all error messages to stdout: what was done in almost all
> other MPTCP selftests. This can be now easily changed later if needed.
> 
> Patch 2 makes sure the test counter is continuous in mptcp_connect.sh.
> 
> [...]

Here is the summary with links:
  - [net-next,01/15] selftests: mptcp: print all error messages to stdout
    https://git.kernel.org/netdev/net-next/c/6215df11b945
  - [net-next,02/15] selftests: mptcp: connect: add dedicated port counter
    https://git.kernel.org/netdev/net-next/c/01ed9838107f
  - [net-next,03/15] selftests: mptcp: connect: fix misaligned output
    https://git.kernel.org/netdev/net-next/c/c9161a0f8ff9
  - [net-next,04/15] selftests: mptcp: sockopt: print every test result
    https://git.kernel.org/netdev/net-next/c/fd959262c1bb
  - [net-next,05/15] selftests: mptcp: export TEST_COUNTER variable
    https://git.kernel.org/netdev/net-next/c/9e6a39ecb9a1
  - [net-next,06/15] selftests: mptcp: add print_title in mptcp_lib
    https://git.kernel.org/netdev/net-next/c/3382bb09701b
  - [net-next,07/15] selftests: mptcp: print test results with counters
    https://git.kernel.org/netdev/net-next/c/aa7694766f14
  - [net-next,08/15] selftests: mptcp: use += operator to append strings
    https://git.kernel.org/netdev/net-next/c/e7c42bf4d320
  - [net-next,09/15] selftests: mptcp: print test results with colors
    https://git.kernel.org/netdev/net-next/c/747ba8783a33
  - [net-next,10/15] selftests: mptcp: call test_fail without argument
    https://git.kernel.org/netdev/net-next/c/339c225e2e03
  - [net-next,11/15] selftests: mptcp: extract mptcp_lib_check_expected
    https://git.kernel.org/netdev/net-next/c/663260e14668
  - [net-next,12/15] selftests: mptcp: print_test out of verify_listener_events
    https://git.kernel.org/netdev/net-next/c/8ebb44196585
  - [net-next,13/15] selftests: mptcp: add mptcp_lib_verify_listener_events
    https://git.kernel.org/netdev/net-next/c/7f0782ca1ce9
  - [net-next,14/15] selftests: mptcp: declare event macros in mptcp_lib
    https://git.kernel.org/netdev/net-next/c/23a0485d1c04
  - [net-next,15/15] selftests: mptcp: use KSFT_SKIP/KSFT_PASS/KSFT_FAIL
    https://git.kernel.org/netdev/net-next/c/8f7a69a8e7dc

You are awesome, thank you!