All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mat Martineau <martineau@kernel.org>
To: Geliang Tang <geliang@kernel.org>, Matthieu Baerts <matttbe@kernel.org>
Cc: mptcp@lists.linux.dev, Geliang Tang <tanggeliang@kylinos.cn>
Subject: Re: [PATCH mptcp-next v12 10/15] selftests: mptcp: dump userspace addrs list
Date: Thu, 15 Feb 2024 14:57:07 -0800 (PST)	[thread overview]
Message-ID: <3478f286-365b-1bb3-1f9f-9b6611888888@kernel.org> (raw)
In-Reply-To: <2acb96d2ed25df7fce8bfc0241dc920678510542.1707910454.git.tanggeliang@kylinos.cn>

On Wed, 14 Feb 2024, Geliang Tang wrote:

> From: Geliang Tang <tanggeliang@kylinos.cn>
>
> This patch adds two new tests for userspace pm dump address and subflow.
> Use userspace_pm_add_addr() and userspace_pm_add_sf() to add an address
> and a suflow.
>

Hi Geliang -

The kernel code looks good to me, but I realized the selftests need some 
changes.

In order to run the new tests with old kernels (without userspace dump 
address support), mptcp_lib_kallsyms_has checks are needed so the new 
functionality is skipped on old kernels (right Matthieu?).

Also, since our tests already take a long time to run, could the userspace 
dump addrs checks be integrated with an existing test like "userspace pm 
add & remove address"?

Thanks,
Mat


> Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
> ---
> .../testing/selftests/net/mptcp/mptcp_join.sh | 44 +++++++++++++++++++
> 1 file changed, 44 insertions(+)
>
> diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> index dcb146c426dd..5f12bd1de383 100755
> --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
> +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> @@ -3585,6 +3585,50 @@ userspace_tests()
> 		kill_events_pids
> 		mptcp_lib_kill_wait $tests_pid
> 	fi
> +
> +	# userspace pm dump address
> +	if reset_with_events "userspace pm dump address" &&
> +	   continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/pm_type'; then
> +		set_userspace_pm $ns1
> +		pm_nl_set_limits $ns2 1 1
> +		speed=5 \
> +			run_tests $ns1 $ns2 10.0.1.1 &
> +		local tests_pid=$!
> +		wait_mpj $ns1
> +		userspace_pm_add_addr $ns1 10.0.2.1 10
> +		chk_join_nr 1 1 1
> +		chk_add_nr 1 1
> +		chk_mptcp_info subflows 1 subflows 1
> +		chk_subflows_total 2 2
> +		chk_mptcp_info add_addr_signal 1 add_addr_accepted 1
> +		local dump="id 10 flags signal 10.0.2.1"
> +		check_output "userspace_pm_dump $ns1" \
> +			     "$dump" "      dump addrs signal"
> +		kill_events_pids
> +		wait $tests_pid
> +	fi
> +
> +	# userspace pm dump subflow
> +	if reset_with_events "userspace pm dump subflow" &&
> +	   continue_if mptcp_lib_has_file '/proc/sys/net/mptcp/pm_type'; then
> +		set_userspace_pm $ns2
> +		pm_nl_set_limits $ns1 0 1
> +		speed=5 \
> +			run_tests $ns1 $ns2 10.0.1.1 &
> +		local tests_pid=$!
> +		wait_mpj $ns2
> +		chk_mptcp_info subflows 0 subflows 0
> +		chk_subflows_total 1 1
> +		userspace_pm_add_sf $ns2 10.0.3.2 20
> +		chk_join_nr 1 1 1
> +		chk_mptcp_info subflows 1 subflows 1
> +		chk_subflows_total 2 2
> +		local dump="id 20 flags subflow 10.0.3.2"
> +		check_output "userspace_pm_dump $ns2" \
> +			     "$dump" "      dump addrs subflow"
> +		kill_events_pids
> +		wait $tests_pid
> +	fi
> }
>
> endpoint_tests()
> -- 
> 2.40.1
>
>
>

  reply	other threads:[~2024-02-15 22:57 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-14 11:39 [PATCH mptcp-next v12 00/15] dump for userspace pm Geliang Tang
2024-02-14 11:39 ` [PATCH mptcp-next v12 01/15] mptcp: export mptcp_genl_family & mptcp_nl_fill_addr Geliang Tang
2024-02-14 11:39 ` [PATCH mptcp-next v12 02/15] mptcp: implement mptcp_userspace_pm_dump_addr Geliang Tang
2024-02-14 11:39 ` [PATCH mptcp-next v12 03/15] mptcp: add token for get-addr in yaml Geliang Tang
2024-02-15 23:00   ` Mat Martineau
2024-02-14 11:39 ` [PATCH mptcp-next v12 04/15] mptcp: dump addrs in userspace pm list Geliang Tang
2024-02-14 11:39 ` [PATCH mptcp-next v12 05/15] mptcp: check userspace pm flags Geliang Tang
2024-02-14 11:39 ` [PATCH mptcp-next v12 06/15] selftests: mptcp: add userspace pm subflow flag Geliang Tang
2024-02-14 11:39 ` [PATCH mptcp-next v12 07/15] selftests: mptcp: add token for dump_addr Geliang Tang
2024-02-14 11:39 ` [PATCH mptcp-next v12 08/15] selftests: mptcp: add check_output helper Geliang Tang
2024-02-14 11:40 ` [PATCH mptcp-next v12 09/15] selftests: mptcp: dump after creating id 0 subflow Geliang Tang
2024-02-14 11:40 ` [PATCH mptcp-next v12 10/15] selftests: mptcp: dump userspace addrs list Geliang Tang
2024-02-15 22:57   ` Mat Martineau [this message]
2024-02-16 10:30     ` Matthieu Baerts
2024-02-14 11:40 ` [PATCH mptcp-next v12 11/15] mptcp: add userspace_pm_lookup_addr_by_id helper Geliang Tang
2024-02-14 11:40 ` [PATCH mptcp-next v12 12/15] mptcp: implement mptcp_userspace_pm_get_addr Geliang Tang
2024-02-14 11:40 ` [PATCH mptcp-next v12 13/15] mptcp: get addr in userspace pm list Geliang Tang
2024-02-14 11:40 ` [PATCH mptcp-next v12 14/15] selftests: mptcp: add token for get_addr Geliang Tang
2024-02-14 11:40 ` [PATCH mptcp-next v12 15/15] selftests: mptcp: userspace pm get addr tests Geliang Tang
2024-02-14 12:37   ` selftests: mptcp: userspace pm get addr tests: Tests Results MPTCP CI
2024-02-14 12:48   ` MPTCP CI

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=3478f286-365b-1bb3-1f9f-9b6611888888@kernel.org \
    --to=martineau@kernel.org \
    --cc=geliang@kernel.org \
    --cc=matttbe@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.