1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00

selftests/tc-testing: Add a test case for qdisc_tree_reduce_backlog()

Integrate the test case provided by Mingi Cho into TDC.

All test results:

1..4
ok 1 ca5e - Check class delete notification for ffff:
ok 2 e4b7 - Check class delete notification for root ffff:
ok 3 33a9 - Check ingress is not searchable on backlog update
ok 4 a4b9 - Test class qlen notification

Cc: Mingi Cho <mincho@theori.io>
Signed-off-by: Cong Wang <cong.wang@bytedance.com>
Link: https://patch.msgid.link/20250204005841.223511-5-xiyou.wangcong@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Cong Wang 2025-02-03 16:58:41 -08:00 committed by Jakub Kicinski
parent 638ba50893
commit 91aadc16ee

View file

@ -94,5 +94,37 @@
"$TC qdisc del dev $DUMMY ingress",
"$IP addr del 10.10.10.10/24 dev $DUMMY"
]
}
},
{
"id": "a4b9",
"name": "Test class qlen notification",
"category": [
"qdisc"
],
"plugins": {
"requires": "nsPlugin"
},
"setup": [
"$IP link set dev $DUMMY up || true",
"$IP addr add 10.10.10.10/24 dev $DUMMY || true",
"$TC qdisc add dev $DUMMY root handle 1: drr",
"$TC filter add dev $DUMMY parent 1: basic classid 1:1",
"$TC class add dev $DUMMY parent 1: classid 1:1 drr",
"$TC qdisc add dev $DUMMY parent 1:1 handle 2: netem",
"$TC qdisc add dev $DUMMY parent 2: handle 3: drr",
"$TC filter add dev $DUMMY parent 3: basic action drop",
"$TC class add dev $DUMMY parent 3: classid 3:1 drr",
"$TC class del dev $DUMMY classid 1:1",
"$TC class add dev $DUMMY parent 1: classid 1:1 drr"
],
"cmdUnderTest": "ping -c1 -W0.01 -I $DUMMY 10.10.10.1",
"expExitCode": "1",
"verifyCmd": "$TC qdisc ls dev $DUMMY",
"matchPattern": "drr 1: root",
"matchCount": "1",
"teardown": [
"$TC qdisc del dev $DUMMY root handle 1: drr",
"$IP addr del 10.10.10.10/24 dev $DUMMY"
]
}
]