summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc
diff options
context:
space:
mode:
authorIhor Solodrai <ihor.solodrai@linux.dev>2026-08-28 14:52:06 -0700
committerAlexei Starovoitov <ast@kernel.org>2026-08-29 18:27:00 -0700
commit438147f7f60104a228fb506352bc8bbae53b1efd (patch)
treeb5fc49f193c7f75e6af284f2e12480942c663535 /tools/lib/python/kdoc
parent4f8a4c76f6704667111d76404bdea4fef0373358 (diff)
downloadlinux-next-438147f7f60104a228fb506352bc8bbae53b1efd.tar.gz
linux-next-438147f7f60104a228fb506352bc8bbae53b1efd.zip
selftests/bpf: Add tests for bpftool btf dump format c
"bpftool btf dump format c" generates the vmlinux.h that BPF programs are built against, and it has no test coverage at all. The only in-tree consumers are build systems. Building against the header only catches what a compiler rejects, which is insufficient. Introduce a bpftool_btf_dump selftest. Dump a small hand-built BTF and compare the output against committed expectations. The BTF is assembled with btf__add_*() rather than compiled from BPF C because the fixture needs a 4-byte "long int". That is what makes bpftool render the hole in struct holey as a pair of "long: 32;" bitfields. A BPF target is always 64-bit, so a compiled fixture could not supply it. Comparing the whole dump makes every change to a generated header show up in a patch. Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev> Link: https://lore.kernel.org/r/20260828215207.3105313-6-ihor.solodrai@linux.dev Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc')
0 files changed, 0 insertions, 0 deletions