diff options
| author | Feng Zhou <[email protected]> | 2022-05-18 02:50:53 +0000 |
|---|---|---|
| committer | Andrii Nakryiko <[email protected]> | 2022-05-20 22:07:41 +0000 |
| commit | 7aa424e02a04bba5ecc84afe9b58b16e9e0b34f8 (patch) | |
| tree | ed4c41be3b16f960b58ec727a3a4cb69a07ca463 /scripts/bpf_doc.py | |
| parent | Merge branch 'Start libbpf 1.0 dev cycle' (diff) | |
| download | kernel-7aa424e02a04bba5ecc84afe9b58b16e9e0b34f8.tar.gz kernel-7aa424e02a04bba5ecc84afe9b58b16e9e0b34f8.zip | |
selftests/bpf: Fix some bugs in map_lookup_percpu_elem testcase
comments from Andrii Nakryiko, details in here:
https://lore.kernel.org/lkml/[email protected]/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 <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Acked-by: Yonghong Song <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'scripts/bpf_doc.py')
0 files changed, 0 insertions, 0 deletions
