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-net 4/5] selftests: mptcp: join: change capture/checksum as bool
Date: Wed, 14 Feb 2024 19:16:10 +0100 [thread overview]
Message-ID: <6fcbe3bf-2dca-47a3-add2-2f58f6011690@kernel.org> (raw)
In-Reply-To: <616dadb2e22ba3e178d8baef90f43624cdc6e85f.1707797566.git.tanggeliang@kylinos.cn>
Hi Geliang,
On 13/02/2024 05:14, Geliang Tang wrote:
> From: Geliang Tang <tanggeliang@kylinos.cn>
>
> To maintain consistency with other scripts, this patch changes vars
> 'capture' and 'checksum' as bool vars in mptcp_join.
I understand it is better, but it doesn't really fix a bug, right? Maybe
best not to target -net, no?
> Fixes: b08fbf241064 ("selftests: add test-cases for MPTCP MP_JOIN")
> Fixes: af66d3e1c3fa ("selftests: mptcp: enable checksum in mptcp_join.sh")
> Fixes: 3c082695e78b ("selftests: mptcp: drop msg argument of chk_csum_nr")
... and without the 'Fixes' then
> Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
> ---
> .../testing/selftests/net/mptcp/mptcp_join.sh | 22 +++++++++----------
> 1 file changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> index 5ca1512c3eae..b3dc17daf574 100755
> --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
> +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> @@ -29,11 +29,11 @@ iptables="iptables"
> ip6tables="ip6tables"
> timeout_poll=30
> timeout_test=$((timeout_poll * 2 + 1))
> -capture=0
> -checksum=0
> +capture=false
> +checksum=false
> ip_mptcp=0
> check_invert=0
> -validate_checksum=0
> +validate_checksum=false
> init=0
To be honest, I'm not sure if I prefer to use "boolean". At the end, it
is still a string. Instead of comparing values, we now "execute" the
content of the variable, it might not look safe (but it should be).
Also, there are still many other variables using 0/1: ip_mptcp,
check_invert, init. I don't think it is worth changing them.
I'm not against this change for -next, but I'm not sure if it is that
interesting. (But I'm not against using (fake) "boolean" for new code)
WDYT?
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
next prev parent reply other threads:[~2024-02-14 18:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-13 4:14 [PATCH mptcp-net 0/5] add helpers and vars in mptcp_lib.sh, part 1 Geliang Tang
2024-02-13 4:14 ` [PATCH mptcp-net 1/5] selftests: mptcp: netlink: drop duplicate var ret Geliang Tang
2024-02-13 4:14 ` [PATCH mptcp-net 2/5] selftests: mptcp: simult flows: define missing vars Geliang Tang
2024-02-14 18:14 ` Matthieu Baerts
2024-02-13 4:14 ` [PATCH mptcp-net 3/5] selftests: mptcp: add ss mptcp support checks Geliang Tang
2024-02-14 18:15 ` Matthieu Baerts
2024-02-13 4:14 ` [PATCH mptcp-net 4/5] selftests: mptcp: join: change capture/checksum as bool Geliang Tang
2024-02-14 18:16 ` Matthieu Baerts [this message]
2024-02-13 4:14 ` [PATCH mptcp-net 5/5] selftests: mptcp: diag: change timeout_poll to 30 Geliang Tang
2024-02-13 5:04 ` selftests: mptcp: diag: change timeout_poll to 30: Tests Results MPTCP CI
2024-02-13 5:25 ` MPTCP CI
2024-02-14 18:16 ` [PATCH mptcp-net 5/5] selftests: mptcp: diag: change timeout_poll to 30 Matthieu Baerts
2024-02-14 18:14 ` [PATCH mptcp-net 0/5] add helpers and vars in mptcp_lib.sh, part 1 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=6fcbe3bf-2dca-47a3-add2-2f58f6011690@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