diff options
author | Feng Zhou <zhoufeng.zf@bytedance.com> | 2022-05-18 10:50:53 +0800 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2022-05-20 15:07:41 -0700 |
commit | 7aa424e02a04bba5ecc84afe9b58b16e9e0b34f8 (patch) | |
tree | ed4c41be3b16f960b58ec727a3a4cb69a07ca463 /Documentation/core-api | |
parent | 834650b50ed283d9d34a32b425d668256bf2e487 (diff) |
selftests/bpf: Fix some bugs in map_lookup_percpu_elem testcase
comments from Andrii Nakryiko, details in here:
https://lore.kernel.org/lkml/20220511093854.411-1-zhoufeng.zf@bytedance.com/T/
use /* */ instead of //
use libbpf_num_possible_cpus() instead of sysconf(_SC_NPROCESSORS_ONLN)
use 8 bytes for value size
fix memory leak
use ASSERT_EQ instead of ASSERT_OK
add bpf_loop to fetch values on each possible CPU
Fixes: ed7c13776e20c74486b0939a3c1de984c5efb6aa ("selftests/bpf: add test case for bpf_map_lookup_percpu_elem")
Signed-off-by: Feng Zhou <zhoufeng.zf@bytedance.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20220518025053.20492-1-zhoufeng.zf@bytedance.com
Diffstat (limited to 'Documentation/core-api')
0 files changed, 0 insertions, 0 deletions