selftests/bpf: Add bloom map success test for userspace calls
authorJoanne Koong <joannekoong@fb.com>
Fri, 29 Oct 2021 22:49:09 +0000 (15:49 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 1 Nov 2021 21:16:03 +0000 (14:16 -0700)
commit7a67087250f0003acc1b9e20eda01635e1e51f9a
tree0aa974eb45a14bdf059b733702ac35caee42134d
parent8845b4681bf44b9d2d2badf2c67cf476e42a86bd
selftests/bpf: Add bloom map success test for userspace calls

This patch has two changes:
1) Adds a new function "test_success_cases" to test
successfully creating + adding + looking up a value
in a bloom filter map from the userspace side.

2) Use bpf_create_map instead of bpf_create_map_xattr in
the "test_fail_cases" and test_inner_map to make the
code look cleaner.

Signed-off-by: Joanne Koong <joannekoong@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20211029224909.1721024-4-joannekoong@fb.com
tools/testing/selftests/bpf/prog_tests/bloom_filter_map.c