selftests/bpf: Extend distilled BTF tests to cover BTF relocation
authorAlan Maguire <alan.maguire@oracle.com>
Thu, 13 Jun 2024 09:50:09 +0000 (10:50 +0100)
committerAndrii Nakryiko <andrii@kernel.org>
Mon, 17 Jun 2024 21:38:31 +0000 (14:38 -0700)
commitaffdeb50616b190c3236cc2bf116e1b931a43be2
tree65d78d11e30778924acbc175b3d463cfebe6bcc5
parent19e00c897d5031bed969dd79af28e899e038009f
selftests/bpf: Extend distilled BTF tests to cover BTF relocation

Ensure relocated BTF looks as expected; in this case identical to
original split BTF, with a few duplicate anonymous types added to
split BTF by the relocation process.  Also add relocation tests
for edge cases like missing type in base BTF and multiple types
of the same name.

Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/bpf/20240613095014.357981-5-alan.maguire@oracle.com
tools/testing/selftests/bpf/prog_tests/btf_distill.c