diff options
author | Andrii Nakryiko <andrii@kernel.org> | 2021-11-03 23:08:44 +0100 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2021-11-07 17:34:23 +0100 |
commit | cbdb1461dcf45765a036e9f6975ffe19e69bdc33 (patch) | |
tree | 826122e1a461694a54fbf27a68dc7aec64e94aa2 /tools/testing/selftests/bpf/prog_tests/map_lock.c | |
parent | selftests/bpf: Merge test_stub.c into testing_helpers.c (diff) | |
download | linux-cbdb1461dcf45765a036e9f6975ffe19e69bdc33.tar.xz linux-cbdb1461dcf45765a036e9f6975ffe19e69bdc33.zip |
selftests/bpf: Use explicit bpf_prog_test_load() calls everywhere
-Dbpf_prog_load_deprecated=bpf_prog_test_load trick is both ugly and
breaks when deprecation goes into effect due to macro magic. Convert all
the uses to explicit bpf_prog_test_load() calls which avoid deprecation
errors and makes everything less magical.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Dave Marchevsky <davemarchevsky@fb.com>
Link: https://lore.kernel.org/bpf/20211103220845.2676888-12-andrii@kernel.org
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/map_lock.c')
-rw-r--r-- | tools/testing/selftests/bpf/prog_tests/map_lock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/map_lock.c b/tools/testing/selftests/bpf/prog_tests/map_lock.c index ce17b1ed8709..23d19e9cf26a 100644 --- a/tools/testing/selftests/bpf/prog_tests/map_lock.c +++ b/tools/testing/selftests/bpf/prog_tests/map_lock.c @@ -53,9 +53,9 @@ void test_map_lock(void) int err = 0, key = 0, i; void *ret; - err = bpf_prog_load(file, BPF_PROG_TYPE_CGROUP_SKB, &obj, &prog_fd); + err = bpf_prog_test_load(file, BPF_PROG_TYPE_CGROUP_SKB, &obj, &prog_fd); if (CHECK_FAIL(err)) { - printf("test_map_lock:bpf_prog_load errno %d\n", errno); + printf("test_map_lock:bpf_prog_test_load errno %d\n", errno); goto close_prog; } map_fd[0] = bpf_find_map(__func__, obj, "hash_map"); |