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 3/5] selftests: mptcp: add ss mptcp support checks
Date: Wed, 14 Feb 2024 19:15:37 +0100 [thread overview]
Message-ID: <4fcbae24-8438-4091-8cd4-5d44981e3de6@kernel.org> (raw)
In-Reply-To: <8f1e695491d199be96ea6a7a9e38ffd45a30388b.1707797566.git.tanggeliang@kylinos.cn>
Hi Geliang,
On 13/02/2024 05:14, Geliang Tang wrote:
> From: Geliang Tang <tanggeliang@kylinos.cn>
>
> Commands 'ss -M' are used in scripts mptcp_connect.sh, mptcp_join.sh,
> and mptcp_sockopt.sh to display only MPTCP sockets. So it must be checked
> if ss tool supports MPTCP in these script.
>
> Fixes: 767389c8dd55 ("selftests: mptcp: dump more info on errors")
> Fixes: c2a55e8fd80f ("selftests: mptcp: dump more info on mpjoin errors")
> Fixes: dc65fe82fb07 ("selftests: mptcp: add packet mark test case")
If we only use it to get more debug in these selftests, maybe this check
is not needed? I think it would be better to let other CI running our
tests, and accept we can have less debug info. (Also easier for the
backports if there is only one thing to fix at a time)
I would then add...
Fixes: e274f7154008 ("selftests: mptcp: add subflow limits test-cases")
... because here it is different, it is used as a feature.
So I think we only need it for mptcp_join.sh, right?
> Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
> ---
> tools/testing/selftests/net/mptcp/mptcp_connect.sh | 6 ++++++
> tools/testing/selftests/net/mptcp/mptcp_join.sh | 6 ++++++
> tools/testing/selftests/net/mptcp/mptcp_sockopt.sh | 6 ++++++
> 3 files changed, 18 insertions(+)
>
> diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
> index 7898d62fce0b..c49351d85cae 100755
> --- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh
> +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh
> @@ -154,6 +154,12 @@ if [ $? -ne 0 ];then
> exit $ksft_skip
> fi
>
> +ss -h | grep -q MPTCP
> +if [ $? -ne 0 ];then
> + echo "SKIP: ss tool does not support MPTCP"
> + exit $ksft_skip
> +fi
> +
> sin=$(mktemp)
> sout=$(mktemp)
> cin=$(mktemp)
> diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> index c07386e21e0a..5ca1512c3eae 100755
> --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
> +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> @@ -161,6 +161,12 @@ check_tools()
> exit $ksft_skip
> fi
>
> + ss -h | grep -q MPTCP
> + if [ $? -ne 0 ];then
(Even if you might have taken that from diag.sh) This will not pass
shellcheck's validation, I think, right?
Better like this?
if ! ss -h | grep -q MPTCP; then
(Also, please add a space after ";", like in most of the scripts we have)
Same in the other files (if you need to modify them).
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
next prev parent reply other threads:[~2024-02-14 18:15 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 [this message]
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
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=4fcbae24-8438-4091-8cd4-5d44981e3de6@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