All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH mptcp-net 0/2] selftests: mptcp: lib: get MIB counters for the right test
@ 2026-08-13 10:29 Matthieu Baerts (NGI0)
  2026-08-13 10:29 ` [PATCH mptcp-net 1/2] selftests: mptcp: lib: dump nstat " Matthieu Baerts (NGI0)
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Matthieu Baerts (NGI0) @ 2026-08-13 10:29 UTC (permalink / raw)
  To: MPTCP Linux; +Cc: Matthieu Baerts (NGI0)

In case of errors, mptcp_lib_pr_nstat is called to dump the nstat
counters, but for some tests, it was dumping the counters for all
subtests, not just the current one.

That's an issue for tests that don't recreate the netns for each
subtest, e.g. mptcp_connect.sh. In this case, 'nstat -a' will look at
the absolute counters since the creation of the netns, making
debugging harder.

Instead, it should dump the counters for the current test, by using the
history recorded in /tmp/<ns>.nstat, if available, and not using '-a'
which was dumping the absolute values instead of calculating increments.

While at it, rename the previous 'hist' variable to 'cache' as it was
used to look at the cache, not the nstat history.

Do the same in mptcp_lib_get_counter, even if it wasn't an issue for
the moment. Still, good to fix it for future usage, and to align it
with the rest.

Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
Matthieu Baerts (NGI0) (2):
      selftests: mptcp: lib: dump nstat for the right test
      selftests: mptcp: lib: get counters for the right test

 tools/testing/selftests/net/mptcp/mptcp_lib.sh | 26 +++++++++++++++-----------
 1 file changed, 15 insertions(+), 11 deletions(-)
---
base-commit: ab76ed72e0bed8352d3b8e2b4d1be7c823e5fba3
change-id: 20260813-sft-mptcp-nstat-hist-33411708430f

Best regards,
--  
Matthieu Baerts (NGI0) <matttbe@kernel.org>


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-08-19  9:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-13 10:29 [PATCH mptcp-net 0/2] selftests: mptcp: lib: get MIB counters for the right test Matthieu Baerts (NGI0)
2026-08-13 10:29 ` [PATCH mptcp-net 1/2] selftests: mptcp: lib: dump nstat " Matthieu Baerts (NGI0)
2026-08-13 10:29 ` [PATCH mptcp-net 2/2] selftests: mptcp: lib: get counters " Matthieu Baerts (NGI0)
2026-08-19  8:34   ` Geliang Tang
2026-08-19  9:02     ` Matthieu Baerts
2026-08-19  9:18       ` Geliang Tang
2026-08-13 11:41 ` [PATCH mptcp-net 0/2] selftests: mptcp: lib: get MIB " MPTCP CI
2026-08-19  9:22   ` Geliang Tang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.