selftests/bpf: Test new btf__add_btf() API
authorAndrii Nakryiko <andrii@kernel.org>
Wed, 6 Oct 2021 05:11:07 +0000 (22:11 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 6 Oct 2021 13:36:30 +0000 (15:36 +0200)
commit9d05787223913171fce20a737ba54e3b6e7da13c
treeb2c29d4bf5d6ff31f485da575f664bce2192a59e
parentc65eb8082d4cb02ef87bdecedce8969d5ccbea54
selftests/bpf: Test new btf__add_btf() API

Add a test that validates that btf__add_btf() API is correctly copying
all the types from the source BTF into destination BTF object and
adjusts type IDs and string offsets properly.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20211006051107.17921-4-andrii@kernel.org
tools/testing/selftests/bpf/prog_tests/btf_write.c