selftests/bpf: Switch to new btf__type_cnt/btf__raw_data APIs
authorHengqi Chen <hengqi.chen@gmail.com>
Fri, 22 Oct 2021 13:06:23 +0000 (21:06 +0800)
committerAndrii Nakryiko <andrii@kernel.org>
Fri, 22 Oct 2021 23:09:14 +0000 (16:09 -0700)
commit487ef148cf17730442444c07a4c56f16578ec73e
treeb2c6ec554b4b21bb648bf273b9acbd215fc9f813
parent58fc155b0e4bbd69584b7a241ab01d55ee7cfde6
selftests/bpf: Switch to new btf__type_cnt/btf__raw_data APIs

Replace the calls to btf__get_nr_types/btf__get_raw_data in
selftests with new APIs btf__type_cnt/btf__raw_data. The old
APIs will be deprecated in libbpf v0.7+.

Signed-off-by: Hengqi Chen <hengqi.chen@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20211022130623.1548429-6-hengqi.chen@gmail.com
tools/testing/selftests/bpf/btf_helpers.c
tools/testing/selftests/bpf/prog_tests/btf.c
tools/testing/selftests/bpf/prog_tests/btf_dump.c
tools/testing/selftests/bpf/prog_tests/btf_endian.c
tools/testing/selftests/bpf/prog_tests/btf_split.c
tools/testing/selftests/bpf/prog_tests/core_autosize.c
tools/testing/selftests/bpf/prog_tests/core_reloc.c
tools/testing/selftests/bpf/prog_tests/resolve_btfids.c