All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthieu Baerts <matttbe@kernel.org>
To: sashiko-reviews@lists.linux.dev
Cc: mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-next] selftests: mptcp: print stats before socket closure
Date: Fri, 14 Aug 2026 17:06:12 +0200	[thread overview]
Message-ID: <e224943f-abc4-410f-83ad-7238c89dd49d@kernel.org> (raw)
In-Reply-To: <20260814141500.A19A11F000E9@smtp.kernel.org>

On 14/08/2026 16:15, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Medium] Invalid iproute2 command `ip netns id` causes an error message and incorrect NSTAT_HISTORY file path.
> --
> 
> --- Patch [1]: [PATCH mptcp-next] selftests: mptcp: print stats before socket closure ---
> commit 0e02bc2b403cc7ef4929da44802ea29557081b60
> Author: Matthieu Baerts (NGI0) <matttbe@kernel.org>
> 
> selftests: mptcp: print stats before socket closure
> 
> This commit adds a mechanism to dump socket statistics via ss and nstat
> just before socket closure when a poll timeout occurs. This helps debug
> timeout issues in the mptcp_connect test.
> 
>> diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.c b/tools/testing/selftests/net/mptcp/mptcp_connect.c
>> --- a/tools/testing/selftests/net/mptcp/mptcp_connect.c
>> +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.c
> [ ... ]
>> @@ -210,6 +210,19 @@ static void xgetaddrinfo(const char *node, const char *service,
>>  	}
>>  }
>>  
>> +static void print_err_stats(void)
>> +{
>> +	char cmd[128];
>> +
>> +	snprintf(cmd, sizeof(cmd), "ss -Menitam -o '%cport = :%s' >&2",
>> +		 listen_mode ? 's' : 'd', cfg_port);
>> +
>> +	fprintf(stderr, "socket stats before socket closure:\n");
>> +	(void)!system(cmd);
>> +	(void)!system("NSTAT_HISTORY='/tmp/$(ip netns id).nstat' nstat -s | "
> [Severity: Medium]
> Will this ip netns id command fail and cause an iproute2 error during the
> test?
> 
> It appears ip netns id is an invalid command, and should likely be
> ip netns identify.

No, 'ip netns id' is valid and is the same as 'ip netns identify'.

I used the short version initially to fit on 80 chars, but I guess I
should still use 'identify' to avoid this warning when sending the patch
upstream...

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


  reply	other threads:[~2026-08-14 15:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-14 14:07 [PATCH mptcp-next] selftests: mptcp: print stats before socket closure Matthieu Baerts (NGI0)
2026-08-14 14:15 ` sashiko-bot
2026-08-14 15:06   ` Matthieu Baerts [this message]
2026-08-14 15:07 ` MPTCP CI
2026-08-14 16:44 ` Paolo Abeni
2026-08-14 17:15   ` Matthieu Baerts
2026-08-17  8:10     ` Paolo Abeni

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=e224943f-abc4-410f-83ad-7238c89dd49d@kernel.org \
    --to=matttbe@kernel.org \
    --cc=mptcp@lists.linux.dev \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 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.