diff options
| author | Song Liu <song@kernel.org> | 2026-09-16 11:42:55 -0700 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2026-09-21 10:54:35 +0200 |
| commit | c009fabc865200029173eb40db62f407225043d4 (patch) | |
| tree | aa1c87c3a02ceb2e1f53142e849349b47b32f560 /tools/perf/scripts/python/bin/stackcollapse-report | |
| parent | cff27d90769da941f6897a9d9152670af7b71f95 (diff) | |
objtool/klp: Check the klp test environment once, before any test
Every test checked for itself that objtool exists, was built with klp
support, and that $CC runs. Three problems with that: it is the same work
done 40 times, a missing objtool reads as a per-test skip rather than as a
suite which cannot run, and a run in which everything skipped still exits
0.
Do it once, before any test, in klp_preflight() in lib.sh, and export the
answers where the tests can read them. If the suite cannot run the whole
run fails and says why; a test which gets as far as running can assume its
environment.
Nothing is written down, so nothing can go stale. Sourcing lib.sh runs the
checks, which means a test run by hand establishes its own answers rather
than inheriting those of some earlier run with a different CC, and a test
is never handed an empty value for where objtool is or which architecture
it is on: either the exports are set or the run has already failed.
preflight answers only whether the suite can run at all -- not what the
compiler is capable of. A test needing a particular compiler feature
probes for it and skips; that costs one compile and keeps the reason next
to the test that has to justify it.
Signed-off-by: Song Liu <song@kernel.org>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Assisted-by: Claude:claude-opus-5
Link: https://patch.msgid.link/20260916184351.2720310-3-song@kernel.org
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions
