diff options
| author | Song Liu <song@kernel.org> | 2026-09-16 11:42:59 -0700 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2026-09-21 11:01:01 +0200 |
| commit | 2ab0faeb71936be1f53a8222cd5d0a1bcada5b82 (patch) | |
| tree | f8aa5ec4ae9d0439d4b31cf8627fd983cc10456c /tools/perf/scripts/python/bin | |
| parent | ae04b6d0f9bf308d1e80cd8d7fb0f917ae52c2ef (diff) | |
objtool/klp: Grow the klp test harness vocabulary
Assertions for what klp diff produces, and for what went into it.
The output side covers the things a livepatch is made of: cloned sections
and symbols, klp symbols and their sympos, tombstones, relocations by
section and by count, the converted .klp.rela sections and their
SHF_RELA_LIVEPATCH flag, SHN_LIVEPATCH symbols, recorded checksums, and klp
diff's own diagnostics -- a rejection for the wrong reason is not a pass.
The input side matters just as much, and is easier to forget. A test which
asserts only on the output passes when the compiler never emitted the
construct under test, and reads as coverage it does not have. So there are
two forms, and the difference between them is a statement about why the
thing might be absent:
require_* the compiler cannot produce it here -> skip
assert_* the fixture is supposed to produce it -> fail
Names are quoted before they reach grep. Nearly every name here contains
dots -- .text.target, .klp.rela.vmlinux -- and an unescaped dot matches any
character, so an assertion for one section could be satisfied by a
different one whose name merely lines up.
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-7-song@kernel.org
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions
