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 04/10] selftests: mptcp: addr support for change_endpoint
Date: Wed, 13 Mar 2024 19:48:10 +0100 [thread overview]
Message-ID: <17dd5b67-fa9e-4ef8-8736-82f6fa3fe587@kernel.org> (raw)
In-Reply-To: <4f69ef8b2a7d3a131548424ddf9f0ba96ee53f78.1710121590.git.tanggeliang@kylinos.cn>
Hi Geliang,
On 11/03/2024 02:48, Geliang Tang wrote:
> From: Geliang Tang <tanggeliang@kylinos.cn>
>
> The address that needs to change flags can only be identified by an address
> ID in pm_nl_change_endpoint(). This patch adds support for passing an IP
> address directly to this helper.
>
> Address ID:
> pm_nl_change_endpoint $ns id $id $flags
>
> IP address:
> pm_nl_change_endpoint $ns $addr $flags
>
> Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
> ---
> tools/testing/selftests/net/mptcp/mptcp_join.sh | 15 ++++++++++++---
> tools/testing/selftests/net/mptcp/mptcp_lib.sh | 5 +++++
> 2 files changed, 17 insertions(+), 3 deletions(-)
>
> diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> index e33a136aef8e..431233e25abc 100755
> --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
> +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> @@ -717,13 +717,17 @@ pm_nl_show_endpoints()
> pm_nl_change_endpoint()
> {
> local ns=$1
> - local id=$2
> + local addr=$2
> local flags=$3
>
> + if ! mptcp_lib_is_addr "$addr"; then
> + [ $addr -gt 0 ] && [ $addr -lt 256 ] && addr="id $addr"
> + fi
> +
> if mptcp_lib_is_ip_mptcp; then
> - ip -n $ns mptcp endpoint change id $id ${flags//","/" "}
> + ip -n $ns mptcp endpoint change $addr ${flags//","/" "}
> else
> - ip netns exec $ns ./pm_nl_ctl set id $id flags $flags
> + ip netns exec $ns ./pm_nl_ctl set $addr flags $flags
> fi
> }
>
> @@ -3609,6 +3613,11 @@ endpoint_tests()
> output="id 1 flags signal 10.0.2.1"
> mptcp_lib_is_ip_mptcp && output="10.0.2.1 id 1 signal "
> check_output "pm_nl_show_endpoints ${ns1} 1" "${output}"
> + pm_nl_change_endpoint ${ns1} 1 backup
> + print_check "change id 1 addr"
> + output="id 1 flags signal,backup 10.0.2.1"
> + mptcp_lib_is_ip_mptcp && output="10.0.2.1 id 1 signal backup "
> + check_output "pm_nl_show_endpoints ${ns1}" "${output}"
I feel like here as well, that's something already validated in
pm_netlink.sh, and this will not check anything new, no?
> speed=slow \
> run_tests $ns1 $ns2 10.0.1.1 &
> local tests_pid=$!
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
next prev parent reply other threads:[~2024-03-13 18:48 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-11 1:48 [PATCH mptcp-next 00/10] add helpers and vars in mptcp_lib.sh, final Geliang Tang
2024-03-11 1:48 ` [PATCH mptcp-next 01/10] selftests: mptcp: export ip_mptcp to mptcp_lib Geliang Tang
2024-03-13 18:47 ` Matthieu Baerts
2024-03-11 1:48 ` [PATCH mptcp-next 02/10] selftests: mptcp: get support for limits Geliang Tang
2024-03-13 18:47 ` Matthieu Baerts
2024-03-11 1:48 ` [PATCH mptcp-next 03/10] selftests: mptcp: id support for show_endpoints Geliang Tang
2024-03-13 18:47 ` Matthieu Baerts
2024-03-11 1:48 ` [PATCH mptcp-next 04/10] selftests: mptcp: addr support for change_endpoint Geliang Tang
2024-03-13 18:48 ` Matthieu Baerts [this message]
2024-03-11 1:48 ` [PATCH mptcp-next 05/10] selftests: mptcp: netlink: fix positions of newline Geliang Tang
2024-03-11 1:48 ` [PATCH mptcp-next 06/10] selftests: mptcp: netlink: add outputs for ip_mptcp Geliang Tang
2024-03-13 18:49 ` Matthieu Baerts
2024-03-11 1:48 ` [PATCH mptcp-next 07/10] selftests: mptcp: add endpoint_ops API helper Geliang Tang
2024-03-13 18:50 ` Matthieu Baerts
2024-03-11 1:48 ` [PATCH mptcp-next 08/10] selftests: mptcp: use mptcp_lib_endpoint_ops Geliang Tang
2024-03-11 1:48 ` [PATCH mptcp-next 09/10] selftests: mptcp: add ip_mptcp option for more scripts Geliang Tang
2024-03-11 1:48 ` [PATCH mptcp-next 10/10] selftests: mptcp: netlink: drop disable=SC2086 Geliang Tang
2024-03-11 2:06 ` selftests: mptcp: netlink: drop disable=SC2086: Build Failure MPTCP CI
2024-03-11 2:44 ` selftests: mptcp: netlink: drop disable=SC2086: Tests Results MPTCP CI
2024-03-13 15:18 ` [PATCH mptcp-next 10/10] selftests: mptcp: netlink: drop disable=SC2086 MPTCP CI
2024-03-13 18:46 ` [PATCH mptcp-next 00/10] add helpers and vars in mptcp_lib.sh, final Matthieu Baerts
2024-03-16 3:56 ` Geliang Tang
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=17dd5b67-fa9e-4ef8-8736-82f6fa3fe587@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