[PATCH mptcp-next v7 5/8] selftests: mptcp: sockopt: unify ipv4/ipv6 as v4/v6

Geliang Tang posted 8 patches 9 months, 1 week ago
There is a newer version of this series
[PATCH mptcp-next v7 5/8] selftests: mptcp: sockopt: unify ipv4/ipv6 as v4/v6
Posted by Geliang Tang 9 months, 1 week ago
From: Geliang Tang <tanggeliang@kylinos.cn>

ipv4/ipv6 and v4/v6 are mixed in the output of mptcp_sockopt.sh, this patch
unifies them as v4/v6.

Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
---
 tools/testing/selftests/net/mptcp/mptcp_sockopt.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh b/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh
index 6ed4aa32222f..ae59136b5bb4 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh
@@ -130,10 +130,10 @@ do_transfer()
 	local local_addr ip
 	if mptcp_lib_is_v6 "${connect_addr}"; then
 		local_addr="::"
-		ip=ipv6
+		ip=v6
 	else
 		local_addr="0.0.0.0"
-		ip=ipv4
+		ip=v4
 	fi
 
 	cmsg="TIMESTAMPNS"
@@ -232,7 +232,7 @@ do_mptcp_sockopt_tests()
 	lret=$?
 
 	if [ $lret -ne 0 ]; then
-		echo "FAIL: SOL_MPTCP getsockopt (ipv6)" 1>&2
+		echo "FAIL: SOL_MPTCP getsockopt (v6)" 1>&2
 		mptcp_lib_result_fail "sockopt v6"
 		ret=$lret
 		return
-- 
2.40.1
Re: [PATCH mptcp-next v7 5/8] selftests: mptcp: sockopt: unify ipv4/ipv6 as v4/v6
Posted by Matthieu Baerts 9 months, 1 week ago
Hi Geliang,

On 29/02/2024 10:51, Geliang Tang wrote:
> From: Geliang Tang <tanggeliang@kylinos.cn>
> 
> ipv4/ipv6 and v4/v6 are mixed in the output of mptcp_sockopt.sh, this patch
> unifies them as v4/v6.
> 
> Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
> ---
>  tools/testing/selftests/net/mptcp/mptcp_sockopt.sh | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh b/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh
> index 6ed4aa32222f..ae59136b5bb4 100755
> --- a/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh
> +++ b/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh
> @@ -130,10 +130,10 @@ do_transfer()
>  	local local_addr ip
>  	if mptcp_lib_is_v6 "${connect_addr}"; then
>  		local_addr="::"
> -		ip=ipv6
> +		ip=v6
>  	else
>  		local_addr="0.0.0.0"
> -		ip=ipv4
> +		ip=v4

Mmh, this will change the test name (used in "mptcp_lib_result_*") and
this will break the tracking using the test name [1] while the test is
still doing the same thing.

Maybe this patch is not worth it then, fine to see 'ipv6'. Or only
display a different string in what is printed per test, what you were
doing in patch 5/9 from the v6, but I don't know where this patch is:
did you accidentally drop it?

[1] e.g.
https://netdev.bots.linux.dev/flakes.html?br-cnt=88&tn-needle=mptcp or
on LKFT or our CI

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.
Re: [PATCH mptcp-next v7 5/8] selftests: mptcp: sockopt: unify ipv4/ipv6 as v4/v6
Posted by Geliang Tang 9 months, 1 week ago
Hi Matt,

On Thu, Feb 29, 2024 at 12:31:21PM +0100, Matthieu Baerts wrote:
> Hi Geliang,
> 
> On 29/02/2024 10:51, Geliang Tang wrote:
> > From: Geliang Tang <tanggeliang@kylinos.cn>
> > 
> > ipv4/ipv6 and v4/v6 are mixed in the output of mptcp_sockopt.sh, this patch
> > unifies them as v4/v6.
> > 
> > Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
> > ---
> >  tools/testing/selftests/net/mptcp/mptcp_sockopt.sh | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh b/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh
> > index 6ed4aa32222f..ae59136b5bb4 100755
> > --- a/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh
> > +++ b/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh
> > @@ -130,10 +130,10 @@ do_transfer()
> >  	local local_addr ip
> >  	if mptcp_lib_is_v6 "${connect_addr}"; then
> >  		local_addr="::"
> > -		ip=ipv6
> > +		ip=v6
> >  	else
> >  		local_addr="0.0.0.0"
> > -		ip=ipv4
> > +		ip=v4
> 
> Mmh, this will change the test name (used in "mptcp_lib_result_*") and
> this will break the tracking using the test name [1] while the test is
> still doing the same thing.
> 
> Maybe this patch is not worth it then, fine to see 'ipv6'. Or only

Do you mean drop this patch? I agree, let's drop it.

> display a different string in what is printed per test, what you were
> doing in patch 5/9 from the v6, but I don't know where this patch is:
> did you accidentally drop it?

5/9 from the v6 is merged into "v7 7/8".

Thanks,
-Geliang

> 
> [1] e.g.
> https://netdev.bots.linux.dev/flakes.html?br-cnt=88&tn-needle=mptcp or
> on LKFT or our CI
> 
> Cheers,
> Matt
> -- 
> Sponsored by the NGI0 Core fund.
Re: [PATCH mptcp-next v7 5/8] selftests: mptcp: sockopt: unify ipv4/ipv6 as v4/v6
Posted by Matthieu Baerts 9 months, 1 week ago
Hi Geliang,

On 29/02/2024 13:08, Geliang Tang wrote:
> Hi Matt,
> 
> On Thu, Feb 29, 2024 at 12:31:21PM +0100, Matthieu Baerts wrote:
>> Hi Geliang,
>>
>> On 29/02/2024 10:51, Geliang Tang wrote:
>>> From: Geliang Tang <tanggeliang@kylinos.cn>
>>>
>>> ipv4/ipv6 and v4/v6 are mixed in the output of mptcp_sockopt.sh, this patch
>>> unifies them as v4/v6.
>>>
>>> Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
>>> ---
>>>  tools/testing/selftests/net/mptcp/mptcp_sockopt.sh | 6 +++---
>>>  1 file changed, 3 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh b/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh
>>> index 6ed4aa32222f..ae59136b5bb4 100755
>>> --- a/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh
>>> +++ b/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh
>>> @@ -130,10 +130,10 @@ do_transfer()
>>>  	local local_addr ip
>>>  	if mptcp_lib_is_v6 "${connect_addr}"; then
>>>  		local_addr="::"
>>> -		ip=ipv6
>>> +		ip=v6
>>>  	else
>>>  		local_addr="0.0.0.0"
>>> -		ip=ipv4
>>> +		ip=v4
>>
>> Mmh, this will change the test name (used in "mptcp_lib_result_*") and
>> this will break the tracking using the test name [1] while the test is
>> still doing the same thing.
>>
>> Maybe this patch is not worth it then, fine to see 'ipv6'. Or only
> 
> Do you mean drop this patch? I agree, let's drop it.

Yes, I prefer not to modify the test name printed in the TAP format at
the end. We can modify what is displayed before.

So OK to drop it, easier.

>> display a different string in what is printed per test, what you were
>> doing in patch 5/9 from the v6, but I don't know where this patch is:
>> did you accidentally drop it?
> 
> 5/9 from the v6 is merged into "v7 7/8".

Ah OK, I'm not there yet.

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.