mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
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>
This commit is contained in:
parent
f2c71c49da
commit
fc49b80496
2 changed files with 5 additions and 2 deletions
|
@ -8,6 +8,7 @@ MNL_LDLIBS := $(shell $(HOSTPKG_CONFIG) --libs libmnl 2>/dev/null || echo -lmnl)
|
|||
|
||||
TEST_PROGS := br_netfilter.sh bridge_brouter.sh
|
||||
TEST_PROGS += br_netfilter_queue.sh
|
||||
TEST_PROGS += conntrack_dump_flush.sh
|
||||
TEST_PROGS += conntrack_icmp_related.sh
|
||||
TEST_PROGS += conntrack_ipip_mtu.sh
|
||||
TEST_PROGS += conntrack_tcp_unreplied.sh
|
||||
|
@ -36,10 +37,9 @@ TEST_PROGS += xt_string.sh
|
|||
|
||||
TEST_PROGS_EXTENDED = nft_concat_range_perf.sh
|
||||
|
||||
TEST_GEN_PROGS = conntrack_dump_flush
|
||||
|
||||
TEST_GEN_FILES = audit_logread
|
||||
TEST_GEN_FILES += connect_close nf_queue
|
||||
TEST_GEN_FILES += conntrack_dump_flush
|
||||
TEST_GEN_FILES += conntrack_reverse_clash
|
||||
TEST_GEN_FILES += sctp_collision
|
||||
|
||||
|
|
3
tools/testing/selftests/net/netfilter/conntrack_dump_flush.sh
Executable file
3
tools/testing/selftests/net/netfilter/conntrack_dump_flush.sh
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
exec unshare -n ./conntrack_dump_flush
|
Loading…
Add table
Reference in a new issue