History log of /linux-master/tools/testing/selftests/bpf/map_tests/array_map_batch_ops.c
Revision Date Author Comments
# 103d002f 21-Sep-2022 Hou Tao <houtao1@huawei.com>

selftests/bpf: Free the allocated resources after test case succeeds

Free the created fd or allocated bpf_object after test case succeeds,
else there will be resource leaks.

Spotted by using address sanitizer and checking the content of
/proc/$pid/fd directory.

Signed-off-by: Hou Tao <houtao1@huawei.com>
Link: https://lore.kernel.org/r/20220921070035.2016413-3-houtao@huaweicloud.com
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>


# 2fe256a4 24-Nov-2021 Andrii Nakryiko <andrii@kernel.org>

selftests/bpf: Migrate selftests to bpf_map_create()

Conversion is straightforward for most cases. In few cases tests are
using mutable map_flags and attribute structs, but bpf_map_create_opts
can be used in the similar fashion, so there were no problems. Just lots
of repetitive conversions.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20211124193233.3115996-5-andrii@kernel.org


# 3733bfbb 24-Apr-2021 Pedro Tammela <pctammela@gmail.com>

bpf, selftests: Update array map tests for per-cpu batched ops

Follows the same logic as the hashtable tests.

Signed-off-by: Pedro Tammela <pctammela@mojatatu.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20210424214510.806627-3-pctammela@mojatatu.com


# 23f50b5a 15-Mar-2021 Pedro Tammela <pctammela@gmail.com>

bpf: selftests: Remove unused 'nospace_err' in tests for batched ops in array maps

This seems to be a reminiscent from the hashmap tests.

Signed-off-by: Pedro Tammela <pctammela@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20210315132954.603108-1-pctammela@gmail.com


# f0fac2ce 15-Jan-2020 Brian Vazquez <brianvv@google.com>

selftests/bpf: Add batch ops testing to array bpf map

Tested bpf_map_lookup_batch() and bpf_map_update_batch()
functionality.

$ ./test_maps
...
test_array_map_batch_ops:PASS
...

Signed-off-by: Brian Vazquez <brianvv@google.com>
Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200115184308.162644-10-brianvv@google.com