aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net/lapb/lapb_timer.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2025-05-23 14:20:45 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2025-06-05 10:50:04 +0200
commitfebe7eda74d105437c7532b4a76ff14eb6007828 (patch)
treef335cd20f5accefe576e66f5f313bc8fd96059e4 /net/lapb/lapb_timer.c
parentnetfilter: nf_set_pipapo_avx2: fix initial map fill (diff)
downloadwireguard-linux-febe7eda74d105437c7532b4a76ff14eb6007828.tar.xz
wireguard-linux-febe7eda74d105437c7532b4a76ff14eb6007828.zip
selftests: netfilter: nft_concat_range.sh: prefer per element counters for testing
The selftest uses following rule: ... @test counter name "test" Then sends a packet, then checks if the named counter did increment or not. This is fine for the 'no-match' test case: If anything matches the counter increments and the test fails as expected. But for the 'should match' test cases this isn't optimal. Consider buggy matching, where the packet matches entry x, but it should have matched entry y. In that case the test would erronously pass. Rework the selftest to use per-element counters to avoid this. After sending packet that should have matched entry x, query the relevant element via 'nft reset element' and check that its counter had incremented. The 'nomatch' case isn't altered, no entry should match so the named counter must be 0, changing it to the per-element counter would then pass if another entry matches. The downside of this change is a slight increase in test run-time by a few seconds. Signed-off-by: Florian Westphal <fw@strlen.de> Reviewed-by: Stefano Brivio <sbrivio@redhat.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/lapb/lapb_timer.c')
0 files changed, 0 insertions, 0 deletions