selftests/bpf: use btf__parse_elf to check presence of BTF/BTF.ext
authorAndrii Nakryiko <andriin@fb.com>
Fri, 24 May 2019 18:58:59 +0000 (11:58 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 24 May 2019 21:05:57 +0000 (14:05 -0700)
commit9db324314d29442c8bb8212dd40a3bb26f86c1c9
treea86b5801940c7c73fc38e97abf7fdcf71eff6708
parent58650cc47382af7d87282f53a5b508ac4bf734af
selftests/bpf: use btf__parse_elf to check presence of BTF/BTF.ext

Switch test_btf.c to rely on btf__parse_elf to check presence of BTF and
BTF.ext data, instead of implementing its own ELF parsing.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/test_btf.c