summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorJamal Hadi Salim <jhs@mojatatu.com>2026-09-17 06:57:33 -0400
committerJakub Kicinski <kuba@kernel.org>2026-09-19 16:42:11 -0700
commit1e24c4f2ee44be0eee94092b5d13cbdb4bdf0d60 (patch)
treeb6c694f012a4cd1b7d7ba70ed4ece0873d885dd6 /tools/perf/scripts/python/stackcollapse.py
parent8a60ade2277e1f0e0d0578d565354e52292fa46d (diff)
downloadlinux-1e24c4f2ee44be0eee94092b5d13cbdb4bdf0d60.tar.gz
linux-1e24c4f2ee44be0eee94092b5d13cbdb4bdf0d60.zip
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>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions