[PATCH net 1/2] selftests: mptcp: join: only check for ip6tables if needed

Mat Martineau posted 2 patches 2 years, 6 months ago
[PATCH net 1/2] selftests: mptcp: join: only check for ip6tables if needed
Posted by Mat Martineau 2 years, 6 months ago
From: Matthieu Baerts <matthieu.baerts@tessares.net>

If 'iptables-legacy' is available, 'ip6tables-legacy' command will be
used instead of 'ip6tables'. So no need to look if 'ip6tables' is
available in this case.

Fixes: 0c4cd3f86a40 ("selftests: mptcp: join: use 'iptables-legacy' if available")
Acked-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Mat Martineau <martineau@kernel.org>
---
 tools/testing/selftests/net/mptcp/mptcp_join.sh | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
index e6c9d5451c5b..3c2096ac97ef 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
@@ -162,9 +162,7 @@ check_tools()
 	elif ! iptables -V &> /dev/null; then
 		echo "SKIP: Could not run all tests without iptables tool"
 		exit $ksft_skip
-	fi
-
-	if ! ip6tables -V &> /dev/null; then
+	elif ! ip6tables -V &> /dev/null; then
 		echo "SKIP: Could not run all tests without ip6tables tool"
 		exit $ksft_skip
 	fi

-- 
2.41.0
Re: [PATCH net 1/2] selftests: mptcp: join: only check for ip6tables if needed
Posted by Greg KH 2 years, 6 months ago
On Tue, Jul 25, 2023 at 11:34:55AM -0700, Mat Martineau wrote:
> From: Matthieu Baerts <matthieu.baerts@tessares.net>
> 
> If 'iptables-legacy' is available, 'ip6tables-legacy' command will be
> used instead of 'ip6tables'. So no need to look if 'ip6tables' is
> available in this case.
> 
> Fixes: 0c4cd3f86a40 ("selftests: mptcp: join: use 'iptables-legacy' if available")
> Acked-by: Paolo Abeni <pabeni@redhat.com>
> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
> Signed-off-by: Mat Martineau <martineau@kernel.org>
> ---
>  tools/testing/selftests/net/mptcp/mptcp_join.sh | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> index e6c9d5451c5b..3c2096ac97ef 100755
> --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
> +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> @@ -162,9 +162,7 @@ check_tools()
>  	elif ! iptables -V &> /dev/null; then
>  		echo "SKIP: Could not run all tests without iptables tool"
>  		exit $ksft_skip
> -	fi
> -
> -	if ! ip6tables -V &> /dev/null; then
> +	elif ! ip6tables -V &> /dev/null; then
>  		echo "SKIP: Could not run all tests without ip6tables tool"
>  		exit $ksft_skip
>  	fi
> 
> -- 
> 2.41.0
> 

<formletter>

This is not the correct way to submit patches for inclusion in the
stable kernel tree.  Please read:
    https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

</formletter>
Re: [PATCH net 1/2] selftests: mptcp: join: only check for ip6tables if needed
Posted by Mat Martineau 2 years, 6 months ago
On Tue, 25 Jul 2023, Greg KH wrote:

> On Tue, Jul 25, 2023 at 11:34:55AM -0700, Mat Martineau wrote:
>> From: Matthieu Baerts <matthieu.baerts@tessares.net>
>>
>> If 'iptables-legacy' is available, 'ip6tables-legacy' command will be
>> used instead of 'ip6tables'. So no need to look if 'ip6tables' is
>> available in this case.
>>
>> Fixes: 0c4cd3f86a40 ("selftests: mptcp: join: use 'iptables-legacy' if available")
>> Acked-by: Paolo Abeni <pabeni@redhat.com>
>> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
>> Signed-off-by: Mat Martineau <martineau@kernel.org>
>> ---
>>  tools/testing/selftests/net/mptcp/mptcp_join.sh | 4 +---
>>  1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
>> index e6c9d5451c5b..3c2096ac97ef 100755
>> --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
>> +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
>> @@ -162,9 +162,7 @@ check_tools()
>>  	elif ! iptables -V &> /dev/null; then
>>  		echo "SKIP: Could not run all tests without iptables tool"
>>  		exit $ksft_skip
>> -	fi
>> -
>> -	if ! ip6tables -V &> /dev/null; then
>> +	elif ! ip6tables -V &> /dev/null; then
>>  		echo "SKIP: Could not run all tests without ip6tables tool"
>>  		exit $ksft_skip
>>  	fi
>>
>> --
>> 2.41.0
>>
>
> <formletter>
>
> This is not the correct way to submit patches for inclusion in the
> stable kernel tree.  Please read:
>    https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
> for how to do this properly.
>
> </formletter>

Ugh, I did forget to add the "Cc: stable@vger.kernel.org" tag in the 
commit messages for this series and only added in the email cc field.

Jakub/Paolo, if you apply the series as-is I can make sure these end up in 
stable (as they likely will even without the cc tag). If you prefer I send 
a v2 just let me know.


- Mat