diff options
author | Hou Tao <houtao1@huawei.com> | 2023-12-15 18:07:07 +0800 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2023-12-15 22:54:55 +0100 |
commit | 00cdcd2900bdb9190d1e75438b39cef74cd99232 (patch) | |
tree | 7c7977496850c4fa2e9bc22f18599886a98ee1cb /include | |
parent | 0d83786f5661154d015b498a3d23d4c37e30f6ef (diff) |
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 'include')
0 files changed, 0 insertions, 0 deletions