selftests/bpf: Add split BTF dedup selftests
authorAndrii Nakryiko <andrii@kernel.org>
Thu, 5 Nov 2020 04:34:00 +0000 (20:34 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 6 Nov 2020 02:37:31 +0000 (18:37 -0800)
commit232338fa2fb47726ab7c459419115a6ab6bfb3e3
tree173f2f48657d39430cfc89d1a7df220430d67114
parent6b6e6b1d09aa20c351a1fce0ea6402da436624a4
selftests/bpf: Add split BTF dedup selftests

Add selftests validating BTF deduplication for split BTF case. Add a helper
macro that allows to validate entire BTF with raw BTF dump, not just
type-by-type. This saves tons of code and complexity.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/20201105043402.2530976-11-andrii@kernel.org
tools/testing/selftests/bpf/btf_helpers.c
tools/testing/selftests/bpf/btf_helpers.h
tools/testing/selftests/bpf/prog_tests/btf_dedup_split.c [new file with mode: 0644]