From: Matthieu Baerts <matttbe@kernel.org>
To: Geliang Tang <geliang@kernel.org>, mptcp@lists.linux.dev
Cc: Geliang Tang <tanggeliang@kylinos.cn>
Subject: Re: [PATCH mptcp-next 1/2] Squash to "selftests: mptcp: connect: add dedicated port counter"
Date: Thu, 7 Mar 2024 10:25:44 +0100 [thread overview]
Message-ID: <ef4e2d4d-4de1-4d56-b92d-3fb2602e2e8e@kernel.org> (raw)
In-Reply-To: <17e1c8e1f7e8a30585c3b8d2b0711f3d8f4e460d.1709773913.git.tanggeliang@kylinos.cn>
Hi Geliang,
On 07/03/2024 02:14, Geliang Tang wrote:
> From: Geliang Tang <tanggeliang@kylinos.cn>
>
> Move port++ from the beginning of do_transfer to the end of it, then
> 9999 can be set to 10000, the same as 19999.
I initially wanted to do that, but...
> Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
> ---
> tools/testing/selftests/net/mptcp/mptcp_connect.sh | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
> index 5942256857a5..8feb4eef0931 100755
> --- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh
> +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
> @@ -33,7 +33,7 @@ do_tcp=0
> checksum=false
> filesize=0
> connect_per_transfer=1
> -port=$((10000 - 1))
> +port=10000
>
> if [ $tc_loss -eq 100 ];then
> tc_loss=1%
> @@ -320,8 +320,6 @@ do_transfer()
> local local_addr="$6"
> local extra_args="$7"
>
> - port=$((port + 1))
> -
> if [ "$rcvbuf" -gt 0 ]; then
> extra_args+=" -R $rcvbuf"
> fi
> @@ -446,6 +444,8 @@ do_transfer()
> return 1
... the counter will not be incremented in case of failure.
To avoid incrementing the counter from different places, I found it
safer to start it one off the first one. We can still see it's 10000.
> fi
>
> + port=$((port+1))
(it is not really the end of the function :) )
> +
> mptcp_lib_check_transfer $sin $cout "file received by client"
> retc=$?
> mptcp_lib_check_transfer $cin $sout "file received by server"
> @@ -719,7 +719,7 @@ EOF
>
> mptcp_lib_pr_info "test $msg"
>
> - port=$((20000 - 1))
> + port=20000
> local extra_args="-o TRANSPARENT"
> do_transfer ${listener_ns} ${connector_ns} MPTCP MPTCP \
> ${connect_addr} ${local_addr} "${extra_args}"
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
next prev parent reply other threads:[~2024-03-07 9:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-07 1:14 [PATCH mptcp-next 0/2] squash-to patches for "add helpers in mptcp_lib.sh" Geliang Tang
2024-03-07 1:14 ` [PATCH mptcp-next 1/2] Squash to "selftests: mptcp: connect: add dedicated port counter" Geliang Tang
2024-03-07 9:25 ` Matthieu Baerts [this message]
2024-03-07 10:03 ` Geliang Tang
2024-03-07 1:14 ` [PATCH mptcp-next 2/2] Squash to "selftests: mptcp: connect: use += operator to append strings" Geliang Tang
2024-03-07 2:04 ` Squash to "selftests: mptcp: connect: use += operator to append strings": Tests Results MPTCP CI
2024-03-07 3:29 ` MPTCP CI
2024-03-07 9:42 ` [PATCH mptcp-next 2/2] Squash to "selftests: mptcp: connect: use += operator to append strings" 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=ef4e2d4d-4de1-4d56-b92d-3fb2602e2e8e@kernel.org \
--to=matttbe@kernel.org \
--cc=geliang@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