summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/test_maps.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/test_maps.c
parentc0ca277bb8bc43152d2b2fa60b47a1e1d609da45 (diff)
downloadlinux-c5a237a4db21ca7a28518c994def39d7bd62a0d1.tar.gz
linux-c5a237a4db21ca7a28518c994def39d7bd62a0d1.tar.bz2
linux-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/test_maps.c')
-rw-r--r--tools/testing/selftests/bpf/test_maps.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/test_maps.c b/tools/testing/selftests/bpf/test_maps.c
index b73152822aa2..7fc00e423e4d 100644
--- a/tools/testing/selftests/bpf/test_maps.c
+++ b/tools/testing/selftests/bpf/test_maps.c
@@ -1275,7 +1275,7 @@ static void test_map_in_map(void)
goto out_map_in_map;
}
- err = bpf_obj_get_info_by_fd(fd, &info, &len);
+ err = bpf_map_get_info_by_fd(fd, &info, &len);
if (err) {
printf("Failed to get map info by fd %d: %d", fd,
errno);