summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/progs/snprintf_btf_void.c
AgeCommit message (Collapse)Author
6 daysselftests/bpf: Add test for showing a void BTF typeJiayuan Chen
Extend the snprintf_btf test with type_ids from the vmlinux BTF that used to NULL-deref in the BTF show path: a "const void", checked to render the "<unsupported kind:0>" placeholder, and a BTF_KIND_VAR, checked to resolve and render without error. The program renders from its own buffer and the test picks a VAR whose resolved type fits it, so the render stays in bounds. Signed-off-by: Jiayuan Chen <jiayuan.chen@linux.dev> Link: https://lore.kernel.org/r/20260901104924.346187-6-jiayuan.chen@linux.dev Signed-off-by: Alexei Starovoitov <ast@kernel.org>