Netfilter-Devel Archive mirror
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: <netdev@vger.kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>,
	<netfilter-devel@vger.kernel.org>,
	pablo@netfilter.org
Subject: [PATCH net-next v2 00/12] testing: make netfilter selftests functional in vng environment
Date: Thu, 18 Apr 2024 17:27:28 +0200	[thread overview]
Message-ID: <20240418152744.15105-1-fw@strlen.de> (raw)

This is the second batch of the netfilter selftest move.

Changes since v1:
- makefile and kernel config are updated to have all required features
- fix makefile with missing bits to make kselftest-install work
- test it via vng as per
   https://github.com/linux-netdev/nipa/wiki/How-to-run-netdev-selftests-CI-style
   (Thanks Jakub!)
- squash a few fixes, e.g. nft_queue.sh v1 had a race w. NFNETLINK_QUEUE=m
- add a settings file with 8m timeout, for nft_concat_range.sh sake.
  That script can be sped up a bit, I think, but its not contained in
  this batch yet.
- toss the first two bogus rebase artifacts (Matthieu Baerts)

scripts are moved to lib.sh infra. This allows to use busywait helper
and ditch various 'sleep 2' all over the place.

Tested on Fedora 39:

vng --build  --config tools/testing/selftests/net/netfilter/config
make -C tools/testing/selftests/ TARGETS=net/netfilter
vng -v --run . --user root --cpus 2 -- \
        make -C tools/testing/selftests TARGETS=net/netfilter run_tests

... all tests pass except nft_audit.sh which SKIPs due to nft version mismatch
(Fedora is on nft 1.0.7 which lacks reset keyword support).

Missing/WIP bits:
- speed up nf_concat_range.sh test
- extend flowtable selftest
- shellcheck fixups for remaining scripts

Florian Westphal (12):
  selftests: netfilter: nft_queue.sh: move to lib.sh infra
  selftests: netfilter: nft_queue.sh: shellcheck cleanups
  selftests: netfilter: nft_synproxy.sh: move to lib.sh infra
  selftests: netfilter: nft_zones_many.sh: move to lib.sh infra
  selftests: netfilter: xt_string.sh: move to lib.sh infra
  selftests: netfilter: xt_string.sh: shellcheck cleanups
  selftests: netfilter: nft_nat_zones.sh: shellcheck cleanups
  selftests: netfilter: conntrack_ipip_mtu.sh: shellcheck cleanups
  selftests: netfilter: nft_fib.sh: shellcheck cleanups
  selftests: netfilter: nft_meta.sh: small shellcheck cleanup
  selftests: netfilter: nft_audit.sh: add more skip checks
  selftests: netfilter: update makefiles and kernel config

 .../testing/selftests/net/netfilter/Makefile  |   5 +
 tools/testing/selftests/net/netfilter/config  |  52 +++-
 .../net/netfilter/conntrack_ipip_mtu.sh       |  74 ++---
 .../selftests/net/netfilter/nft_audit.sh      |  30 +-
 .../selftests/net/netfilter/nft_fib.sh        | 128 ++++-----
 .../selftests/net/netfilter/nft_meta.sh       |   4 +-
 .../selftests/net/netfilter/nft_nat_zones.sh  | 193 +++++--------
 .../selftests/net/netfilter/nft_queue.sh      | 272 ++++++++----------
 .../selftests/net/netfilter/nft_synproxy.sh   |  77 ++---
 .../selftests/net/netfilter/nft_zones_many.sh |  93 +++---
 .../testing/selftests/net/netfilter/settings  |   1 +
 .../selftests/net/netfilter/xt_string.sh      |  89 +++---
 12 files changed, 498 insertions(+), 520 deletions(-)
 create mode 100644 tools/testing/selftests/net/netfilter/settings

-- 
2.43.2


             reply	other threads:[~2024-04-18 15:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-18 15:27 Florian Westphal [this message]
2024-04-18 15:27 ` [PATCH net-next v2 01/12] selftests: netfilter: nft_queue.sh: move to lib.sh infra Florian Westphal
2024-04-18 15:27 ` [PATCH net-next v2 02/12] selftests: netfilter: nft_queue.sh: shellcheck cleanups Florian Westphal
2024-04-18 15:27 ` [PATCH net-next v2 03/12] selftests: netfilter: nft_synproxy.sh: move to lib.sh infra Florian Westphal
2024-04-18 15:27 ` [PATCH net-next v2 04/12] selftests: netfilter: nft_zones_many.sh: " Florian Westphal
2024-04-18 15:27 ` [PATCH net-next v2 05/12] selftests: netfilter: xt_string.sh: " Florian Westphal
2024-04-18 15:27 ` [PATCH net-next v2 06/12] selftests: netfilter: xt_string.sh: shellcheck cleanups Florian Westphal
2024-04-18 15:27 ` [PATCH net-next v2 07/12] selftests: netfilter: nft_nat_zones.sh: " Florian Westphal
2024-04-18 15:27 ` [PATCH net-next v2 08/12] selftests: netfilter: conntrack_ipip_mtu.sh: " Florian Westphal
2024-04-18 15:27 ` [PATCH net-next v2 09/12] selftests: netfilter: nft_fib.sh: " Florian Westphal
2024-04-18 15:27 ` [PATCH net-next v2 10/12] selftests: netfilter: nft_meta.sh: small shellcheck cleanup Florian Westphal
2024-04-18 15:27 ` [PATCH net-next v2 11/12] selftests: netfilter: nft_audit.sh: add more skip checks Florian Westphal
2024-04-18 15:27 ` [PATCH net-next v2 12/12] selftests: netfilter: update makefiles and kernel config Florian Westphal
2024-04-20  3:30 ` [PATCH net-next v2 00/12] testing: make netfilter selftests functional in vng environment patchwork-bot+netdevbpf

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=20240418152744.15105-1-fw@strlen.de \
    --to=fw@strlen.de \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pablo@netfilter.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).