diff options
| author | Tao Cui <cuitao@kylinos.cn> | 2026-10-14 21:13:22 +0800 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2026-10-14 08:15:59 -1000 |
| commit | 0aeb67fee3cae416fa200d458a3010516ed426e9 (patch) | |
| tree | b89eb63a799ecb4773dfd25226d5c11ba19bae43 /tools/perf/scripts/python/stackcollapse.py | |
| parent | 883c9e8104cfb522a227eeddd95f8077cb77d286 (diff) | |
selftests/sched_ext: Fail loudly when EXIT_KIND is missing from BTF
EXIT_KIND() resolved scx_exit_kind values through
__COMPAT_ENUM_OR_ZERO(), which maps a missing enumerator to 0 (==
SCX_EXIT_NONE). struct scx_exit_info carries the enum itself, so the
BTF of any loaded scheduler always has the type, and every enumerator
the tests resolve today exists on all sched_ext kernels: the fallback
got the value right, and the single comparison that could pass
vacuously was the kick.c error poll.
Still, a silently-zeroed lookup is a trap. EXIT_KIND() is now an
alias of SCX_KIND_VAL(), which fails the test loudly when the
enumerator is missing. Convert the remaining
`kind != EXIT_KIND(SCX_EXIT_NONE)` checks (allowed_cpus,
cgroup_nr_cpus, cyclic_kick_wait and enq_blocked) to UEI_EXITED() so
they keep their semantics without a BTF lookup, and hoist kick.c
invalid_one()'s error_kind resolution above the gated-worker spawn so
a failing lookup cannot bypass its cleanup path.
Signed-off-by: Tao Cui <cuitao@kylinos.cn>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
