mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
To: Mat Martineau <martineau@kernel.org>,
	Geliang Tang <geliang@kernel.org>,
	 "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	 Jakub Kicinski <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,  Simon Horman <horms@kernel.org>,
	Shuah Khan <shuah@kernel.org>
Cc: netdev@vger.kernel.org, mptcp@lists.linux.dev,
	 linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
	 "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
Subject: [PATCH net-next 3/8] selftests: mptcp: lib: stats: remove nstat rate columns
Date: Fri, 14 Nov 2025 19:12:07 +0100	[thread overview]
Message-ID: <20251114-net-next-mptcp-sft-count-cache-stats-timeout-v1-3-863cb04e1b7b@kernel.org> (raw)
In-Reply-To: <20251114-net-next-mptcp-sft-count-cache-stats-timeout-v1-0-863cb04e1b7b@kernel.org>

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>
---
 tools/testing/selftests/net/mptcp/mptcp_lib.sh | 4 ++--
 1 file 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

-- 
2.51.0


  parent reply	other threads:[~2025-11-14 18:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-14 18:12 [PATCH net-next 0/8] selftests: mptcp: counter cache & stats before timeout Matthieu Baerts (NGI0)
2025-11-14 18:12 ` [PATCH net-next 1/8] selftests: mptcp: lib: introduce 'nstat_{init,get}' Matthieu Baerts (NGI0)
2025-11-14 18:12 ` [PATCH net-next 2/8] selftests: mptcp: lib: remove stats files args Matthieu Baerts (NGI0)
2025-11-14 18:12 ` Matthieu Baerts (NGI0) [this message]
2025-11-14 18:12 ` [PATCH net-next 4/8] selftests: mptcp: join: dump stats from history Matthieu Baerts (NGI0)
2025-11-14 18:12 ` [PATCH net-next 5/8] selftests: mptcp: lib: get counters from nstat history Matthieu Baerts (NGI0)
2025-11-14 18:12 ` [PATCH net-next 6/8] selftests: mptcp: connect: avoid double packet traces Matthieu Baerts (NGI0)
2025-11-14 18:12 ` [PATCH net-next 7/8] selftests: mptcp: wait for port instead of sleep Matthieu Baerts (NGI0)
2025-11-14 18:12 ` [PATCH net-next 8/8] selftests: mptcp: get stats just before timing out Matthieu Baerts (NGI0)
2025-11-18  3:30 ` [PATCH net-next 0/8] selftests: mptcp: counter cache & stats before timeout patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251114-net-next-mptcp-sft-count-cache-stats-timeout-v1-3-863cb04e1b7b@kernel.org \
    --to=matttbe@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=geliang@kernel.org \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=martineau@kernel.org \
    --cc=mptcp@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®