From: Florian Westphal <fw@strlen.de>
To: Aleksei Oladko <aleksey.oladko@virtuozzo.com>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>,
Phil Sutter <phil@nwl.cc>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>, Shuah Khan <shuah@kernel.org>,
Konstantin Khorenko <khorenko@virtuozzo.com>,
netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
netdev@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] selftests: netfilter: avoid RULE_REPLACE error when zeroing rule counters
Date: Wed, 21 Jan 2026 00:20:11 +0100 [thread overview]
Message-ID: <aXANq__7K0_fhq2D@strlen.de> (raw)
In-Reply-To: <20260120231106.328585-1-aleksey.oladko@virtuozzo.com>
Aleksei Oladko <aleksey.oladko@virtuozzo.com> wrote:
> diff --git a/tools/testing/selftests/net/netfilter/rpath.sh b/tools/testing/selftests/net/netfilter/rpath.sh
> index 24ad41d526d9..90cc21233235 100755
> --- a/tools/testing/selftests/net/netfilter/rpath.sh
> +++ b/tools/testing/selftests/net/netfilter/rpath.sh
> @@ -125,8 +125,24 @@ netns_ping() { # (netns, args...)
> }
>
> clear_counters() {
> - [ -n "$iptables" ] && ip netns exec "$ns2" "$iptables" -t raw -Z
> - [ -n "$ip6tables" ] && ip netns exec "$ns2" "$ip6tables" -t raw -Z
> + if [ -n "$iptables" ]; then
> + if ! ip netns exec "$ns2" "$iptables" -t raw -Z 2>/dev/null; then
> + ip netns exec "$ns2" "$iptables" -L PREROUTING -t raw -n --line-numbers | \
I would prefer to SKIP in this case rather than working around
userspace bugs.
prev parent reply other threads:[~2026-01-20 23:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-20 23:11 [PATCH] selftests: netfilter: avoid RULE_REPLACE error when zeroing rule counters Aleksei Oladko
2026-01-20 23:20 ` Florian Westphal [this message]
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=aXANq__7K0_fhq2D@strlen.de \
--to=fw@strlen.de \
--cc=aleksey.oladko@virtuozzo.com \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=khorenko@virtuozzo.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pablo@netfilter.org \
--cc=phil@nwl.cc \
--cc=shuah@kernel.org \
/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