mbox series

[net-next,v2,00/12] testing: make netfilter selftests functional in vng environment

Message ID 20240418152744.15105-1-fw@strlen.de (mailing list archive)
Headers show
Series testing: make netfilter selftests functional in vng environment | expand

Message

Florian Westphal April 18, 2024, 3:27 p.m. UTC
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

Comments

patchwork-bot+netdevbpf@kernel.org April 20, 2024, 3:30 a.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Thu, 18 Apr 2024 17:27:28 +0200 you wrote:
> 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)
> 
> [...]

Here is the summary with links:
  - [net-next,v2,01/12] selftests: netfilter: nft_queue.sh: move to lib.sh infra
    https://git.kernel.org/netdev/net-next/c/03a1a62f3a3c
  - [net-next,v2,02/12] selftests: netfilter: nft_queue.sh: shellcheck cleanups
    https://git.kernel.org/netdev/net-next/c/cebb352269e7
  - [net-next,v2,03/12] selftests: netfilter: nft_synproxy.sh: move to lib.sh infra
    https://git.kernel.org/netdev/net-next/c/a849e06c8025
  - [net-next,v2,04/12] selftests: netfilter: nft_zones_many.sh: move to lib.sh infra
    https://git.kernel.org/netdev/net-next/c/c1a9d47b59d0
  - [net-next,v2,05/12] selftests: netfilter: xt_string.sh: move to lib.sh infra
    https://git.kernel.org/netdev/net-next/c/5067fec09403
  - [net-next,v2,06/12] selftests: netfilter: xt_string.sh: shellcheck cleanups
    https://git.kernel.org/netdev/net-next/c/c0f9a2b705c2
  - [net-next,v2,07/12] selftests: netfilter: nft_nat_zones.sh: shellcheck cleanups
    https://git.kernel.org/netdev/net-next/c/d6905f088d2b
  - [net-next,v2,08/12] selftests: netfilter: conntrack_ipip_mtu.sh: shellcheck cleanups
    https://git.kernel.org/netdev/net-next/c/05af10a88e75
  - [net-next,v2,09/12] selftests: netfilter: nft_fib.sh: shellcheck cleanups
    https://git.kernel.org/netdev/net-next/c/9b443c769b1b
  - [net-next,v2,10/12] selftests: netfilter: nft_meta.sh: small shellcheck cleanup
    https://git.kernel.org/netdev/net-next/c/4d7730154ed5
  - [net-next,v2,11/12] selftests: netfilter: nft_audit.sh: add more skip checks
    https://git.kernel.org/netdev/net-next/c/1f50b0fef936
  - [net-next,v2,12/12] selftests: netfilter: update makefiles and kernel config
    https://git.kernel.org/netdev/net-next/c/0b2e1db97b42

You are awesome, thank you!