From f157b73d511416226f70c3cb1750eb6fdfa76a2a Mon Sep 17 00:00:00 2001 From: Pedro Tammela Date: Tue, 17 Oct 2023 12:23:08 -0300 Subject: [PATCH 1/2] selftests: tc-testing: add missing Kconfig options to 'config' Make sure CI builds using just tc-testing/config can run all tdc tests. Some tests were broken because of missing knobs. Acked-by: Jamal Hadi Salim Signed-off-by: Pedro Tammela Link: https://lore.kernel.org/r/20231017152309.3196320-2-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski --- tools/testing/selftests/tc-testing/config | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/testing/selftests/tc-testing/config b/tools/testing/selftests/tc-testing/config index 5aa8705751f0..012aa33b341b 100644 --- a/tools/testing/selftests/tc-testing/config +++ b/tools/testing/selftests/tc-testing/config @@ -1,12 +1,21 @@ +# +# Network +# + +CONFIG_DUMMY=y +CONFIG_VETH=y + # # Core Netfilter Configuration # +CONFIG_NETFILTER_ADVANCED=y CONFIG_NF_CONNTRACK=m CONFIG_NF_CONNTRACK_MARK=y CONFIG_NF_CONNTRACK_ZONES=y CONFIG_NF_CONNTRACK_LABELS=y CONFIG_NF_CONNTRACK_PROCFS=y CONFIG_NF_FLOW_TABLE=m +CONFIG_NF_TABLES=m CONFIG_NF_NAT=m CONFIG_NETFILTER_XT_TARGET_LOG=m From 35027c790970c40a5093550af7c9f1c77de182b4 Mon Sep 17 00:00:00 2001 From: Pedro Tammela Date: Tue, 17 Oct 2023 12:23:09 -0300 Subject: [PATCH 2/2] selftests: tc-testing: move auxiliary scripts to a dedicated folder Some taprio tests need auxiliary scripts to wait for workqueue events to process. Move them to a dedicated folder in order to package them for the kselftests tarball. Acked-by: Jamal Hadi Salim Signed-off-by: Pedro Tammela Link: https://lore.kernel.org/r/20231017152309.3196320-3-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski --- tools/testing/selftests/tc-testing/Makefile | 2 +- .../tc-testing/{ => scripts}/taprio_wait_for_admin.sh | 0 .../selftests/tc-testing/tc-tests/qdiscs/taprio.json | 8 ++++---- 3 files changed, 5 insertions(+), 5 deletions(-) rename tools/testing/selftests/tc-testing/{ => scripts}/taprio_wait_for_admin.sh (100%) diff --git a/tools/testing/selftests/tc-testing/Makefile b/tools/testing/selftests/tc-testing/Makefile index 3c4b7fa05075..b1fa2e177e2f 100644 --- a/tools/testing/selftests/tc-testing/Makefile +++ b/tools/testing/selftests/tc-testing/Makefile @@ -28,4 +28,4 @@ $(OUTPUT)/%.o: %.c $(LLC) -march=bpf -mcpu=$(CPU) $(LLC_FLAGS) -filetype=obj -o $@ TEST_PROGS += ./tdc.sh -TEST_FILES := tdc*.py Tdc*.py plugins plugin-lib tc-tests +TEST_FILES := tdc*.py Tdc*.py plugins plugin-lib tc-tests scripts diff --git a/tools/testing/selftests/tc-testing/taprio_wait_for_admin.sh b/tools/testing/selftests/tc-testing/scripts/taprio_wait_for_admin.sh similarity index 100% rename from tools/testing/selftests/tc-testing/taprio_wait_for_admin.sh rename to tools/testing/selftests/tc-testing/scripts/taprio_wait_for_admin.sh diff --git a/tools/testing/selftests/tc-testing/tc-tests/qdiscs/taprio.json b/tools/testing/selftests/tc-testing/tc-tests/qdiscs/taprio.json index 0599635c4bc6..2d603ef2e375 100644 --- a/tools/testing/selftests/tc-testing/tc-tests/qdiscs/taprio.json +++ b/tools/testing/selftests/tc-testing/tc-tests/qdiscs/taprio.json @@ -170,11 +170,11 @@ "setup": [ "echo \"1 1 8\" > /sys/bus/netdevsim/new_device", "$TC qdisc replace dev $ETH handle 8001: parent root stab overhead 24 taprio num_tc 8 map 0 1 2 3 4 5 6 7 queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 base-time 0 sched-entry S ff 20000000 clockid CLOCK_TAI", - "./taprio_wait_for_admin.sh $TC $ETH" + "./scripts/taprio_wait_for_admin.sh $TC $ETH" ], "cmdUnderTest": "$TC qdisc replace dev $ETH parent 8001:7 taprio num_tc 8 map 0 1 2 3 4 5 6 7 queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 base-time 200 sched-entry S ff 20000000 clockid CLOCK_TAI", "expExitCode": "2", - "verifyCmd": "bash -c \"./taprio_wait_for_admin.sh $TC $ETH && $TC -j qdisc show dev $ETH root | jq '.[].options.base_time'\"", + "verifyCmd": "bash -c \"./scripts/taprio_wait_for_admin.sh $TC $ETH && $TC -j qdisc show dev $ETH root | jq '.[].options.base_time'\"", "matchPattern": "0", "matchCount": "1", "teardown": [ @@ -195,11 +195,11 @@ "setup": [ "echo \"1 1 8\" > /sys/bus/netdevsim/new_device", "$TC qdisc replace dev $ETH handle 8001: parent root stab overhead 24 taprio num_tc 8 map 0 1 2 3 4 5 6 7 queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 base-time 0 sched-entry S ff 20000000 flags 0x2", - "./taprio_wait_for_admin.sh $TC $ETH" + "./scripts/taprio_wait_for_admin.sh $TC $ETH" ], "cmdUnderTest": "$TC qdisc replace dev $ETH parent 8001:7 taprio num_tc 8 map 0 1 2 3 4 5 6 7 queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 base-time 200 sched-entry S ff 20000000 flags 0x2", "expExitCode": "2", - "verifyCmd": "bash -c \"./taprio_wait_for_admin.sh $TC $ETH && $TC -j qdisc show dev $ETH root | jq '.[].options.base_time'\"", + "verifyCmd": "bash -c \"./scripts/taprio_wait_for_admin.sh $TC $ETH && $TC -j qdisc show dev $ETH root | jq '.[].options.base_time'\"", "matchPattern": "0", "matchCount": "1", "teardown": [