diff options
| author | Ilya Leoshkevich <[email protected]> | 2023-02-14 23:12:18 +0000 |
|---|---|---|
| committer | Andrii Nakryiko <[email protected]> | 2023-02-16 23:32:46 +0000 |
| commit | c5a237a4db21ca7a28518c994def39d7bd62a0d1 (patch) | |
| tree | ee9417fd32124f8804f8f11ee7f1ac988891dfbc /tools/testing/selftests/bpf/prog_tests/sockmap_basic.c | |
| parent | samples/bpf: Use bpf_{btf,link,map,prog}_get_info_by_fd() (diff) | |
| download | kernel-c5a237a4db21ca7a28518c994def39d7bd62a0d1.tar.gz kernel-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 <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/sockmap_basic.c')
| -rw-r--r-- | tools/testing/selftests/bpf/prog_tests/sockmap_basic.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/sockmap_basic.c b/tools/testing/selftests/bpf/prog_tests/sockmap_basic.c index 0aa088900699..0ce25a967481 100644 --- a/tools/testing/selftests/bpf/prog_tests/sockmap_basic.c +++ b/tools/testing/selftests/bpf/prog_tests/sockmap_basic.c @@ -299,9 +299,9 @@ static __u32 query_prog_id(int prog_fd) __u32 info_len = sizeof(info); int err; - err = bpf_obj_get_info_by_fd(prog_fd, &info, &info_len); - if (!ASSERT_OK(err, "bpf_obj_get_info_by_fd") || - !ASSERT_EQ(info_len, sizeof(info), "bpf_obj_get_info_by_fd")) + err = bpf_prog_get_info_by_fd(prog_fd, &info, &info_len); + if (!ASSERT_OK(err, "bpf_prog_get_info_by_fd") || + !ASSERT_EQ(info_len, sizeof(info), "bpf_prog_get_info_by_fd")) return 0; return info.id; |
