[PATCH mptcp-net v2 07/37] selftests: mptcp: userspace pm: skip if MPTCP is not supported

Matthieu Baerts posted 37 patches 1 year, 4 months ago
Maintainers: Matthieu Baerts <matthieu.baerts@tessares.net>, Mat Martineau <martineau@kernel.org>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Shuah Khan <shuah@kernel.org>, Florian Westphal <fw@strlen.de>, Christoph Paasch <cpaasch@apple.com>, Davide Caratti <dcaratti@redhat.com>, Kishen Maloor <kishen.maloor@intel.com>, Dmytro Shytyi <dmytro@shytyi.net>, Menglong Dong <imagedong@tencent.com>, Geliang Tang <geliang.tang@suse.com>
There is a newer version of this series
[PATCH mptcp-net v2 07/37] selftests: mptcp: userspace pm: skip if MPTCP is not supported
Posted by Matthieu Baerts 1 year, 4 months ago
Selftests are supposed to run on any kernels, including the old ones not
supporting MPTCP.

A new check is then added to make sure MPTCP is supported. If not, the
test stops and is marked as "skipped".

Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368
Fixes: 259a834fadda ("selftests: mptcp: functional tests for the userspace PM type")
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
---
 tools/testing/selftests/net/mptcp/userspace_pm.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/testing/selftests/net/mptcp/userspace_pm.sh b/tools/testing/selftests/net/mptcp/userspace_pm.sh
index b1eb7bce599d..8092399d911f 100755
--- a/tools/testing/selftests/net/mptcp/userspace_pm.sh
+++ b/tools/testing/selftests/net/mptcp/userspace_pm.sh
@@ -1,6 +1,10 @@
 #!/bin/bash
 # SPDX-License-Identifier: GPL-2.0
 
+. "$(dirname "${0}")/mptcp_lib.sh"
+
+mptcp_lib_check_mptcp
+
 ip -Version > /dev/null 2>&1
 if [ $? -ne 0 ];then
 	echo "SKIP: Cannot not run test without ip tool"

-- 
2.39.2
Re: [PATCH mptcp-net v2 07/37] selftests: mptcp: userspace pm: skip if MPTCP is not supported
Posted by Paolo Abeni 1 year, 4 months ago
On Mon, 2023-05-22 at 18:37 +0200, Matthieu Baerts wrote:
> Selftests are supposed to run on any kernels, including the old ones not
> supporting MPTCP.
> 
> A new check is then added to make sure MPTCP is supported. If not, the
> test stops and is marked as "skipped".
> 
> Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368
> Fixes: 259a834fadda ("selftests: mptcp: functional tests for the userspace PM type")
> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
> ---
>  tools/testing/selftests/net/mptcp/userspace_pm.sh | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/tools/testing/selftests/net/mptcp/userspace_pm.sh b/tools/testing/selftests/net/mptcp/userspace_pm.sh
> index b1eb7bce599d..8092399d911f 100755
> --- a/tools/testing/selftests/net/mptcp/userspace_pm.sh
> +++ b/tools/testing/selftests/net/mptcp/userspace_pm.sh
> @@ -1,6 +1,10 @@
>  #!/bin/bash
>  # SPDX-License-Identifier: GPL-2.0
>  
> +. "$(dirname "${0}")/mptcp_lib.sh"
> +
> +mptcp_lib_check_mptcp
> +
>  ip -Version > /dev/null 2>&1
>  if [ $? -ne 0 ];then
>  	echo "SKIP: Cannot not run test without ip tool"
> 
Up to this patch the series LGTM and IMHO patch 1-7 could be applied
right now.

I think the later patches need a little more discussion. Specifically I
would prefer not introducing all the stuff related to kernel version
and diag dump (e.g. all that stuff that the patches themself warn
about).

/P
Re: [PATCH mptcp-net v2 07/37] selftests: mptcp: userspace pm: skip if MPTCP is not supported
Posted by Matthieu Baerts 1 year, 4 months ago
Hi Paolo,

On 22/05/2023 19:34, Paolo Abeni wrote:
> On Mon, 2023-05-22 at 18:37 +0200, Matthieu Baerts wrote:
>> Selftests are supposed to run on any kernels, including the old ones not
>> supporting MPTCP.
>>
>> A new check is then added to make sure MPTCP is supported. If not, the
>> test stops and is marked as "skipped".
>>
>> Link: https://github.com/multipath-tcp/mptcp_net-next/issues/368
>> Fixes: 259a834fadda ("selftests: mptcp: functional tests for the userspace PM type")
>> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
>> ---
>>  tools/testing/selftests/net/mptcp/userspace_pm.sh | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/tools/testing/selftests/net/mptcp/userspace_pm.sh b/tools/testing/selftests/net/mptcp/userspace_pm.sh
>> index b1eb7bce599d..8092399d911f 100755
>> --- a/tools/testing/selftests/net/mptcp/userspace_pm.sh
>> +++ b/tools/testing/selftests/net/mptcp/userspace_pm.sh
>> @@ -1,6 +1,10 @@
>>  #!/bin/bash
>>  # SPDX-License-Identifier: GPL-2.0
>>  
>> +. "$(dirname "${0}")/mptcp_lib.sh"
>> +
>> +mptcp_lib_check_mptcp
>> +
>>  ip -Version > /dev/null 2>&1
>>  if [ $? -ne 0 ];then
>>  	echo "SKIP: Cannot not run test without ip tool"
>>
> Up to this patch the series LGTM and IMHO patch 1-7 could be applied
> right now.

Thank you for the quick review!

I just applied these 7 first patches with your Acked-by (I hope that's
OK) in our tree (fixes for -net):

New patches for t/upstream-net & t/upstream:
- b809e4daae06: selftests: mptcp: connect: skip if MPTCP is not supported
- bb32747eda98: selftests: mptcp: pm nl: skip if MPTCP is not supported
- 62f43cd362f2: selftests: mptcp: join: skip if MPTCP is not supported
- 225c8e1cba4f: selftests: mptcp: diag: skip if MPTCP is not supported
- 6ca8a8d4621e: selftests: mptcp: simult flows: skip if MPTCP is not
supported
- 7a8db23cbea0: selftests: mptcp: sockopt: skip if MPTCP is not supported
- a6a7d97d9d46: selftests: mptcp: userspace pm: skip if MPTCP is not
supported
- Results: 8a13ec4e7433..dfcc25846d11 (export-net)
- Results: e9959fe44675..1a26d4e0d882 (export)

Tests are now in progress:

https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export-net/20230523T085808
https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export/20230523T085808

> I think the later patches need a little more discussion. Specifically I
> would prefer not introducing all the stuff related to kernel version
> and diag dump (e.g. all that stuff that the patches themself warn
> about).

I understand that it requires further discussions. I will reply on the
different patches but we can also discuss about that at the weekly
meeting today.

Cheers,
Matt
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net