From: Matthieu Baerts <matttbe@kernel.org>
To: Gang Yan <yangang@kylinos.cn>, mptcp@lists.linux.dev
Cc: Geliang Tang <geliang@kernel.org>
Subject: Re: [PATCH mptcp-next v3 5/5] selftests: mptcp: add chk_sublfow in diag.sh
Date: Tue, 29 Apr 2025 15:05:22 +0200 [thread overview]
Message-ID: <ab222722-6e00-460c-9913-ec62a696d6bc@kernel.org> (raw)
In-Reply-To: <64427b00a88e0ae3f46ee40386069b2dd9abb994.1745395366.git.yangang@kylinos.cn>
Hi Gang,
On 25/04/2025 08:18, Gang Yan wrote:
> This patch aims to add chk_dump_subflow in diag.sh. The subflow's
> info can be obtained through "ss -tin", then use the 'mptcp_diag'
> to verify the token in subflow_info.
>
> Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/524
>
There should not be any empty lines here: "Closes:" should be with the
other tags without any empty lines in between.
> Co-developed-by: Geliang Tang <geliang@kernel.org>
> Signed-off-by: Geliang Tang <geliang@kernel.org>
> Signed-off-by: Gang Yan <yangang@kylinos.cn>
> ---
> tools/testing/selftests/net/mptcp/diag.sh | 33 +++++++++++++++++++++++
> 1 file changed, 33 insertions(+)
>
> diff --git a/tools/testing/selftests/net/mptcp/diag.sh b/tools/testing/selftests/net/mptcp/diag.sh
> index e7a75341f0f3..621b405e519f 100755
> --- a/tools/testing/selftests/net/mptcp/diag.sh
> +++ b/tools/testing/selftests/net/mptcp/diag.sh
> @@ -225,6 +225,38 @@ chk_dump_one()
> fi
> }
>
> +chk_dump_subflow()
> +{
> + local inet_diag_token
> + local subflow_line
> + local ss_output
> + local ss_token
> + local msg
> +
> + ss_output=$(ss -tniN $ns)
> +
> + subflow_line=$(echo "$ss_output" | \
> + grep -m1 -Eo '[0-9.]+:[0-9].+ +[0-9.]+:[0-9.]+')
> +
> + ss_token=$(echo "$ss_output" | \
> + grep -m1 -Eo 'token:[^ ]+')
(This could go to the previous line)
> +
> + inet_diag_token=$(ip netns exec $ns ./mptcp_diag -s "$subflow_line" | \
> + grep -Eo 'token:[^ ]+')
> +
> + msg="....chk dump_subflow"
> +
> + mptcp_lib_print_title "$msg"
> + if [ -n "$ss_token" ] && [ "$ss_token" == "$inet_diag_token" ]; then
> + mptcp_lib_pr_ok
> + mptcp_lib_result_pass "${msg}"
> + else
> + mptcp_lib_pr_fail "expected $ss_token found $inet_diag_token"
> + mptcp_lib_result_fail "${msg}"
> + ret=${KSFT_FAIL}
> + fi
> +}
> +
> msk_info_get_value()
> {
> local port="${1}"
> @@ -316,6 +348,7 @@ chk_msk_fallback_nr 0 "....chk no fallback"
> chk_msk_inuse 2
> chk_msk_cestab 2
> chk_dump_one
> +chk_dump_subflow
> flush_pids
>
> chk_msk_inuse 0 "2->0"
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
next prev parent reply other threads:[~2025-04-29 13:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-25 6:18 [PATCH mptcp-next v3 0/5] Add 'dump_subflow' test in selftests Gang Yan
2025-04-25 6:18 ` [PATCH mptcp-next v3 1/5] selftests: mptcp: add struct params in mptcp_diag Gang Yan
2025-04-25 6:18 ` [PATCH mptcp-next v3 2/5] selftests: mptcp: refactor send_query parameters for code clarity Gang Yan
2025-04-29 13:00 ` Matthieu Baerts
2025-04-25 6:18 ` [PATCH mptcp-next v3 3/5] selftests: mptcp: refactor NLMSG handling with 'proto' Gang Yan
2025-04-25 6:18 ` [PATCH mptcp-next v3 4/5] selftests: mptcp: add helpers to get subflow_info Gang Yan
2025-04-29 13:05 ` Matthieu Baerts
2025-04-25 6:18 ` [PATCH mptcp-next v3 5/5] selftests: mptcp: add chk_sublfow in diag.sh Gang Yan
2025-04-29 13:05 ` Matthieu Baerts [this message]
2025-04-25 12:55 ` [PATCH mptcp-next v3 0/5] Add 'dump_subflow' test in selftests MPTCP CI
2025-04-29 13:00 ` Matthieu Baerts
2025-04-29 13:22 ` 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=ab222722-6e00-460c-9913-ec62a696d6bc@kernel.org \
--to=matttbe@kernel.org \
--cc=geliang@kernel.org \
--cc=mptcp@lists.linux.dev \
--cc=yangang@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