tools: testing: selftests: switch conntrack_dump_flush to TEST_PROGS
Subsystems (4)
Florian Westphal
maintainerPATCH 1/1 tools: testing: selftests: switch conntrack_dump_flush to TEST_PROGS
Currently conntrack_dump_flush test program always runs when passing TEST_PROGS argument:
% make -C tools/testing/selftests TARGETS=net/netfilter TEST_PROGS=conntrack_ipip_mtu.sh run_tests
make: Entering [..]
TAP version 13
1..2 [..]
selftests: net/netfilter: conntrack_dump_flush [..]
Move away from TEST_CUSTOM_PROGS to avoid this. After this, above command will only run the program specified in TEST_PROGS.
---
I noticed that conntrack_dump_flush test case runs on each test iteration in the netdev test infra, hence this patch.
Alternative would be to also pass TEST_CUSTOM_PROGS="", but I guess its better to stop using this feature, no other net subtests do this.
tools/testing/selftests/net/netfilter/Makefile | 3 +-- tools/testing/selftests/net/netfilter/conntrack_dump_flush.sh | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100755 tools/testing/selftests/net/netfilter/conntrack_dump_flush.sh
tools/testing/selftests/net/netfilter/Makefile +1 -2
@@ -7,6 +7,7 @@ MNL_CFLAGS := $(shell $(HOSTPKG_CONFIG) --cflags libmnl 2>/dev/null) MNL_LDLIBS := $(shell $(HOSTPKG_CONFIG) --libs libmnl 2>/dev/null || echo -lmnl) TEST_PROGS := br_netfilter.sh bridge_brouter.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
@@ -28,8 +29,6 @@ TEST_PROGS += nft_zones_many.sh TEST_PROGS += rpath.sh TEST_PROGS += xt_string.sh -TEST_CUSTOM_PROGS += conntrack_dump_flush - TEST_GEN_FILES = audit_logread TEST_GEN_FILES += conntrack_dump_flush TEST_GEN_FILES += connect_close nf_queue
tools/testing/selftests/net/netfilter/conntrack_dump_flush.sh new file +4 -0
@@ -0,0 +1,4 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0 + +exec ./conntrack_dump_flush
Signature · 1 line
2.43.2
Jakub Kicinski
maintainerQuoted 11 lines · On Mon, 22 Apr 2024 17:26:59 +0200 Florian Westphal wrote:
Currently
conntrack_dump_flushtest program always runs when passingTEST_PROGSargument:% make -C
tools/testing/selftestsTARGETS=net/netfilter TEST_PROGS=conntrack_ipip_mtu.shrun_tests
make: Entering [..]
TAP version 13
1..2 [..]
selftests: net/netfilter:conntrack_dump_flush[..]Move away from
TEST_CUSTOM_PROGSto avoid this. After this, above command will only run the program specified inTEST_PROGS.
Hm, but why TEST_CUSTOM_PROGS in the first place? What's special about it? I think TEST_GEN_PROGS would work
Florian Westphal
maintainerQuoted 10 lines · Jakub Kicinski
Quoted 9 lines · On Mon, 22 Apr 2024 17:26:59 +0200 Florian Westphal wrote:
Currently
conntrack_dump_flushtest program always runs when passingTEST_PROGSargument:% make -C
tools/testing/selftestsTARGETS=net/netfilter TEST_PROGS=conntrack_ipip_mtu.shrun_tests
make: Entering [..]
TAP version 13
1..2 [..]
selftests: net/netfilter:conntrack_dump_flush[..]
Quoted 5 lines
Quoted 2 lines
Move away from
TEST_CUSTOM_PROGSto avoid this. After this, above command will only run the program specified inTEST_PROGS.Hm, but why
TEST_CUSTOM_PROGSin the first place? What's special about it? I thinkTEST_GEN_PROGSwould work
It works iff I run 'make -C tools/testing/selftests TARGETS=net/netfilter' before running vng ... make -C tools/testing/selftests TARGETS=net/netfilter TEST_PROGS=conntrack_dump_flush TEST_GEN_PROGS="" run_tests.
I'll send a v2, will check if it works in the CI or not.