selftests/bpf: Use bpf_{btf,link,map,prog}_get_info_by_fd()
authorIlya Leoshkevich <iii@linux.ibm.com>
Tue, 14 Feb 2023 23:12:18 +0000 (00:12 +0100)
committerAndrii Nakryiko <andrii@kernel.org>
Thu, 16 Feb 2023 23:32:46 +0000 (15:32 -0800)
commitc5a237a4db21ca7a28518c994def39d7bd62a0d1
treeee9417fd32124f8804f8f11ee7f1ac988891dfbc
parentc0ca277bb8bc43152d2b2fa60b47a1e1d609da45
selftests/bpf: Use bpf_{btf,link,map,prog}_get_info_by_fd()

Use the new type-safe wrappers around bpf_obj_get_info_by_fd().
Fix a prog/map mixup in prog_holds_map().

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20230214231221.249277-6-iii@linux.ibm.com
34 files changed:
tools/testing/selftests/bpf/map_tests/map_in_map_batch_ops.c
tools/testing/selftests/bpf/prog_tests/bpf_iter.c
tools/testing/selftests/bpf/prog_tests/bpf_obj_id.c
tools/testing/selftests/bpf/prog_tests/btf.c
tools/testing/selftests/bpf/prog_tests/btf_map_in_map.c
tools/testing/selftests/bpf/prog_tests/check_mtu.c
tools/testing/selftests/bpf/prog_tests/enable_stats.c
tools/testing/selftests/bpf/prog_tests/fexit_bpf2bpf.c
tools/testing/selftests/bpf/prog_tests/flow_dissector_reattach.c
tools/testing/selftests/bpf/prog_tests/libbpf_get_fd_by_id_opts.c
tools/testing/selftests/bpf/prog_tests/lsm_cgroup.c
tools/testing/selftests/bpf/prog_tests/metadata.c
tools/testing/selftests/bpf/prog_tests/mmap.c
tools/testing/selftests/bpf/prog_tests/perf_link.c
tools/testing/selftests/bpf/prog_tests/pinning.c
tools/testing/selftests/bpf/prog_tests/prog_run_opts.c
tools/testing/selftests/bpf/prog_tests/recursion.c
tools/testing/selftests/bpf/prog_tests/sockmap_basic.c
tools/testing/selftests/bpf/prog_tests/task_local_storage.c
tools/testing/selftests/bpf/prog_tests/tc_bpf.c
tools/testing/selftests/bpf/prog_tests/tp_attach_query.c
tools/testing/selftests/bpf/prog_tests/unpriv_bpf_disabled.c
tools/testing/selftests/bpf/prog_tests/verif_stats.c
tools/testing/selftests/bpf/prog_tests/xdp_attach.c
tools/testing/selftests/bpf/prog_tests/xdp_cpumap_attach.c
tools/testing/selftests/bpf/prog_tests/xdp_devmap_attach.c
tools/testing/selftests/bpf/prog_tests/xdp_info.c
tools/testing/selftests/bpf/prog_tests/xdp_link.c
tools/testing/selftests/bpf/test_maps.c
tools/testing/selftests/bpf/test_skb_cgroup_id_user.c
tools/testing/selftests/bpf/test_tcp_check_syncookie_user.c
tools/testing/selftests/bpf/test_verifier.c
tools/testing/selftests/bpf/testing_helpers.c
tools/testing/selftests/bpf/xdp_synproxy.c