MPTCP Linux Development
 help / color / mirror / Atom feed
From: Matthieu Baerts <matttbe@kernel.org>
To: Geliang Tang <geliang@kernel.org>, mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-next 2/5] selftests: mptcp: move stats info in case of errors to lib.sh
Date: Thu, 9 Jan 2025 16:30:13 +0100	[thread overview]
Message-ID: <a8575ecc-5602-464b-acf4-2e44d5489066@kernel.org> (raw)
In-Reply-To: <29b3e04b00e3d1dcaa59f589d43eed7e0c107a96.camel@kernel.org>

Hi Geliang,

Thank you for your review!

On 09/01/2025 10:24, Geliang Tang wrote:
> Hi Matt,
> 
> Thanks for this set.
> 
> On Wed, 2025-01-08 at 19:40 +0100, Matthieu Baerts (NGI0) wrote:
>> A few MPTCP selftests are using the same code to print stats in case
>> of
>> error. This code can then be moved to mptcp_lib.sh.
>>
>> No behaviour changes intended, except to print the error in red and
>> to
>> stderr, like most error messages.

(...)

>> diff --git a/tools/testing/selftests/net/mptcp/mptcp_lib.sh
>> b/tools/testing/selftests/net/mptcp/mptcp_lib.sh
>> index
>> 975d4d4c862afff2e685e86dc08a892dbd09d783..50ca64357053b14cd4989e6647d
>> 825337978fdba 100644
>> --- a/tools/testing/selftests/net/mptcp/mptcp_lib.sh
>> +++ b/tools/testing/selftests/net/mptcp/mptcp_lib.sh
>> @@ -107,6 +107,27 @@ mptcp_lib_pr_info() {
>>  	mptcp_lib_print_info "INFO: ${*}"
>>  }
>>  
>> +# $1-2: listener/connector ns ; $3 port ; [ $4-5 listener/connector
>> stat file ]
>> +mptcp_lib_pr_err_stats() {
>> +	local lns="${1}"
>> +	local cns="${2}"
>> +	local port="${3}"
>> +	local lstat="${4:-}"
>> +	local cstat="${5:-}"
> 
> I think it's better to add a separate patch to add
> 
> 	cat /tmp/${listener_ns}.out
> 
> and
> 
> 	cat /tmp/${connector_ns}.out
> 
> in mptcp_sockopt.sh,

mptcp_sockopt.sh currently doesn't have such file. I hesitated to add
them using the content of nstat like in the other ones, but I didn't
really see how it would help to fix issues with socket options. Or do
you have something in mind?

I guess we could add them "just in case", but...

> then we can drop the last two arguments "lstat"
> and "cstat" of this helper.

... sorry, I'm not sure to understand what you meant here. We still want
to print the content of these files if available.


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


  reply	other threads:[~2025-01-09 15:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-08 18:40 [PATCH mptcp-next 0/5] selftests: mptcp: more info in case of errors Matthieu Baerts (NGI0)
2025-01-08 18:40 ` [PATCH mptcp-next 1/5] selftests: mptcp: simult_flows: unify errors msgs Matthieu Baerts (NGI0)
2025-01-10  8:16   ` Geliang Tang
2025-01-10 10:35     ` Matthieu Baerts
2025-01-08 18:40 ` [PATCH mptcp-next 2/5] selftests: mptcp: move stats info in case of errors to lib.sh Matthieu Baerts (NGI0)
2025-01-09  9:24   ` Geliang Tang
2025-01-09 15:30     ` Matthieu Baerts [this message]
2025-01-10  3:05       ` Geliang Tang
2025-01-08 18:40 ` [PATCH mptcp-next 3/5] selftests: mptcp: add -m with ss in case of errors Matthieu Baerts (NGI0)
2025-01-08 18:40 ` [PATCH mptcp-next 4/5] selftests: mptcp: connect: remove unused variable Matthieu Baerts (NGI0)
2025-01-08 18:40 ` [PATCH mptcp-next 5/5] selftests: mptcp: connect: better display the files size Matthieu Baerts (NGI0)
2025-01-08 19:50 ` [PATCH mptcp-next 0/5] selftests: mptcp: more info in case of errors MPTCP CI
2025-01-12 12:38 ` Matthieu Baerts

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=a8575ecc-5602-464b-acf4-2e44d5489066@kernel.org \
    --to=matttbe@kernel.org \
    --cc=geliang@kernel.org \
    --cc=mptcp@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox