Skip to content

testing: selftests: nft_flowtable.sh: unbreak test script

Florian Westphal linux-kselftest netfilter-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2testing: selftests: nft_flowtable.sh: use random netns namestools/testing/selftests/netfilter/nft_flowtable.sh+128 -1180 replies
2/2testing: selftests: nft_flowtable.sh: rework test to detect offload failuretools/testing/selftests/netfilter/nft_flowtable.sh+84 -570 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH nf 0/2] testing: selftests: nft_flowtable.sh: unbreak test script

nft_flowtable.sh fails most of the time since 2738d9d963bd1f0 ("netfilter: flowtable: move dst_check to packet path"). Arguably the test scripts way of detecting 'offloaded' vs 'offload failed' was always flaky/broken.

These patches fix this up:
1. first patch moves to random netns names so we don't trip over existing 'ns1' name (too generic...).
2. second patch reworks the 'offload appears to be non-working' by means of packet counters.

Because counters are only incremented when a packet is handled by the classic forward path, check that the counter is lower than a given threshold (25% of file size).

Florian Westphal (2):
testing: selftests: nft_flowtable.sh: use random netns names
testing: selftests: nft_flowtable.sh: rework test to detect offload
failure

 .../selftests/netfilter/nft_flowtable.sh      | 377 ++++++++++--------
 1 file changed, 207 insertions(+), 170 deletions(-)
Signature · 1 line
2.35.1