MPTCP Linux Development
 help / color / mirror / Atom feed
From: Geliang Tang <geliang@kernel.org>
To: Matthieu Baerts <matttbe@kernel.org>, mptcp@lists.linux.dev
Cc: Geliang Tang <tanggeliang@kylinos.cn>
Subject: Re: [PATCH mptcp-next v5 03/12] selftests: mptcp: connect: fix misaligned OK/FAIL
Date: Wed, 28 Feb 2024 15:58:12 +0800	[thread overview]
Message-ID: <696f456f4815def83894812256c54e207aa46676.camel@kernel.org> (raw)
In-Reply-To: <ec8281f5-ff41-43b4-86c9-7696c744a18d@kernel.org>

On Mon, 2024-02-26 at 13:40 +0100, Matthieu Baerts wrote:
> Hi Geliang,
> 
> On 26/02/2024 10:43, Geliang Tang wrote:
> > From: Geliang Tang <tanggeliang@kylinos.cn>
> > 
> > The first [ OK ] and [FAIL] in the output of mptcp_connect.sh
> > misalign
> > with the others:
> > 
> > New MPTCP socket can be blocked via sysctl		[ OK ]
> > INFO: validating network environment with pings
> > INFO: Using loss of 0.85% delay 16 ms reorder 95% 70% with delay
> > 4ms on
> > ns1 MPTCP -> ns1 (10.0.1.1:10000      ) MPTCP	(duration   184ms)
> > [ OK ]
> > ns1 MPTCP -> ns1 (10.0.1.1:10001      ) TCP  	(duration    50ms)
> > [ OK ]
> > ns1 TCP   -> ns1 (10.0.1.1:10002      ) MPTCP	(duration    55ms)
> > [ OK ]
> > 
> > This patch fixes them.
> > 
> > Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
> > ---
> >  tools/testing/selftests/net/mptcp/mptcp_connect.sh | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh
> > b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
> > index ab3bb3b17522..72be905bab1f 100755
> > --- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh
> > +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
> > @@ -254,7 +254,7 @@ check_mptcp_disabled()
> >  
> >  	# net.mptcp.enabled should be enabled by default
> >  	if [ "$(ip netns exec ${disabled_ns} sysctl
> > net.mptcp.enabled | awk '{ print $3 }')" -ne 1 ]; then
> > -		echo -e "net.mptcp.enabled sysctl is not 1 by
> > default\t\t[FAIL]"
> > +		echo -e "net.mptcp.enabled sysctl is not 1 by
> > default\t\t\t   [FAIL]"
> 
> Best to use one new helper using 'printf %-XXXs', instead of playing
> with tabs and spaces.

Updated.

> 
> That will also help to add colours later, with just:
> 
>   mptcp_lib_print_success/fail/warn

Updated.

> 
> >  		mptcp_lib_result_fail "net.mptcp.enabled sysctl is
> > not 1 by default"
> >  		ret=1
> >  		return 1
> > @@ -267,13 +267,13 @@ check_mptcp_disabled()
> >  	mptcp_lib_ns_exit "${disabled_ns}"
> >  
> >  	if [ ${err} -eq 0 ]; then
> > -		echo -e "New MPTCP socket cannot be blocked via
> > sysctl\t\t[FAIL]"
> > +		echo -e "New MPTCP socket cannot be blocked via
> > sysctl\t\t\t   [FAIL]"
> >  		mptcp_lib_result_fail "New MPTCP socket cannot be
> > blocked via sysctl"
> >  		ret=1
> >  		return 1
> >  	fi
> >  
> > -	echo -e "New MPTCP socket can be blocked via sysctl\t\t[
> > OK ]"
> > +	echo -e "New MPTCP socket can be blocked via
> > sysctl\t\t\t   [ OK ]"
> >  	mptcp_lib_result_pass "New MPTCP socket can be blocked via
> > sysctl"
> >  	return 0
> >  }
> 
> Cheers,
> Matt


  reply	other threads:[~2024-02-28  7:58 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-26  9:43 [PATCH mptcp-next v5 00/12] add helpers and vars in mptcp_lib.sh, part 3 Geliang Tang
2024-02-26  9:43 ` [PATCH mptcp-next v5 01/12] selftests: mptcp: capitalize ok/fail/skip Geliang Tang
2024-02-26 12:40   ` Matthieu Baerts
2024-02-28  7:47     ` Geliang Tang
2024-02-26  9:43 ` [PATCH mptcp-next v5 02/12] selftests: mptcp: sockopt: print every test result Geliang Tang
2024-02-26 12:40   ` Matthieu Baerts
2024-02-28  7:57     ` Geliang Tang
2024-02-28  9:13       ` Matthieu Baerts
2024-02-28  9:51         ` Geliang Tang
2024-02-26  9:43 ` [PATCH mptcp-next v5 03/12] selftests: mptcp: connect: fix misaligned OK/FAIL Geliang Tang
2024-02-26 12:40   ` Matthieu Baerts
2024-02-28  7:58     ` Geliang Tang [this message]
2024-02-26  9:43 ` [PATCH mptcp-next v5 04/12] selftests: mptcp: print test results with colors Geliang Tang
2024-02-26 12:41   ` Matthieu Baerts
2024-02-28  8:06     ` Geliang Tang
2024-02-26  9:43 ` [PATCH mptcp-next v5 05/12] selftests: mptcp: connect: add dedicated port counter Geliang Tang
2024-02-26 12:41   ` Matthieu Baerts
2024-02-28  8:09     ` Geliang Tang
2024-02-26  9:43 ` [PATCH mptcp-next v5 06/12] selftests: mptcp: connect: print out ping tests info Geliang Tang
2024-02-26 12:41   ` Matthieu Baerts
2024-02-28  8:31     ` Geliang Tang
2024-02-26  9:43 ` [PATCH mptcp-next v5 07/12] selftests: mptcp: print test results with counters Geliang Tang
2024-02-26 12:41   ` Matthieu Baerts
2024-02-28  8:23     ` Geliang Tang
2024-02-28 10:20       ` Matthieu Baerts
2024-02-26  9:43 ` [PATCH mptcp-next v5 08/12] selftests: mptcp: move test_fail out of check_expected_one Geliang Tang
2024-02-26 12:41   ` Matthieu Baerts
2024-02-26  9:43 ` [PATCH mptcp-next v5 09/12] selftests: mptcp: extract mptcp_lib_check_expected Geliang Tang
2024-02-26 12:41   ` Matthieu Baerts
2024-02-26  9:43 ` [PATCH mptcp-next v5 10/12] selftests: mptcp: export event macros in mptcp_lib Geliang Tang
2024-02-26 12:42   ` Matthieu Baerts
2024-02-26  9:43 ` [PATCH mptcp-next v5 11/12] selftests: mptcp: add mptcp_lib_verify_listener_events Geliang Tang
2024-02-26 12:42   ` Matthieu Baerts
2024-02-26  9:43 ` [PATCH mptcp-next v5 12/12] selftests: mptcp: use KSFT_SKIP/KSFT_PASS/KSFT_FAIL Geliang Tang
2024-02-26 10:33   ` selftests: mptcp: use KSFT_SKIP/KSFT_PASS/KSFT_FAIL: Tests Results MPTCP CI
2024-02-26 12:40 ` [PATCH mptcp-next v5 00/12] add helpers and vars in mptcp_lib.sh, part 3 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=696f456f4815def83894812256c54e207aa46676.camel@kernel.org \
    --to=geliang@kernel.org \
    --cc=matttbe@kernel.org \
    --cc=mptcp@lists.linux.dev \
    --cc=tanggeliang@kylinos.cn \
    /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