diff options
author | 2023-12-15 18:07:07 +0800 | |
---|---|---|
committer | 2023-12-15 22:54:55 +0100 | |
commit | 00cdcd2900bdb9190d1e75438b39cef74cd99232 (patch) | |
tree | 7c7977496850c4fa2e9bc22f18599886a98ee1cb /net/bpf/bpf_dummy_struct_ops.c | |
parent | selftests/bpf: Add test for abnormal cnt during multi-uprobe attachment (diff) | |
download | wireguard-linux-00cdcd2900bdb9190d1e75438b39cef74cd99232.tar.xz wireguard-linux-00cdcd2900bdb9190d1e75438b39cef74cd99232.zip |
selftests/bpf: Don't use libbpf_get_error() in kprobe_multi_test
Since libbpf v1.0, libbpf doesn't return error code embedded into the
pointer iteself, libbpf_get_error() is deprecated and it is basically
the same as using -errno directly.
So replace the invocations of libbpf_get_error() by -errno in
kprobe_multi_test. For libbpf_get_error() in test_attach_api_fails(),
saving -errno before invoking ASSERT_xx() macros just in case that
errno is overwritten by these macros. However, the invocation of
libbpf_get_error() in get_syms() should be kept intact, because
hashmap__new() still returns a pointer with embedded error code.
Signed-off-by: Hou Tao <houtao1@huawei.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20231215100708.2265609-5-houtao@huaweicloud.com
Diffstat (limited to 'net/bpf/bpf_dummy_struct_ops.c')
0 files changed, 0 insertions, 0 deletions