]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/bpf: Add test for btf__add_btf() with split BTF sources
authorJosef Bacik <josef@toxicpanda.com>
Wed, 4 Mar 2026 20:56:52 +0000 (15:56 -0500)
committerAndrii Nakryiko <andrii@kernel.org>
Thu, 5 Mar 2026 23:03:04 +0000 (15:03 -0800)
commitfefeeec6123587c6b08884865042988d40405bd2
tree34c6353b8d98ea735f4bd2158c8a9ad335d3ef2d
parentd8d5c0151148b0194e8bbba66eb56d4d9cab94cd
selftests/bpf: Add test for btf__add_btf() with split BTF sources

Add a test that verifies btf__add_btf() correctly handles merging
multiple split BTF objects that share the same base BTF. The test
creates two sibling split BTFs on a common base, merges them into
a combined split BTF, and validates that base type references are
preserved while split type references are properly remapped.

Assisted-by: Claude:claude-opus-4-6
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Reviewed-by: Alan Maguire <alan.maguire@oracle.com>
Link: https://lore.kernel.org/bpf/64a8c947bff1ae89efa9ba8c099466477762490f.1772657690.git.josef@toxicpanda.com
tools/testing/selftests/bpf/prog_tests/btf_write.c