mbox series

[nf,0/2] testing: selftests: nft_flowtable.sh: unbreak test script

Message ID 20220816121522.14278-1-fw@strlen.de
Headers show
Series testing: selftests: nft_flowtable.sh: unbreak test script | expand

Message

Florian Westphal Aug. 16, 2022, 12:15 p.m. UTC
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(-)