summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests/verif_stats.c
diff options
context:
space:
mode:
authorIlya Leoshkevich <iii@linux.ibm.com>2023-02-15 00:12:18 +0100
committerAndrii Nakryiko <andrii@kernel.org>2023-02-16 15:32:46 -0800
commitc5a237a4db21ca7a28518c994def39d7bd62a0d1 (patch)
treeee9417fd32124f8804f8f11ee7f1ac988891dfbc /tools/testing/selftests/bpf/prog_tests/verif_stats.c
parentc0ca277bb8bc43152d2b2fa60b47a1e1d609da45 (diff)
downloadlwn-c5a237a4db21ca7a28518c994def39d7bd62a0d1.tar.gz
lwn-c5a237a4db21ca7a28518c994def39d7bd62a0d1.zip
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
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/verif_stats.c')
-rw-r--r--tools/testing/selftests/bpf/prog_tests/verif_stats.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/verif_stats.c b/tools/testing/selftests/bpf/prog_tests/verif_stats.c
index a47e7c0e1ffd..af4b95f57ac1 100644
--- a/tools/testing/selftests/bpf/prog_tests/verif_stats.c
+++ b/tools/testing/selftests/bpf/prog_tests/verif_stats.c
@@ -16,8 +16,9 @@ void test_verif_stats(void)
if (!ASSERT_OK_PTR(skel, "trace_vprintk__open_and_load"))
goto cleanup;
- err = bpf_obj_get_info_by_fd(skel->progs.sys_enter.prog_fd, &info, &len);
- if (!ASSERT_OK(err, "bpf_obj_get_info_by_fd"))
+ err = bpf_prog_get_info_by_fd(skel->progs.sys_enter.prog_fd,
+ &info, &len);
+ if (!ASSERT_OK(err, "bpf_prog_get_info_by_fd"))
goto cleanup;
if (!ASSERT_GT(info.verified_insns, 0, "verified_insns"))