[PATCH mptcp-next 0/5] selftests: mptcp: get counters from nstat history

Matthieu Baerts (NGI0) posted 5 patches 3 weeks, 2 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/20251103-slft-nstat-cache-v1-0-56025c09e56a@kernel.org
tools/testing/selftests/net/mptcp/mptcp_connect.sh | 100 ++++++++-------------
tools/testing/selftests/net/mptcp/mptcp_join.sh    |  31 ++++---
tools/testing/selftests/net/mptcp/mptcp_lib.sh     |  45 ++++++++--
tools/testing/selftests/net/mptcp/mptcp_sockopt.sh |  15 ++--
tools/testing/selftests/net/mptcp/simult_flows.sh  |  15 ++--
5 files changed, 104 insertions(+), 102 deletions(-)
[PATCH mptcp-next 0/5] selftests: mptcp: get counters from nstat history
Posted by Matthieu Baerts (NGI0) 3 weeks, 2 days ago
When debugging MPTCP Join selftest with a "debug" kernel config, I
noticed checking all the different counters was sometimes slower than
the test itself. Fetching the counters once, then reading them from the
history file that was already there seems to save more than 5 minutes
when running the whole MPTCP Join selftest.

- Patch 1: move code to mptcp_lib.sh to prepare the new features.

- Patch 2: simplify mptcp_lib_pr_err_stats helper use.

- Patch 3: remove unused last column from nstat output.

- Patch 4: improve stats dump in mptcp_join.sh.

- Patch 5: get counters from nstat history.

Based-on: <20251102-slft-join-inst-v2-0-b4f3ba15a7c4@kernel.org>

Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
Matthieu Baerts (NGI0) (5):
      selftests: mptcp: lib: introduce 'nstat_{init,get}'
      selftests: mptcp: lib: remove stats files args
      selftests: mptcp: lib: stats: remove nstat rate columns
      selftests: mptcp: join: dump stats from history
      selftests: mptcp: lib: get counters from nstat history

 tools/testing/selftests/net/mptcp/mptcp_connect.sh | 100 ++++++++-------------
 tools/testing/selftests/net/mptcp/mptcp_join.sh    |  31 ++++---
 tools/testing/selftests/net/mptcp/mptcp_lib.sh     |  45 ++++++++--
 tools/testing/selftests/net/mptcp/mptcp_sockopt.sh |  15 ++--
 tools/testing/selftests/net/mptcp/simult_flows.sh  |  15 ++--
 5 files changed, 104 insertions(+), 102 deletions(-)
---
base-commit: 1b41f9e417a8db60baf3686b81346131d2d81f30
change-id: 20251101-slft-nstat-cache-db4d2962c5ce

Best regards,
-- 
Matthieu Baerts (NGI0) <matttbe@kernel.org>
Re: [PATCH mptcp-next 0/5] selftests: mptcp: get counters from nstat history
Posted by MPTCP CI 3 weeks, 2 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): Unstable: 2 failed test(s): packetdrill_fastclose selftest_mptcp_connect_mmap 🔴
- KVM Validation: normal (only selftest_mptcp_join): Success! ✅
- KVM Validation: debug (except selftest_mptcp_join): Unstable: 1 failed test(s): packetdrill_regressions 🔴
- 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/19047087376

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


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)
Re: [PATCH mptcp-next 0/5] selftests: mptcp: get counters from nstat history
Posted by Paolo Abeni 3 weeks, 1 day ago
Hi Mat,

The series LGTM! actually that ugly old syntax I introduced bothered me
since a while, thanks for fixing it!

/P
Re: [PATCH mptcp-next 0/5] selftests: mptcp: get counters from nstat history
Posted by Matthieu Baerts 3 weeks, 1 day ago
Hi Paolo,

On 04/11/2025 22:13, Paolo Abeni wrote:
> The series LGTM! actually that ugly old syntax I introduced bothered me
> since a while, thanks for fixing it!

Thank you for the review!

Now in our tree:

New patches for t/upstream:
- 5fc66ff0c21d: selftests: mptcp: lib: introduce 'nstat_{init,get}'
- 85c2658ab280: selftests: mptcp: lib: remove stats files args
- c03f469e66cd: selftests: mptcp: lib: stats: remove nstat rate columns
- 7c215cadfe13: selftests: mptcp: join: dump stats from history
- 1e8ac2ba9238: selftests: mptcp: lib: get counters from nstat history
- Results: 47634a71c01a..fdaf439eed61 (export)

Tests are now in progress:

- export:
https://github.com/multipath-tcp/mptcp_net-next/commit/4cf71a5e2203016f33c5584d5a926eca7a9529ff/checks

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