mptcp.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH 5.15.y] selftests: mptcp: join: only check for ip6tables if needed
       [not found] <2023080104-stability-porcupine-fbad@gregkh>
@ 2023-08-01  9:07 ` Matthieu Baerts
  2023-08-01  9:17   ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Matthieu Baerts @ 2023-08-01  9:07 UTC (permalink / raw)
  To: stable, gregkh
  Cc: MPTCP Upstream, Matthieu Baerts, Paolo Abeni, Mat Martineau,
	Jakub Kicinski

commit 016e7ba47f33064fbef8c4307a2485d2669dfd03 upstream.

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.

Cc: stable@vger.kernel.org
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>
Link: https://lore.kernel.org/r/20230725-send-net-20230725-v1-1-6f60fe7137a9@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
---
Backport Notes:
  - It was conflicting with 87154755d90e ("selftests: mptcp: join: check
    for tools only if needed") moving the code to modify in a dedicated
    function + checking the output directly.
  - I then adapted the code where it was before, taking the same style
    as what was done in the commit mentioned just above.
---
 tools/testing/selftests/net/mptcp/mptcp_join.sh | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
index 368fae525fea..a68048f1fc5a 100755
--- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
+++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
@@ -179,10 +179,7 @@ if iptables-legacy -V &> /dev/null; then
 elif ! iptables -V &> /dev/null; then
 	echo "SKIP: Could not run all tests without iptables tool"
 	exit $ksft_skip
-fi
-
-ip6tables -V > /dev/null 2>&1
-if [ $? -ne 0 ];then
+elif ! ip6tables -V &> /dev/null; then
 	echo "SKIP: Could not run all tests without ip6tables tool"
 	exit $ksft_skip
 fi
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 5.15.y] selftests: mptcp: join: only check for ip6tables if needed
  2023-08-01  9:07 ` [PATCH 5.15.y] selftests: mptcp: join: only check for ip6tables if needed Matthieu Baerts
@ 2023-08-01  9:17   ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2023-08-01  9:17 UTC (permalink / raw)
  To: Matthieu Baerts
  Cc: stable, MPTCP Upstream, Paolo Abeni, Mat Martineau,
	Jakub Kicinski

On Tue, Aug 01, 2023 at 11:07:16AM +0200, Matthieu Baerts wrote:
> commit 016e7ba47f33064fbef8c4307a2485d2669dfd03 upstream.
> 
> 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.
> 
> Cc: stable@vger.kernel.org
> 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>
> Link: https://lore.kernel.org/r/20230725-send-net-20230725-v1-1-6f60fe7137a9@kernel.org
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
> ---
> Backport Notes:
>   - It was conflicting with 87154755d90e ("selftests: mptcp: join: check
>     for tools only if needed") moving the code to modify in a dedicated
>     function + checking the output directly.
>   - I then adapted the code where it was before, taking the same style
>     as what was done in the commit mentioned just above.
> ---
>  tools/testing/selftests/net/mptcp/mptcp_join.sh | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)

Now queued up, thanks.

greg k-h

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-08-01  9:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <2023080104-stability-porcupine-fbad@gregkh>
2023-08-01  9:07 ` [PATCH 5.15.y] selftests: mptcp: join: only check for ip6tables if needed Matthieu Baerts
2023-08-01  9:17   ` Greg KH

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).