Skip to content

Commit fc49b80

Browse files
Florian Westphalkuba-moo
authored andcommitted
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 <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent f2c71c4 commit fc49b80

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

tools/testing/selftests/net/netfilter/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ MNL_LDLIBS := $(shell $(HOSTPKG_CONFIG) --libs libmnl 2>/dev/null || echo -lmnl)
88

99
TEST_PROGS := br_netfilter.sh bridge_brouter.sh
1010
TEST_PROGS += br_netfilter_queue.sh
11+
TEST_PROGS += conntrack_dump_flush.sh
1112
TEST_PROGS += conntrack_icmp_related.sh
1213
TEST_PROGS += conntrack_ipip_mtu.sh
1314
TEST_PROGS += conntrack_tcp_unreplied.sh
@@ -36,10 +37,9 @@ TEST_PROGS += xt_string.sh
3637

3738
TEST_PROGS_EXTENDED = nft_concat_range_perf.sh
3839

39-
TEST_GEN_PROGS = conntrack_dump_flush
40-
4140
TEST_GEN_FILES = audit_logread
4241
TEST_GEN_FILES += connect_close nf_queue
42+
TEST_GEN_FILES += conntrack_dump_flush
4343
TEST_GEN_FILES += conntrack_reverse_clash
4444
TEST_GEN_FILES += sctp_collision
4545

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
exec unshare -n ./conntrack_dump_flush

0 commit comments

Comments
 (0)