linux/tools/testing/selftests/net/mptcp
Matthieu Baerts (NGI0) d23c41366e selftests: mptcp: lib: get counters for the right test
When the value for a MIB counter is required, mptcp_lib_get_counter is
called. It tries to use the cache, if available. If not it falls back to
calling 'nstat' directly by looking at the absolute counters.

That's an issue for tests that don't recreate the netns for each
subtest. In this case, 'nstat -a' will look at the counters for the
netns.

Instead, it should look at the increment 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.

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

Fixes: 71388a9f33 ("selftests: mptcp: lib: get counters from nstat history")
Cc: stable@vger.kernel.org
Reviewed-by: Geliang Tang <geliang@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20260908-net-mptcp-misc-fixes-7-3-rc1-v2-12-df1de70348b6@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-09 13:32:56 -07:00
..
.gitignore selftests: mptcp: ignore mptcp_diag binary 2025-03-31 16:52:39 -07:00
config selftests: net: sort configs 2025-10-06 13:12:59 -07:00
diag.sh selftests: mptcp: add a check for sndbuf of S/C 2026-04-23 13:20:17 +02:00
Makefile selftests: mptcp: connect: cover splice mode 2026-02-02 18:15:32 -08:00
mptcp_connect_checksum.sh selftests: mptcp: connect: also cover checksum 2025-07-21 16:21:30 -07:00
mptcp_connect_mmap.sh selftests: mptcp: connect: also cover alt modes 2025-07-21 16:21:30 -07:00
mptcp_connect_sendfile.sh selftests: mptcp: connect: also cover alt modes 2025-07-21 16:21:30 -07:00
mptcp_connect_splice.sh selftests: mptcp: connect: cover splice mode 2026-02-02 18:15:32 -08:00
mptcp_connect.c selftests: mptcp: fix an UAF in mptcp_connect.c 2026-09-09 13:32:55 -07:00
mptcp_connect.sh selftests: mptcp: pcap: drop most of the payload 2026-08-17 17:25:50 -07:00
mptcp_diag.c selftests: mptcp: diag: fix stack buffer overflow in get_subflow_info() 2026-08-17 17:25:50 -07:00
mptcp_inq.c selftests: mptcp: Mark xerror and die_perror __noreturn 2026-01-05 16:28:07 -08:00
mptcp_join.sh selftests: mptcp: pcap: drop most of the payload 2026-08-17 17:25:50 -07:00
mptcp_lib.sh selftests: mptcp: lib: get counters for the right test 2026-09-09 13:32:56 -07:00
mptcp_sockopt.c selftests: mptcp: Mark xerror and die_perror __noreturn 2026-01-05 16:28:07 -08:00
mptcp_sockopt.sh selftests: mptcp: sockopt: set EXIT trap earlier 2026-05-28 16:38:13 -07:00
pm_netlink.sh selftests: mptcp: pm: validate new limits 2026-05-11 18:01:37 -07:00
pm_nl_ctl.c selftests: mptcp: pm: use simpler send/recv forms 2026-05-11 18:01:37 -07:00
settings selftests: mptcp: increase timeout to 30 min 2024-02-01 09:06:37 -08:00
simult_flows.sh selftests: mptcp: pcap: drop most of the payload 2026-08-17 17:25:50 -07:00
userspace_pm.sh selftests: mptcp: userspace_pm: fix undefined variable port 2026-07-23 10:50:38 -07:00