]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitb8add690ba1923834826dcd5d681de4ea5cbcc10
tree0aa974eb45a14bdf059b733702ac35caee42134d
parent10182947460095b37d4b1231ad089379a9f6be06
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