[PATCH, mptcp-next 0/9] selftests: mptcp: skip the v6 subtests when CONFIG_MPTCP_IPV6=n

Gang Yan posted 9 patches 3 days, 2 hours ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/cover.1781196828.git.yangang@kylinos.cn
tools/testing/selftests/net/mptcp/config      |   5 +-
.../selftests/net/mptcp/mptcp_connect.sh      |  48 +++-
.../testing/selftests/net/mptcp/mptcp_join.sh | 154 +++++++++---
.../testing/selftests/net/mptcp/mptcp_lib.sh  |  33 +++
.../selftests/net/mptcp/mptcp_sockopt.sh      |  81 ++++--
.../selftests/net/mptcp/simult_flows.sh       |  30 ++-
.../selftests/net/mptcp/userspace_pm.sh       | 237 ++++++++++--------
7 files changed, 397 insertions(+), 191 deletions(-)
[PATCH, mptcp-next 0/9] selftests: mptcp: skip the v6 subtests when CONFIG_MPTCP_IPV6=n
Posted by Gang Yan 3 days, 2 hours ago
From: Gang Yan <yangang@kylinos.cn>

Hi, Matt

This series is for make the selftest useful in the kernel which IPV6 is
compiled as a module.

The MPTCP selftests cover a wide functional surface: connection
establishment, subflow join/remove, ADD_ADDR / RM_ADDR signalling,
path-manager behaviour, nft-based tproxy, transfer of bulk data with
sane throughput and CPU usage, and so on. Together they are the
principal end-to-end suite product-validation teams run to certify
that MPTCP works on a candidate kernel. Kconfig, however, says:

      config MPTCP_IPV6
          depends on IPV6=y

so any distro or product kernel that ships with CONFIG_IPV6=m ends up
with CONFIG_MPTCP_IPV6=n. The corresponding MPTCP over IPv4 path is
built and works correctly; only the v6 subtests are unavailable.

So far, the selftests do not know about this configuration. They
unconditionally configure dead:beef:* endpoints, open AF_INET6
listeners, drive v6 ADD_ADDR / RM_ADDR / subflow commands and load
nft "table inet" chains, and they treat every one of those failures
as a test failure. On a CONFIG_IPV6=m kernel, every subtest
contaminated by a v6 step — including the v4-only ones in
mptcp_join.sh starting with "001 no JOIN" — comes back red. The
v4 functionality cannot be signed off even though it works.

Patch 1 is a DO-NOT-MERGE review aid (it flips the kselftest config
fragment to CONFIG_IPV6=m and adds CONFIG_NF_TABLES_IPV4=y so
docker-virtme can run the scripts in the target environment).
The remaining 8 patches are the real series.

Thanks
Gang

Gang Yan (9):
  DO-NOT-MERGE: mptcp: test IPV6=m in docker-virtme
  selftests: mptcp: mptcp_lib add runtime IPv6 availability detection
    helper
  selftests: mptcp: mptcp_connect.sh degrades to v4-only when MPTCP IPv6
    is missing
  selftests: mptcp: mptcp_connect.sh don't fail because of nft rules in
    IPV6-less kernel
  selftests: mptcp: mptcp_sockopt.sh skips v6 paths when MPTCP IPv6 is
    missing
  selftests: mptcp: simult_flows.sh skips v6 setup when MPTCP IPv6 is
    missing
  selftests: mptcp: mptcp_join.sh: pick v4 bind default when MPTCP IPv6
    is missing
  selftests: mptcp: mptcp_join.sh skips v6 subtests when MPTCP IPv6 is
    missing
  selftests: mptcp: userspace_pm.sh skips v6 paths when MPTCP IPv6 is
    missing

 tools/testing/selftests/net/mptcp/config      |   5 +-
 .../selftests/net/mptcp/mptcp_connect.sh      |  48 +++-
 .../testing/selftests/net/mptcp/mptcp_join.sh | 154 +++++++++---
 .../testing/selftests/net/mptcp/mptcp_lib.sh  |  33 +++
 .../selftests/net/mptcp/mptcp_sockopt.sh      |  81 ++++--
 .../selftests/net/mptcp/simult_flows.sh       |  30 ++-
 .../selftests/net/mptcp/userspace_pm.sh       | 237 ++++++++++--------
 7 files changed, 397 insertions(+), 191 deletions(-)

-- 
2.43.0

Re: [PATCH, mptcp-next 0/9] selftests: mptcp: skip the v6 subtests when CONFIG_MPTCP_IPV6=n
Posted by MPTCP CI 3 days, 1 hour ago
Hi Gang,

Thank you for your modifications, that's great!

Our CI did some validations and here is its report:

- KVM Validation: normal (except selftest_mptcp_join): Unstable: 11 failed test(s): packetdrill_add_addr packetdrill_dss packetdrill_fastclose packetdrill_fastopen packetdrill_mp_capable packetdrill_mp_join packetdrill_mp_prio packetdrill_mp_reset packetdrill_regressions packetdrill_sockopts packetdrill_syscalls ⚠️ 
- KVM Validation: normal (only selftest_mptcp_join): Success! ✅
- KVM Validation: debug (except selftest_mptcp_join): Success! ✅
- KVM Validation: debug (only selftest_mptcp_join): Success! ✅
- KVM Validation: btf-normal (only bpftest_all): Success! ✅
- KVM Validation: btf-debug (only bpftest_all): Success! ✅
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/27364818369

Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/127e9ba80ff5
Patchwork: https://patchwork.kernel.org/project/mptcp/list/?series=1110208


If there are some issues, you can reproduce them using the same environment as
the one used by the CI thanks to a docker image, e.g.:

    $ cd [kernel source code]
    $ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
        --pull always mptcp/mptcp-upstream-virtme-docker:latest \
        auto-normal

For more details:

    https://github.com/multipath-tcp/mptcp-upstream-virtme-docker


Please note that despite all the efforts that have been already done to have a
stable tests suite when executed on a public CI like here, it is possible some
reported issues are not due to your modifications. Still, do not hesitate to
help us improve that ;-)

Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)