diff options
| author | Song Liu <song@kernel.org> | 2026-09-16 11:42:58 -0700 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2026-09-21 11:00:49 +0200 |
| commit | ae04b6d0f9bf308d1e80cd8d7fb0f917ae52c2ef (patch) | |
| tree | 8c7227dfbd968e62f7cd246bc4806774d83201ae /tools/perf/scripts/python | |
| parent | 317cec905af82e9ccca93cec661e88b1d3968a43 (diff) | |
objtool/klp: Build klp test fixtures through the harness
Compiling a fixture is the one thing every test does, and it has more
invariants than it looks.
- The flags describe the kernel a fixture stands in for, and each is
written down with its reason. That substitution is the whole mechanism
by which these tests cover configurations without building a kernel --
objtool reads no .config, so a configuration reaches it only as
compiler flags and the bytes they produce -- and a flag with no stated
motive is indistinguishable from a mistake.
- -c is not one of them. Producing an object rather than a program is
the helper's contract, not something a test may reconsider, so it lives
at the compile and an override cannot drop it.
- A fixture which will not compile is a failure, not a skip. It is far
more often a mistake in the fixture than a compiler which cannot
express the construct, and the two are indistinguishable once reported
as a skip.
- A newly produced object has no checksums in it, so producing one
invalidates the record that checksumming has already been done. Left
to itself that invariant ends up in each test which rebuilds.
build_one handles a single object for the tests which need more than two or
different names; build_pair and build_module_pair are expressed in terms of
it, so none of the above can be lost by going around them.
run_checksum comes out of run_diff for the same reason: a test which wants
checksums without a diff should not have to run one.
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-6-song@kernel.org
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
