* [MPTCP] Re: [MPTCP][PATCH v2 mptcp-next 3/3] selftests: mptcp: add testcases for newly added addresses
@ 2020-12-22 9:56 Paolo Abeni
0 siblings, 0 replies; 4+ messages in thread
From: Paolo Abeni @ 2020-12-22 9:56 UTC (permalink / raw)
To: mptcp
[-- Attachment #1: Type: text/plain, Size: 3578 bytes --]
On Fri, 2020-12-18 at 23:24 +0800, Geliang Tang wrote:
> This patch added the testcases to create subflows or signal addresses
> for the newly added IPv4 or IPv6 addresses.
>
> Signed-off-by: Geliang Tang <geliangtang(a)gmail.com>
> ---
> .../testing/selftests/net/mptcp/mptcp_join.sh | 73 ++++++++++++++++++-
> 1 file changed, 71 insertions(+), 2 deletions(-)
>
> diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> index cbc48ed5b267..ef0b008c09c6 100755
> --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
> +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> @@ -264,7 +264,23 @@ do_transfer()
> fi
> cpid=$!
>
> - if [ $addr_nr_ns1 -lt 0 ]; then
> + if [ $addr_nr_ns1 -gt 0 ]; then
> + let add_nr_ns1=addr_nr_ns1
> + counter=2
> + sleep 1
> + while [ $add_nr_ns1 -gt 0 ]; do
> + local addr
> + if is_v6 "${connect_addr}"; then
> + addr="dead:beef:$counter::1"
> + else
> + addr="10.0.$counter.1"
> + fi
> + ip netns exec $ns1 ./pm_nl_ctl add $addr flags signal
> + let counter+=1
> + let add_nr_ns1-=1
> + done
> + sleep 1
> + elif [ $addr_nr_ns1 -lt 0 ]; then
> let rm_nr_ns1=-addr_nr_ns1
> if [ $rm_nr_ns1 -lt 8 ]; then
> counter=1
> @@ -282,7 +298,23 @@ do_transfer()
> fi
> fi
>
> - if [ $addr_nr_ns2 -lt 0 ]; then
> + if [ $addr_nr_ns2 -gt 0 ]; then
> + let add_nr_ns2=addr_nr_ns2
> + counter=3
> + sleep 1
> + while [ $add_nr_ns2 -gt 0 ]; do
> + local addr
> + if is_v6 "${connect_addr}"; then
> + addr="dead:beef:$counter::2"
> + else
> + addr="10.0.$counter.2"
> + fi
> + ip netns exec $ns2 ./pm_nl_ctl add $addr flags subflow
> + let counter+=1
> + let add_nr_ns2-=1
> + done
> + sleep 1
> + elif [ $addr_nr_ns2 -lt 0 ]; then
> let rm_nr_ns2=-addr_nr_ns2
> if [ $rm_nr_ns2 -lt 8 ]; then
> counter=1
> @@ -738,6 +770,43 @@ chk_join_nr "flush subflows and signal" 3 3 3
> chk_add_nr 1 1
> chk_rm_nr 2 2
>
> +# add single subflow
> +reset
> +ip netns exec $ns1 ./pm_nl_ctl limits 0 1
> +ip netns exec $ns2 ./pm_nl_ctl limits 0 1
> +run_tests $ns1 $ns2 10.0.1.1 0 0 1 slow
> +chk_join_nr "add single subflow" 1 1 1
> +
> +# add signal address
> +reset
> +ip netns exec $ns1 ./pm_nl_ctl limits 0 1
> +ip netns exec $ns2 ./pm_nl_ctl limits 1 1
> +run_tests $ns1 $ns2 10.0.1.1 0 1 0 slow
> +chk_join_nr "add signal address" 1 1 1
> +chk_add_nr 1 1
> +
> +# add multiple subflows
> +reset
> +ip netns exec $ns1 ./pm_nl_ctl limits 0 2
> +ip netns exec $ns2 ./pm_nl_ctl limits 0 2
> +run_tests $ns1 $ns2 10.0.1.1 0 0 2 slow
> +chk_join_nr "add multiple subflows" 2 2 2
> +
> +# add multiple subflows IPv6
> +reset
> +ip netns exec $ns1 ./pm_nl_ctl limits 0 2
> +ip netns exec $ns2 ./pm_nl_ctl limits 0 2
> +run_tests $ns1 $ns2 dead:beef:1::1 0 0 2 slow
> +chk_join_nr "add multiple subflows IPv6" 2 2 2
> +
> +# add multiple addresses IPv6
> +reset
> +ip netns exec $ns1 ./pm_nl_ctl limits 0 2
> +ip netns exec $ns2 ./pm_nl_ctl limits 2 2
> +run_tests $ns1 $ns2 dead:beef:1::1 0 2 0 slow
> +chk_join_nr "add multiple addresses IPv6" 2 2 2
> +chk_add_nr 2 2
> +
> # subflow IPv6
> reset
> ip netns exec $ns1 ./pm_nl_ctl limits 0 1
The new tests are all good!
Side note: I fear that mptcp_join.sh is becoming too big, containing
many different/quite unrelated tests.
Perhaps we could split it in smaller chunk ?!? e.g. all subflows only
test, all other addr related tests, syncookies
/P
^ permalink raw reply [flat|nested] 4+ messages in thread
* [MPTCP] Re: [MPTCP][PATCH v2 mptcp-next 3/3] selftests: mptcp: add testcases for newly added addresses
@ 2021-01-05 6:47 Geliang Tang
0 siblings, 0 replies; 4+ messages in thread
From: Geliang Tang @ 2021-01-05 6:47 UTC (permalink / raw)
To: mptcp
[-- Attachment #1: Type: text/plain, Size: 5164 bytes --]
Hi Paolo,
Geliang Tang <geliangtang(a)gmail.com> 于2020年12月23日周三 下午6:41写道:
>
> Hi Paolo,
>
> Paolo Abeni <pabeni(a)redhat.com> 于2020年12月22日周二 下午5:56写道:
> >
> > On Fri, 2020-12-18 at 23:24 +0800, Geliang Tang wrote:
> > > This patch added the testcases to create subflows or signal addresses
> > > for the newly added IPv4 or IPv6 addresses.
> > >
> > > Signed-off-by: Geliang Tang <geliangtang(a)gmail.com>
> > > ---
> > > .../testing/selftests/net/mptcp/mptcp_join.sh | 73 ++++++++++++++++++-
> > > 1 file changed, 71 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> > > index cbc48ed5b267..ef0b008c09c6 100755
> > > --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
> > > +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> > > @@ -264,7 +264,23 @@ do_transfer()
> > > fi
> > > cpid=$!
> > >
> > > - if [ $addr_nr_ns1 -lt 0 ]; then
> > > + if [ $addr_nr_ns1 -gt 0 ]; then
> > > + let add_nr_ns1=addr_nr_ns1
> > > + counter=2
> > > + sleep 1
> > > + while [ $add_nr_ns1 -gt 0 ]; do
> > > + local addr
> > > + if is_v6 "${connect_addr}"; then
> > > + addr="dead:beef:$counter::1"
> > > + else
> > > + addr="10.0.$counter.1"
> > > + fi
> > > + ip netns exec $ns1 ./pm_nl_ctl add $addr flags signal
> > > + let counter+=1
> > > + let add_nr_ns1-=1
> > > + done
> > > + sleep 1
> > > + elif [ $addr_nr_ns1 -lt 0 ]; then
> > > let rm_nr_ns1=-addr_nr_ns1
> > > if [ $rm_nr_ns1 -lt 8 ]; then
> > > counter=1
> > > @@ -282,7 +298,23 @@ do_transfer()
> > > fi
> > > fi
> > >
> > > - if [ $addr_nr_ns2 -lt 0 ]; then
> > > + if [ $addr_nr_ns2 -gt 0 ]; then
> > > + let add_nr_ns2=addr_nr_ns2
> > > + counter=3
> > > + sleep 1
> > > + while [ $add_nr_ns2 -gt 0 ]; do
> > > + local addr
> > > + if is_v6 "${connect_addr}"; then
> > > + addr="dead:beef:$counter::2"
> > > + else
> > > + addr="10.0.$counter.2"
> > > + fi
> > > + ip netns exec $ns2 ./pm_nl_ctl add $addr flags subflow
> > > + let counter+=1
> > > + let add_nr_ns2-=1
> > > + done
> > > + sleep 1
> > > + elif [ $addr_nr_ns2 -lt 0 ]; then
> > > let rm_nr_ns2=-addr_nr_ns2
> > > if [ $rm_nr_ns2 -lt 8 ]; then
> > > counter=1
> > > @@ -738,6 +770,43 @@ chk_join_nr "flush subflows and signal" 3 3 3
> > > chk_add_nr 1 1
> > > chk_rm_nr 2 2
> > >
> > > +# add single subflow
> > > +reset
> > > +ip netns exec $ns1 ./pm_nl_ctl limits 0 1
> > > +ip netns exec $ns2 ./pm_nl_ctl limits 0 1
> > > +run_tests $ns1 $ns2 10.0.1.1 0 0 1 slow
> > > +chk_join_nr "add single subflow" 1 1 1
> > > +
> > > +# add signal address
> > > +reset
> > > +ip netns exec $ns1 ./pm_nl_ctl limits 0 1
> > > +ip netns exec $ns2 ./pm_nl_ctl limits 1 1
> > > +run_tests $ns1 $ns2 10.0.1.1 0 1 0 slow
> > > +chk_join_nr "add signal address" 1 1 1
> > > +chk_add_nr 1 1
> > > +
> > > +# add multiple subflows
> > > +reset
> > > +ip netns exec $ns1 ./pm_nl_ctl limits 0 2
> > > +ip netns exec $ns2 ./pm_nl_ctl limits 0 2
> > > +run_tests $ns1 $ns2 10.0.1.1 0 0 2 slow
> > > +chk_join_nr "add multiple subflows" 2 2 2
> > > +
> > > +# add multiple subflows IPv6
> > > +reset
> > > +ip netns exec $ns1 ./pm_nl_ctl limits 0 2
> > > +ip netns exec $ns2 ./pm_nl_ctl limits 0 2
> > > +run_tests $ns1 $ns2 dead:beef:1::1 0 0 2 slow
> > > +chk_join_nr "add multiple subflows IPv6" 2 2 2
> > > +
> > > +# add multiple addresses IPv6
> > > +reset
> > > +ip netns exec $ns1 ./pm_nl_ctl limits 0 2
> > > +ip netns exec $ns2 ./pm_nl_ctl limits 2 2
> > > +run_tests $ns1 $ns2 dead:beef:1::1 0 2 0 slow
> > > +chk_join_nr "add multiple addresses IPv6" 2 2 2
> > > +chk_add_nr 2 2
> > > +
> > > # subflow IPv6
> > > reset
> > > ip netns exec $ns1 ./pm_nl_ctl limits 0 1
> >
> >
> > The new tests are all good!
> >
> > Side note: I fear that mptcp_join.sh is becoming too big, containing
> > many different/quite unrelated tests.
> >
> > Perhaps we could split it in smaller chunk ?!? e.g. all subflows only
> > test, all other addr related tests, syncookies
>
> Thanks for your suggestion, I'll write a patch to split mptcp_join.sh script.
I have just sent out a patch named "selftests: mptcp: add command line
arguments for mptcp_join.sh" into ML to split mptcp_join.sh. Please give
me some suggestions about it.
Thanks.
-Geliang
>
> -Geliang
>
> >
> > /P
> >
^ permalink raw reply [flat|nested] 4+ messages in thread
* [MPTCP] Re: [MPTCP][PATCH v2 mptcp-next 3/3] selftests: mptcp: add testcases for newly added addresses
@ 2020-12-23 10:41 Geliang Tang
0 siblings, 0 replies; 4+ messages in thread
From: Geliang Tang @ 2020-12-23 10:41 UTC (permalink / raw)
To: mptcp
[-- Attachment #1: Type: text/plain, Size: 4605 bytes --]
Hi Paolo,
Paolo Abeni <pabeni(a)redhat.com> 于2020年12月22日周二 下午5:56写道:
>
> On Fri, 2020-12-18 at 23:24 +0800, Geliang Tang wrote:
> > This patch added the testcases to create subflows or signal addresses
> > for the newly added IPv4 or IPv6 addresses.
> >
> > Signed-off-by: Geliang Tang <geliangtang(a)gmail.com>
> > ---
> > .../testing/selftests/net/mptcp/mptcp_join.sh | 73 ++++++++++++++++++-
> > 1 file changed, 71 insertions(+), 2 deletions(-)
> >
> > diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> > index cbc48ed5b267..ef0b008c09c6 100755
> > --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
> > +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> > @@ -264,7 +264,23 @@ do_transfer()
> > fi
> > cpid=$!
> >
> > - if [ $addr_nr_ns1 -lt 0 ]; then
> > + if [ $addr_nr_ns1 -gt 0 ]; then
> > + let add_nr_ns1=addr_nr_ns1
> > + counter=2
> > + sleep 1
> > + while [ $add_nr_ns1 -gt 0 ]; do
> > + local addr
> > + if is_v6 "${connect_addr}"; then
> > + addr="dead:beef:$counter::1"
> > + else
> > + addr="10.0.$counter.1"
> > + fi
> > + ip netns exec $ns1 ./pm_nl_ctl add $addr flags signal
> > + let counter+=1
> > + let add_nr_ns1-=1
> > + done
> > + sleep 1
> > + elif [ $addr_nr_ns1 -lt 0 ]; then
> > let rm_nr_ns1=-addr_nr_ns1
> > if [ $rm_nr_ns1 -lt 8 ]; then
> > counter=1
> > @@ -282,7 +298,23 @@ do_transfer()
> > fi
> > fi
> >
> > - if [ $addr_nr_ns2 -lt 0 ]; then
> > + if [ $addr_nr_ns2 -gt 0 ]; then
> > + let add_nr_ns2=addr_nr_ns2
> > + counter=3
> > + sleep 1
> > + while [ $add_nr_ns2 -gt 0 ]; do
> > + local addr
> > + if is_v6 "${connect_addr}"; then
> > + addr="dead:beef:$counter::2"
> > + else
> > + addr="10.0.$counter.2"
> > + fi
> > + ip netns exec $ns2 ./pm_nl_ctl add $addr flags subflow
> > + let counter+=1
> > + let add_nr_ns2-=1
> > + done
> > + sleep 1
> > + elif [ $addr_nr_ns2 -lt 0 ]; then
> > let rm_nr_ns2=-addr_nr_ns2
> > if [ $rm_nr_ns2 -lt 8 ]; then
> > counter=1
> > @@ -738,6 +770,43 @@ chk_join_nr "flush subflows and signal" 3 3 3
> > chk_add_nr 1 1
> > chk_rm_nr 2 2
> >
> > +# add single subflow
> > +reset
> > +ip netns exec $ns1 ./pm_nl_ctl limits 0 1
> > +ip netns exec $ns2 ./pm_nl_ctl limits 0 1
> > +run_tests $ns1 $ns2 10.0.1.1 0 0 1 slow
> > +chk_join_nr "add single subflow" 1 1 1
> > +
> > +# add signal address
> > +reset
> > +ip netns exec $ns1 ./pm_nl_ctl limits 0 1
> > +ip netns exec $ns2 ./pm_nl_ctl limits 1 1
> > +run_tests $ns1 $ns2 10.0.1.1 0 1 0 slow
> > +chk_join_nr "add signal address" 1 1 1
> > +chk_add_nr 1 1
> > +
> > +# add multiple subflows
> > +reset
> > +ip netns exec $ns1 ./pm_nl_ctl limits 0 2
> > +ip netns exec $ns2 ./pm_nl_ctl limits 0 2
> > +run_tests $ns1 $ns2 10.0.1.1 0 0 2 slow
> > +chk_join_nr "add multiple subflows" 2 2 2
> > +
> > +# add multiple subflows IPv6
> > +reset
> > +ip netns exec $ns1 ./pm_nl_ctl limits 0 2
> > +ip netns exec $ns2 ./pm_nl_ctl limits 0 2
> > +run_tests $ns1 $ns2 dead:beef:1::1 0 0 2 slow
> > +chk_join_nr "add multiple subflows IPv6" 2 2 2
> > +
> > +# add multiple addresses IPv6
> > +reset
> > +ip netns exec $ns1 ./pm_nl_ctl limits 0 2
> > +ip netns exec $ns2 ./pm_nl_ctl limits 2 2
> > +run_tests $ns1 $ns2 dead:beef:1::1 0 2 0 slow
> > +chk_join_nr "add multiple addresses IPv6" 2 2 2
> > +chk_add_nr 2 2
> > +
> > # subflow IPv6
> > reset
> > ip netns exec $ns1 ./pm_nl_ctl limits 0 1
>
>
> The new tests are all good!
>
> Side note: I fear that mptcp_join.sh is becoming too big, containing
> many different/quite unrelated tests.
>
> Perhaps we could split it in smaller chunk ?!? e.g. all subflows only
> test, all other addr related tests, syncookies
Thanks for your suggestion, I'll write a patch to split mptcp_join.sh script.
-Geliang
>
> /P
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [MPTCP] Re: [MPTCP][PATCH v2 mptcp-next 3/3] selftests: mptcp: add testcases for newly added addresses
@ 2020-12-22 12:46 Davide Caratti
0 siblings, 0 replies; 4+ messages in thread
From: Davide Caratti @ 2020-12-22 12:46 UTC (permalink / raw)
To: mptcp
[-- Attachment #1: Type: text/plain, Size: 820 bytes --]
On Tue, 2020-12-22 at 10:56 +0100, Paolo Abeni wrote:
> On Fri, 2020-12-18 at 23:24 +0800, Geliang Tang wrote:
> > This patch added the testcases to create subflows or signal addresses
> > for the newly added IPv4 or IPv6 addresses.
> >
> > Signed-off-by: Geliang Tang <geliangtang(a)gmail.com>
> > ---
[...]
> Side note: I fear that mptcp_join.sh is becoming too big, containing
> many different/quite unrelated tests.
>
> Perhaps we could split it in smaller chunk ?!? e.g. all subflows only
> test, all other addr related tests, syncookies
also, it would be nice to allow running a single test item in standalone
(I had a small patch for that somewhere, let me see if I can find it :)
)
we might also think about decommissioning pm_nl_ctl and use iproute2
instead, wdyt?
--
davide
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-01-05 6:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-22 9:56 [MPTCP] Re: [MPTCP][PATCH v2 mptcp-next 3/3] selftests: mptcp: add testcases for newly added addresses Paolo Abeni
2020-12-22 12:46 Davide Caratti
2020-12-23 10:41 Geliang Tang
2021-01-05 6:47 Geliang Tang
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.