MPTCP Linux Development
 help / color / mirror / Atom feed
From: Mat Martineau <martineau@kernel.org>
To: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
Cc: mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-next] selftests: mptcp: stop forcing iptables-legacy
Date: Wed, 14 Feb 2024 11:09:40 -0800 (PST)	[thread overview]
Message-ID: <513aac1d-35e2-6505-5cf9-b2920fe0e361@kernel.org> (raw)
In-Reply-To: <20240207-selftests-mptcp-iptables-nft-v1-1-108de489316e@kernel.org>

On Wed, 7 Feb 2024, Matthieu Baerts (NGI0) wrote:

> Commit 0c4cd3f86a40 ("selftests: mptcp: join: use 'iptables-legacy' if
> available") and a5a5990c099d ("selftests: mptcp: sockopt: use

Hi Matthieu -

You can add the word "commit" right before "a5a5990c099d" in the commit 
message and that will satisfy checkpatch. Fine to do that when applying 
this to the topgit tree, everything else LGTM:

Reviewed-by: Mat Martineau <martineau@kernel.org>


> 'iptables-legacy' if available") forced using iptables-legacy if
> available.
>
> This was needed because of some issues that were visible when testing
> the kselftests on a v5.15.x with iptables-nft as default backend. It
> looks like these errors are no longer present. As mentioned by Pablo [1],
> the errors were maybe due to missing kernel config. We can then use
> iptables-nft if it is the default one, instead of using a legacy tool.
>
> We can then check the variables iptables and ip6tables are valid. We can
> keep the variables to easily change it later or add options.
>
> Link: https://lore.kernel.org/netdev/ZbFiixyMFpQnxzCH@calendula/ [1]
> Suggested-by: Pablo Neira Ayuso <pablo@netfilter.org>
> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
> ---
> tools/testing/selftests/net/mptcp/mptcp_join.sh    | 12 ++++--------
> tools/testing/selftests/net/mptcp/mptcp_sockopt.sh | 12 ++++--------
> 2 files changed, 8 insertions(+), 16 deletions(-)
>
> diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> index c07386e21e0a..20140ee4de2e 100755
> --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
> +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
> @@ -161,15 +161,11 @@ check_tools()
> 		exit $ksft_skip
> 	fi
>
> -	# Use the legacy version if available to support old kernel versions
> -	if iptables-legacy -V &> /dev/null; then
> -		iptables="iptables-legacy"
> -		ip6tables="ip6tables-legacy"
> -	elif ! iptables -V &> /dev/null; then
> -		echo "SKIP: Could not run all tests without iptables tool"
> +	if ! "${iptables}" -V &> /dev/null; then
> +		echo "SKIP: Could not run all tests without ${iptables} tool"
> 		exit $ksft_skip
> -	elif ! ip6tables -V &> /dev/null; then
> -		echo "SKIP: Could not run all tests without ip6tables tool"
> +	elif ! "${ip6tables}" -V &> /dev/null; then
> +		echo "SKIP: Could not run all tests without ${ip6tables} tool"
> 		exit $ksft_skip
> 	fi
> }
> diff --git a/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh b/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh
> index c643872ddf47..dac8e1fc7143 100755
> --- a/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh
> +++ b/tools/testing/selftests/net/mptcp/mptcp_sockopt.sh
> @@ -96,15 +96,11 @@ if [ $? -ne 0 ];then
> 	exit $ksft_skip
> fi
>
> -# Use the legacy version if available to support old kernel versions
> -if iptables-legacy -V &> /dev/null; then
> -	iptables="iptables-legacy"
> -	ip6tables="ip6tables-legacy"
> -elif ! iptables -V &> /dev/null; then
> -	echo "SKIP: Could not run all tests without iptables tool"
> +if ! "${iptables}" -V &> /dev/null; then
> +	echo "SKIP: Could not run all tests without ${iptables} tool"
> 	exit $ksft_skip
> -elif ! ip6tables -V &> /dev/null; then
> -	echo "SKIP: Could not run all tests without ip6tables tool"
> +elif ! "${ip6tables}" -V &> /dev/null; then
> +	echo "SKIP: Could not run all tests without ${ip6tables} tool"
> 	exit $ksft_skip
> fi
>
>
> ---
> base-commit: c2469b38e369c3f2b9577beeb9470cc757abc1b9
> change-id: 20240207-selftests-mptcp-iptables-nft-2bfd4a4cfb81
>
> Best regards,
> -- 
> Matthieu Baerts (NGI0) <matttbe@kernel.org>
>
>
>

  parent reply	other threads:[~2024-02-14 19:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-07 18:22 [PATCH mptcp-next] selftests: mptcp: stop forcing iptables-legacy Matthieu Baerts (NGI0)
2024-02-07 19:09 ` selftests: mptcp: stop forcing iptables-legacy: Tests Results MPTCP CI
2024-02-07 19:56 ` MPTCP CI
2024-02-14 19:09 ` Mat Martineau [this message]
2024-02-15 11:14   ` [PATCH mptcp-next] selftests: mptcp: stop forcing iptables-legacy Matthieu Baerts
2024-02-14 20:02 ` selftests: mptcp: stop forcing iptables-legacy: Tests Results MPTCP CI
2024-02-14 20:33 ` MPTCP CI

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=513aac1d-35e2-6505-5cf9-b2920fe0e361@kernel.org \
    --to=martineau@kernel.org \
    --cc=matttbe@kernel.org \
    --cc=mptcp@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox