linux/tools/testing/selftests/tc-testing/tc-tests/qdiscs
Jamal Hadi Salim 1e24c4f2ee selftests: tc-testing: add a lateral-drift hfsc classify-walk test
The classify-loop fix bounds a walk's non-descending hops, so the guard
must not misfire on a legal walk that reaches its leaf through a
level-drift lateral chain. Add a case that builds exactly that chain and
asserts traffic still reaches the chain's own leaf.

A lateral hop can only exist because a bind was legal when it was made
and a later class add raised the target's level, so the setup binds each
hop while the target is still a leaf and only then deepens it: bind
1:1 -> 1:2 while 1:2 is a leaf, add 1:20 under 1:2, add 1:3 and bind
1:2 -> 1:3 while 1:3 is a leaf, then add 1:30 and 1:31 under 1:3 and
bind 1:3 -> 1:31. The walk root -> 1:1 -> 1:2 -> 1:3 -> 1:31 then takes
two lateral hops and must reach leaf 1:31.

The default class is 1:30, distinct from the asserted leaf, and the
verify pattern is anchored to the 1:31 stats line, so neither a
fall-through to the default nor a nonzero count on another class can
satisfy the check. On the patched kernel the test passes; with the bound
forced to zero the walk falls to the default and 1:31 stays idle, so the
test fails.

Reviewed-by: Victor Nogueira <victor@mojatatu.com>
Tested-by: hybris <hybris@mojatatu.ai>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Link: https://patch.msgid.link/QDISC-CTUU.v3.20260916184908@mojatatu.com.2
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-19 16:42:11 -07:00
..
cake_mq.json selftests/tc-testing: add selftests for cake_mq qdisc 2026-01-13 11:54:30 +01:00
cake.json
cbs.json
choke.json
codel.json selftests/tc-testing: add codel/fq_codel interval boundary cases 2026-09-16 17:15:29 -07:00
depth.json selftests/tc-testing: add qdisc hierarchy depth tests 2026-08-06 15:25:15 +02:00
drr.json selftests/tc-testing: Add a test case for DRR class with TC_H_ROOT 2025-03-12 12:52:14 -07:00
dualpi2.json selftests/tc-testing: Add DualPI2 GSO backlog accounting test 2026-06-21 15:16:03 -07:00
etf.json
ets.json selftests: tc-testing: update ETS test 41f5 for clamped quanta 2026-09-05 13:48:08 -07:00
fifo.json selftests/tc-testing: Add a test case for pfifo_head_drop qdisc when limit==0 2025-02-05 18:14:46 -08:00
fq_codel.json selftests/tc-testing: add codel/fq_codel interval boundary cases 2026-09-16 17:15:29 -07:00
fq_pie.json selftests/tc-testing: Add qdisc limit trimming tests 2025-05-09 12:34:38 +01:00
fq.json selftests/tc-testing: Add qdisc limit trimming tests 2025-05-09 12:34:38 +01:00
gred.json
hfsc.json selftests: tc-testing: add a lateral-drift hfsc classify-walk test 2026-09-19 16:42:11 -07:00
hhf_flows_limit.json selftests/tc-testing: add hhf hh_limit cap tests 2026-09-15 13:30:53 +02:00
hhf.json selftests/tc-testing: Add qdisc limit trimming tests 2025-05-09 12:34:38 +01:00
htb.json
ingress.json
mq.json
mqprio.json
multiq.json
netem.json selftests/tc-testing: Add netem test case exercising loops 2026-05-28 12:26:37 +02:00
pfifo_fast.json selftests: tc-testing: add tx_queue_len cap regression tests 2026-09-04 16:30:49 -07:00
pie.json selftests/tc-testing: Add qdisc limit trimming tests 2025-05-09 12:34:38 +01:00
plug.json
prio.json
qfq.json
red.json
sfb.json
sfq.json selftests/tc-testing: sfq: check perturb timer values 2025-06-16 15:02:03 -07:00
skbprio.json
taprio.json selftests/tc-testing: add taprio test for class dump after child delete 2026-04-27 18:41:36 -07:00
tbf.json
teql.json selftests/tc-testing: Try to add teql as a child qdisc 2026-01-19 12:06:42 -08:00