]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitb1d42286f28200362be9ccad44c045e16c7e48eb
treeb2c29d4bf5d6ff31f485da575f664bce2192a59e
parent2d6216e5fc678df2b21248448e7a270c3e5e0dea
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