[PATCH mptcp-next 0/4] selftests: mptcp: get stats just before timing out

Matthieu Baerts (NGI0) posted 4 patches 2 weeks, 4 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/20251108-slft-timeout-stats-v1-0-c2234d277318@kernel.org
tools/testing/selftests/net/mptcp/mptcp_connect.sh | 31 ++++++++------
tools/testing/selftests/net/mptcp/mptcp_join.sh    | 47 +++++++++++-----------
tools/testing/selftests/net/mptcp/mptcp_lib.sh     | 34 ++++++++++++++++
tools/testing/selftests/net/mptcp/mptcp_sockopt.sh | 23 ++++++-----
tools/testing/selftests/net/mptcp/simult_flows.sh  | 24 ++++++-----
tools/testing/selftests/net/mptcp/userspace_pm.sh  |  3 +-
6 files changed, 106 insertions(+), 56 deletions(-)
[PATCH mptcp-next 0/4] selftests: mptcp: get stats just before timing out
Posted by Matthieu Baerts (NGI0) 2 weeks, 4 days ago
A few patches to improve the selftests in case of issues:

- Patch 1: a fix to properly kill background tasks.

- Patch 2: avoid taking the same packet trace twice.

- Patch 3: wait for an event instead of a fix time.

- Patch 4: instead of using 'timeout' and print the stats after, another
  internal timeout is used: if it fires, it will print stats, then stop
  everything. This avoids confusions around stats in case of timeout.

Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
Matthieu Baerts (NGI0) (4):
      selftests: mptcp: join: properly kill background tasks
      selftests: mptcp: connect: avoid double packet traces
      selftests: mptcp: wait for port instead of sleep
      selftests: mptcp: get stats just before timing out

 tools/testing/selftests/net/mptcp/mptcp_connect.sh | 31 ++++++++------
 tools/testing/selftests/net/mptcp/mptcp_join.sh    | 47 +++++++++++-----------
 tools/testing/selftests/net/mptcp/mptcp_lib.sh     | 34 ++++++++++++++++
 tools/testing/selftests/net/mptcp/mptcp_sockopt.sh | 23 ++++++-----
 tools/testing/selftests/net/mptcp/simult_flows.sh  | 24 ++++++-----
 tools/testing/selftests/net/mptcp/userspace_pm.sh  |  3 +-
 6 files changed, 106 insertions(+), 56 deletions(-)
---
base-commit: e3f3a4ba83a02423a3cb045f7485340b713fb549
change-id: 20251106-slft-timeout-stats-d061de7fcebe

Best regards,
-- 
Matthieu Baerts (NGI0) <matttbe@kernel.org>
Re: [PATCH mptcp-next 0/4] selftests: mptcp: get stats just before timing out
Posted by Geliang Tang 2 weeks, 1 day ago
Hi Matt,

On Sat, 2025-11-08 at 15:20 +0100, Matthieu Baerts (NGI0) wrote:
> A few patches to improve the selftests in case of issues:
> 
> - Patch 1: a fix to properly kill background tasks.
> 
> - Patch 2: avoid taking the same packet trace twice.
> 
> - Patch 3: wait for an event instead of a fix time.
> 
> - Patch 4: instead of using 'timeout' and print the stats after,
> another
>   internal timeout is used: if it fires, it will print stats, then
> stop
>   everything. This avoids confusions around stats in case of timeout.
> 
> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>

This set looks good to me.

    Reviewed-by: Geliang Tang <geliang@kernel.org>

Thanks,
-Geliang

> ---
> Matthieu Baerts (NGI0) (4):
>       selftests: mptcp: join: properly kill background tasks
>       selftests: mptcp: connect: avoid double packet traces
>       selftests: mptcp: wait for port instead of sleep
>       selftests: mptcp: get stats just before timing out
> 
>  tools/testing/selftests/net/mptcp/mptcp_connect.sh | 31 ++++++++----
> --
>  tools/testing/selftests/net/mptcp/mptcp_join.sh    | 47 +++++++++++-
> ----------
>  tools/testing/selftests/net/mptcp/mptcp_lib.sh     | 34
> ++++++++++++++++
>  tools/testing/selftests/net/mptcp/mptcp_sockopt.sh | 23 ++++++-----
>  tools/testing/selftests/net/mptcp/simult_flows.sh  | 24 ++++++-----
>  tools/testing/selftests/net/mptcp/userspace_pm.sh  |  3 +-
>  6 files changed, 106 insertions(+), 56 deletions(-)
> ---
> base-commit: e3f3a4ba83a02423a3cb045f7485340b713fb549
> change-id: 20251106-slft-timeout-stats-d061de7fcebe
> 
> Best regards,

Re: [PATCH mptcp-next 0/4] selftests: mptcp: get stats just before timing out
Posted by Matthieu Baerts 2 weeks, 1 day ago
Hi Geliang,

On 12/11/2025 11:02, Geliang Tang wrote:
> Hi Matt,
> 
> On Sat, 2025-11-08 at 15:20 +0100, Matthieu Baerts (NGI0) wrote:
>> A few patches to improve the selftests in case of issues:
>>
>> - Patch 1: a fix to properly kill background tasks.
>>
>> - Patch 2: avoid taking the same packet trace twice.
>>
>> - Patch 3: wait for an event instead of a fix time.
>>
>> - Patch 4: instead of using 'timeout' and print the stats after,
>> another
>>   internal timeout is used: if it fires, it will print stats, then
>> stop
>>   everything. This avoids confusions around stats in case of timeout.
>>
>> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
> 
> This set looks good to me.
> 
>     Reviewed-by: Geliang Tang <geliang@kernel.org>

Thank you for the review!

Now in our tree:

New patches for t/upstream:
- 5bdd05d66b06: selftests: mptcp: connect: avoid double packet traces
- 070800d3509c: selftests: mptcp: wait for port instead of sleep
- 7bf5a769dde9: selftests: mptcp: get stats just before timing out
- Results: ee7fdf18febf..6ed800e9ef97 (export)

Tests are now in progress:

- export:
https://github.com/multipath-tcp/mptcp_net-next/commit/03bd0df93bb84cb9894db56697eea33b27d2f1d9/checks

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.

Re: [PATCH mptcp-next 0/4] selftests: mptcp: get stats just before timing out
Posted by MPTCP CI 2 weeks, 4 days ago
Hi Matthieu,

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): Success! ✅
- KVM Validation: normal (only selftest_mptcp_join): Success! ✅
- KVM Validation: debug (except selftest_mptcp_join): Unstable: 1 failed test(s): selftest_mptcp_connect_mmap 🔴
- KVM Validation: debug (only selftest_mptcp_join): Critical: KMemLeak ❌
- 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/19194469113

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


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)