* [net-next PATCH] selftests: netfilter: Fix skip of wildcard interface test
@ 2025-05-27 9:41 Phil Sutter
2025-05-27 9:46 ` Pablo Neira Ayuso
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Phil Sutter @ 2025-05-27 9:41 UTC (permalink / raw)
To: Paolo Abeni
Cc: Pablo Neira Ayuso, netfilter-devel, davem, netdev, kuba, edumazet,
fw, horms
The script is supposed to skip wildcard interface testing if unsupported
by the host's nft tool. The failing check caused script abort due to
'set -e' though. Fix this by running the potentially failing nft command
inside the if-conditional pipe.
Fixes: 73db1b5dab6f ("selftests: netfilter: Torture nftables netdev hooks")
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
.../selftests/net/netfilter/nft_interface_stress.sh | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/net/netfilter/nft_interface_stress.sh b/tools/testing/selftests/net/netfilter/nft_interface_stress.sh
index 11d82d11495e..5ff7be9daeee 100755
--- a/tools/testing/selftests/net/netfilter/nft_interface_stress.sh
+++ b/tools/testing/selftests/net/netfilter/nft_interface_stress.sh
@@ -97,7 +97,8 @@ kill $nft_monitor_pid
kill $rename_loop_pid
wait
-ip netns exec $nsr nft -f - <<EOF
+wildcard_prep() {
+ ip netns exec $nsr nft -f - <<EOF
table ip t {
flowtable ft_wild {
hook ingress priority 0
@@ -105,7 +106,9 @@ table ip t {
}
}
EOF
-if [[ $? -ne 0 ]]; then
+}
+
+if ! wildcard_prep; then
echo "SKIP wildcard tests: not supported by host's nft?"
else
for ((i = 0; i < 100; i++)); do
--
2.49.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [net-next PATCH] selftests: netfilter: Fix skip of wildcard interface test
2025-05-27 9:41 [net-next PATCH] selftests: netfilter: Fix skip of wildcard interface test Phil Sutter
@ 2025-05-27 9:46 ` Pablo Neira Ayuso
2025-05-28 7:50 ` Paolo Abeni
2025-05-28 7:53 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Pablo Neira Ayuso @ 2025-05-27 9:46 UTC (permalink / raw)
To: Phil Sutter
Cc: Paolo Abeni, netfilter-devel, davem, netdev, kuba, edumazet, fw,
horms
On Tue, May 27, 2025 at 11:41:17AM +0200, Phil Sutter wrote:
> The script is supposed to skip wildcard interface testing if unsupported
> by the host's nft tool. The failing check caused script abort due to
> 'set -e' though. Fix this by running the potentially failing nft command
> inside the if-conditional pipe.
Thanks Phil, this is an easy fix for this.
> Fixes: 73db1b5dab6f ("selftests: netfilter: Torture nftables netdev hooks")
> Signed-off-by: Phil Sutter <phil@nwl.cc>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Paolo, you can take this now to calm down CI. Thanks
> ---
> .../selftests/net/netfilter/nft_interface_stress.sh | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/tools/testing/selftests/net/netfilter/nft_interface_stress.sh b/tools/testing/selftests/net/netfilter/nft_interface_stress.sh
> index 11d82d11495e..5ff7be9daeee 100755
> --- a/tools/testing/selftests/net/netfilter/nft_interface_stress.sh
> +++ b/tools/testing/selftests/net/netfilter/nft_interface_stress.sh
> @@ -97,7 +97,8 @@ kill $nft_monitor_pid
> kill $rename_loop_pid
> wait
>
> -ip netns exec $nsr nft -f - <<EOF
> +wildcard_prep() {
> + ip netns exec $nsr nft -f - <<EOF
> table ip t {
> flowtable ft_wild {
> hook ingress priority 0
> @@ -105,7 +106,9 @@ table ip t {
> }
> }
> EOF
> -if [[ $? -ne 0 ]]; then
> +}
> +
> +if ! wildcard_prep; then
> echo "SKIP wildcard tests: not supported by host's nft?"
> else
> for ((i = 0; i < 100; i++)); do
> --
> 2.49.0
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [net-next PATCH] selftests: netfilter: Fix skip of wildcard interface test
2025-05-27 9:41 [net-next PATCH] selftests: netfilter: Fix skip of wildcard interface test Phil Sutter
2025-05-27 9:46 ` Pablo Neira Ayuso
@ 2025-05-28 7:50 ` Paolo Abeni
2025-05-28 7:53 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Paolo Abeni @ 2025-05-28 7:50 UTC (permalink / raw)
To: Phil Sutter
Cc: Pablo Neira Ayuso, netfilter-devel, davem, netdev, kuba, edumazet,
fw, horms
On 5/27/25 11:41 AM, Phil Sutter wrote:
> The script is supposed to skip wildcard interface testing if unsupported
> by the host's nft tool. The failing check caused script abort due to
> 'set -e' though. Fix this by running the potentially failing nft command
> inside the if-conditional pipe.
>
> Fixes: 73db1b5dab6f ("selftests: netfilter: Torture nftables netdev hooks")
> Signed-off-by: Phil Sutter <phil@nwl.cc>
FTR I'm applying this patch below the 24h grace period to avoid sending
a net-next PR with known issue and known unapplied fix.
/P
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [net-next PATCH] selftests: netfilter: Fix skip of wildcard interface test
2025-05-27 9:41 [net-next PATCH] selftests: netfilter: Fix skip of wildcard interface test Phil Sutter
2025-05-27 9:46 ` Pablo Neira Ayuso
2025-05-28 7:50 ` Paolo Abeni
@ 2025-05-28 7:53 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-05-28 7:53 UTC (permalink / raw)
To: Phil Sutter
Cc: pabeni, pablo, netfilter-devel, davem, netdev, kuba, edumazet, fw,
horms
Hello:
This patch was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:
On Tue, 27 May 2025 11:41:17 +0200 you wrote:
> The script is supposed to skip wildcard interface testing if unsupported
> by the host's nft tool. The failing check caused script abort due to
> 'set -e' though. Fix this by running the potentially failing nft command
> inside the if-conditional pipe.
>
> Fixes: 73db1b5dab6f ("selftests: netfilter: Torture nftables netdev hooks")
> Signed-off-by: Phil Sutter <phil@nwl.cc>
>
> [...]
Here is the summary with links:
- [net-next] selftests: netfilter: Fix skip of wildcard interface test
https://git.kernel.org/netdev/net-next/c/6da5f1b4b4a0
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-05-28 7:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-27 9:41 [net-next PATCH] selftests: netfilter: Fix skip of wildcard interface test Phil Sutter
2025-05-27 9:46 ` Pablo Neira Ayuso
2025-05-28 7:50 ` Paolo Abeni
2025-05-28 7:53 ` patchwork-bot+netdevbpf
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).