mptcp.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Geliang Tang <geliang@kernel.org>
To: Mat Martineau <martineau@kernel.org>
Cc: mptcp@lists.linux.dev, Geliang Tang <tanggeliang@kylinos.cn>
Subject: Re: [PATCH mptcp-net 4/4] selftests: mptcp: rm subflow with v4/v4mapped addr
Date: Tue, 6 Feb 2024 13:47:34 +0800	[thread overview]
Message-ID: <ZcHH9lD9yYtgxG0Q@t480> (raw)
In-Reply-To: <1cd4fa8d-4de6-8803-5a39-c5088f909c9e@kernel.org>

Hi Mat,

On Mon, Feb 05, 2024 at 05:40:00PM -0800, Mat Martineau wrote:
> On Thu, 1 Feb 2024, Geliang Tang wrote:
> 
> > From: Geliang Tang <tanggeliang@kylinos.cn>
> > 
> > Now both a v4 address and a v4-mapped address are supported when
> > destroying a userspace pm subflow, this patch adds random tests for both
> > addresses.
> > 
> > Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/387
> > Fixes: 48d73f609dcc ("selftests: mptcp: update userspace pm addr tests")
> > Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
> > ---
> > tools/testing/selftests/net/mptcp/mptcp_join.sh | 11 ++++++++---
> > 1 file changed, 8 insertions(+), 3 deletions(-)
> > 
> > diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> > index c07386e21e0a..a3bdbc896c6f 100755
> > --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
> > +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> > @@ -3333,12 +3333,13 @@ userspace_pm_rm_sf()
> > {
> > 	local evts=$evts_ns1
> > 	local t=${3:-1}
> > -	local ip=4
> > +	local ip
> > 	local tk da dp sp
> > 	local cnt
> > 
> > 	[ "$1" == "$ns2" ] && evts=$evts_ns2
> > -	if mptcp_lib_is_v6 $2; then ip=6; fi
> > +	[ -n "$(mptcp_lib_evts_get_info "saddr4" "$evts" $t)" ] && ip=4
> > +	[ -n "$(mptcp_lib_evts_get_info "saddr6" "$evts" $t)" ] && ip=6
> > 	tk=$(mptcp_lib_evts_get_info token "$evts")
> > 	da=$(mptcp_lib_evts_get_info "daddr$ip" "$evts" $t)
> > 	dp=$(mptcp_lib_evts_get_info dport "$evts" $t)
> > @@ -3441,7 +3442,11 @@ userspace_tests()
> > 		chk_subflows_total 2 2
> > 		chk_mptcp_info add_addr_signal 1 add_addr_accepted 1
> > 		userspace_pm_rm_addr $ns1 10
> > -		userspace_pm_rm_sf $ns1 "::ffff:10.0.2.1" $SUB_ESTABLISHED
> > +		if [ $((RANDOM%2)) -eq 0 ]; then
> > +			userspace_pm_rm_sf $ns1 ::ffff:10.0.2.1 $SUB_ESTABLISHED
> > +		else
> > +			userspace_pm_rm_sf $ns1 10.0.2.1 $SUB_ESTABLISHED
> > +		fi
> 
> Instead of randomizing this test, does it work to add a second subflow to
> this test case?

Yes, it works.

> 
> Then the two subflows could be removed two different ways (one with the
> v4mapped and one with v4)? That should avoid adding too much test time.

I just sent a v2 for this with only patch 3 and patch 4 in it.

Thanks,
-Geliang

> 
> - Mat
> 
> 
> > 		chk_rm_nr 1 1 invert
> > 		chk_mptcp_info subflows 0 subflows 0
> > 		chk_subflows_total 1 1
> > -- 
> > 2.40.1
> > 
> > 
> > 

  reply	other threads:[~2024-02-06  5:47 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-01  3:51 [PATCH mptcp-net 0/4] fixes for userspace PM Geliang Tang
2024-02-01  3:51 ` [PATCH mptcp-net 1/4] mptcp: add needs_id for userspace appending addr Geliang Tang
2024-02-06  1:28   ` Mat Martineau
2024-02-01  3:51 ` [PATCH mptcp-net 2/4] mptcp: add needs_id for netlink " Geliang Tang
2024-02-01  5:35   ` Geliang Tang
2024-02-08  9:37     ` Matthieu Baerts
2024-02-06  1:28   ` Mat Martineau
2024-02-01  3:51 ` [PATCH mptcp-net 3/4] mptcp: map v4 address to v6 when destroying subflow Geliang Tang
2024-02-01  3:51 ` [PATCH mptcp-net 4/4] selftests: mptcp: rm subflow with v4/v4mapped addr Geliang Tang
2024-02-01  4:40   ` selftests: mptcp: rm subflow with v4/v4mapped addr: Tests Results MPTCP CI
2024-02-01  5:01   ` MPTCP CI
2024-02-06  1:40   ` [PATCH mptcp-net 4/4] selftests: mptcp: rm subflow with v4/v4mapped addr Mat Martineau
2024-02-06  5:47     ` Geliang Tang [this message]
2024-02-06  2:21   ` selftests: mptcp: rm subflow with v4/v4mapped addr: Tests Results MPTCP CI
2024-02-06  2:38   ` 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=ZcHH9lD9yYtgxG0Q@t480 \
    --to=geliang@kernel.org \
    --cc=martineau@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;
as well as URLs for NNTP newsgroup(s).