]> www.infradead.org Git - users/dwmw2/linux.git/commit
selftests: netfilter: run conntrack_dump_flush in netns
authorFlorian Westphal <fw@strlen.de>
Mon, 4 Nov 2024 14:25:24 +0000 (15:25 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 6 Nov 2024 01:58:53 +0000 (17:58 -0800)
commitfc49b804967e5b1cc1665efd4de112945e1ab4c6
tree9872e97586b261c70eb8ba6a7e7c9ccf4aec88a2
parentf2c71c49da8f8941e3e465605fc41939eee9210a
selftests: netfilter: run conntrack_dump_flush in netns

This test will fail if the initial namespace has conntrack
active due to unexpected number of flows returned on dump:

  conntrack_dump_flush.c:451:test_flush_by_zone:Expected ret (7) == 2 (2)
  test_flush_by_zone: Test failed
  FAIL  conntrack_dump_flush.test_flush_by_zone
  not ok 2 conntrack_dump_flush.test_flush_by_zone

Add a wrapper that unshares this program to avoid this problem.

Signed-off-by: Florian Westphal <fw@strlen.de>
Link: https://patch.msgid.link/20241104142529.2352-1-fw@strlen.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/netfilter/Makefile
tools/testing/selftests/net/netfilter/conntrack_dump_flush.sh [new file with mode: 0755]