summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMatthieu Baerts (NGI0) <matttbe@kernel.org>2025-11-14 21:12:07 +0300
committerJakub Kicinski <kuba@kernel.org>2025-11-18 06:27:46 +0300
commit2e6daf6b9bc86e3fe0e3217def16aaaaf0924801 (patch)
treec8aa0aeec8848add2ca249d6734a2b15404a008f /tools
parenta89fc262b6260c1ef69439a9fc233d84e58357d3 (diff)
downloadlinux-2e6daf6b9bc86e3fe0e3217def16aaaaf0924801.tar.xz
selftests: mptcp: lib: stats: remove nstat rate columns
With the MPTCP selftests, the nstat daemon is not used. It means that the last column (the rate) is always 0.0, and that's not something interesting to display. Then, this last column can be filtered out. Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://patch.msgid.link/20251114-net-next-mptcp-sft-count-cache-stats-timeout-v1-3-863cb04e1b7b@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/net/mptcp/mptcp_lib.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/net/mptcp/mptcp_lib.sh b/tools/testing/selftests/net/mptcp/mptcp_lib.sh
index 4a26d4150603..c5571100f797 100644
--- a/tools/testing/selftests/net/mptcp/mptcp_lib.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_lib.sh
@@ -390,9 +390,9 @@ mptcp_lib_nstat_init() {
mptcp_lib_nstat_get() {
local ns="${1}"
- # filter out non-*TCP stats
+ # filter out non-*TCP stats, and the rate (last column)
NSTAT_HISTORY="/tmp/${ns}.nstat" ip netns exec "${ns}" nstat |
- grep Tcp > "/tmp/${ns}.out"
+ grep -o ".*Tcp\S\+\s\+[0-9]\+" > "/tmp/${ns}.out"
}
# $1: ns, $2: MIB counter