Skip to content

testing: make netfilter selftests functional in vng environment

Florian Westphal netdev netfilter-devel 2 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest12 patches 0 repliesApplied 12/12
  2. v112 patches 7 repliesSuperseded

Changes in v2 from the cover letter

- 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)

Patches in v2 All 12 applied

#Subject and filesSizeRepliesApplied
1/12selftests: netfilter: nft_queue.sh: move to lib.sh infratools/testing/selftests/net/netfilter/nft_queue.sh+34 -610 repliesApplied
2/12selftests: netfilter: nft_queue.sh: shellcheck cleanupstools/testing/selftests/net/netfilter/nft_queue.sh+103 -1080 repliesApplied
3/12selftests: netfilter: nft_synproxy.sh: move to lib.sh infratools/testing/selftests/net/netfilter/nft_synproxy.sh+28 -490 repliesApplied
4/12selftests: netfilter: nft_zones_many.sh: move to lib.sh infratools/testing/selftests/net/netfilter/nft_zones_many.sh+45 -480 repliesApplied
5/12selftests: netfilter: xt_string.sh: move to lib.sh infratools/testing/selftests/net/netfilter/xt_string.sh+30 -250 repliesApplied
6/12selftests: netfilter: xt_string.sh: shellcheck cleanupstools/testing/selftests/net/netfilter/xt_string.sh+17 -170 repliesApplied
7/12selftests: netfilter: nft_nat_zones.sh: shellcheck cleanupstools/testing/selftests/net/netfilter/nft_nat_zones.sh+75 -1180 repliesApplied
8/12selftests: netfilter: conntrack_ipip_mtu.sh: shellcheck cleanupstools/testing/selftests/net/netfilter/conntrack_ipip_mtu.sh+37 -370 repliesApplied
9/12selftests: netfilter: nft_fib.sh: shellcheck cleanupstools/testing/selftests/net/netfilter/nft_fib.sh+61 -670 repliesApplied
10/12selftests: netfilter: nft_meta.sh: small shellcheck cleanuptools/testing/selftests/net/netfilter/nft_meta.sh+2 -20 repliesApplied
11/12selftests: netfilter: nft_audit.sh: add more skip checkstools/testing/selftests/net/netfilter/nft_audit.sh+26 -40 repliesApplied
12/12selftests: netfilter: update makefiles and kernel configtools/testing/selftests/net/netfilter/Makefile tools/testing/selftests/net/netfilter/config tools/testing/selftests/net/netfilter/settings+57 -10 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

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

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
Signature · 1 line
2.43.2