summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorrenmingshuai <renmingshuai@huawei.com>2023-06-20 04:49:39 +0300
committerJakub Kicinski <kuba@kernel.org>2023-06-22 02:57:02 +0300
commitca4fa87435370747cac535cecfd08672bb679487 (patch)
treeb39dc6183bb717394219dceb37233d8048480ef2 /tools
parent1ca09f5746edd5e483d144118497f622af9dbe60 (diff)
downloadlinux-ca4fa87435370747cac535cecfd08672bb679487.tar.xz
selftests: tc-testing: add one test for flushing explicitly created chain
Add the test for additional reference to chains that are explicitly created by RTM_NEWCHAIN message. The test result: 1..1 ok 1 c2b4 - soft lockup alarm will be not generated after delete the prio 0 filter of the chain This is a follow up to commit c9a82bec02c3 ("net/sched: cls_api: Fix lockup on flushing explicitly created chain"). Signed-off-by: Mingshuai Ren <renmingshuai@huawei.com> Acked-by: Pedro Tammela <pctammela@mojatatu.com> Acked-by: Victor Nogueira <victor@mojatatu.com> Link: https://lore.kernel.org/r/20230620014939.2034054-1-renmingshuai@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/tc-testing/tc-tests/infra/filter.json25
1 files changed, 25 insertions, 0 deletions
diff --git a/tools/testing/selftests/tc-testing/tc-tests/infra/filter.json b/tools/testing/selftests/tc-testing/tc-tests/infra/filter.json
new file mode 100644
index 000000000000..c4c778e83da2
--- /dev/null
+++ b/tools/testing/selftests/tc-testing/tc-tests/infra/filter.json
@@ -0,0 +1,25 @@
+[
+ {
+ "id": "c2b4",
+ "name": "soft lockup alarm will be not generated after delete the prio 0 filter of the chain",
+ "category": [
+ "filter",
+ "chain"
+ ],
+ "setup": [
+ "$IP link add dev $DUMMY type dummy || /bin/true",
+ "$TC qdisc add dev $DUMMY root handle 1: htb default 1",
+ "$TC chain add dev $DUMMY",
+ "$TC filter del dev $DUMMY chain 0 parent 1: prio 0"
+ ],
+ "cmdUnderTest": "$TC filter add dev $DUMMY chain 0 parent 1:",
+ "expExitCode": "2",
+ "verifyCmd": "$TC chain ls dev $DUMMY",
+ "matchPattern": "chain parent 1: chain 0",
+ "matchCount": "1",
+ "teardown": [
+ "$TC qdisc del dev $DUMMY root handle 1: htb default 1",
+ "$IP link del dev $DUMMY type dummy"
+ ]
+ }
+]