]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests: netfilter: fix conntrack stress test failures on debug kernels
authorFlorian Westphal <fw@strlen.de>
Wed, 7 May 2025 07:49:55 +0000 (09:49 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 9 May 2025 01:57:24 +0000 (18:57 -0700)
commit1f389a648a3be07400819c431ee30b74129a8a6e
tree68b73e07bb5d1575899eb8c38ed5fe08ec68691a
parent6b02fd7799fc8e1160c5783459d065ceeb4b7365
selftests: netfilter: fix conntrack stress test failures on debug kernels

Jakub reports test failures on debug kernel:
FAIL: proc inconsistency after uniq filter for ...

This is because entries are expiring while validation is happening.

Increase the timeout of ctnetlink injected entries and the
icmp (ping) timeout to 1h to avoid this.

To reduce run-time, add less entries via ctnetlink when KSFT_MACHINE_SLOW
is set.

also log of a failed run had:
 PASS: dump in netns had same entry count (-C 0, -L 0, -p 0, /proc 0)

... i.e. all entries already expired: add a check and set failure if
this happens.

While at it, include a diff when there were duplicate entries and add
netns name to error messages (it tells if icmp or ctnetlink failed).

Fixes: d33f889fd80c ("selftests: netfilter: add conntrack stress test")
Reported-by: Jakub Kicinski <kuba@kernel.org>
Closes: https://lore.kernel.org/netdev/20250506061125.1a244d12@kernel.org/
Signed-off-by: Florian Westphal <fw@strlen.de>
Link: https://patch.msgid.link/20250507075000.5819-1-fw@strlen.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/netfilter/conntrack_resize.sh