History log of /linux-master/tools/testing/selftests/bpf/progs/bpf_iter_bpf_hash_map.c
Revision Date Author Comments
# c5c0981f 10-Aug-2022 Hou Tao <houtao1@huawei.com>

selftests/bpf: Ensure sleepable program is rejected by hash map iter

Add a test to ensure sleepable program is rejected by hash map iterator.

Signed-off-by: Hou Tao <houtao1@huawei.com>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/r/20220810080538.1845898-10-houtao@huaweicloud.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>


# d6a6a555 26-May-2021 Florent Revest <revest@chromium.org>

libbpf: Move BPF_SEQ_PRINTF and BPF_SNPRINTF to bpf_helpers.h

These macros are convenient wrappers around the bpf_seq_printf and
bpf_snprintf helpers. They are currently provided by bpf_tracing.h which
targets low level tracing primitives. bpf_helpers.h is a better fit.

The __bpf_narg and __bpf_apply are needed in both files and provided
twice. __bpf_empty isn't used anywhere and is removed from bpf_tracing.h

Reported-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Florent Revest <revest@chromium.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210526164643.2881368-1-revest@chromium.org


# 4daab713 02-Sep-2020 Yonghong Song <yhs@fb.com>

selftests/bpf: Add bpf_{update, delete}_map_elem in hashmap iter program

Added bpf_{updata,delete}_map_elem to the very map element the
iter program is visiting. Due to rcu protection, the visited map
elements, although stale, should still contain correct values.
$ ./test_progs -n 4/18
#4/18 bpf_hash_map:OK
#4 bpf_iter:OK
Summary: 1/1 PASSED, 0 SKIPPED, 0 FAILED

Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200902235341.2001534-1-yhs@fb.com


# 2a7c2fff 23-Jul-2020 Yonghong Song <yhs@fb.com>

selftests/bpf: Add test for bpf hash map iterators

Two subtests are added.
$ ./test_progs -n 4
...
#4/18 bpf_hash_map:OK
#4/19 bpf_percpu_hash_map:OK
...

Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200723184120.590916-1-yhs@fb.com