diff options
author | Andrii Nakryiko <andrii@kernel.org> | 2021-11-24 11:32:33 -0800 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2021-11-25 23:37:38 +0100 |
commit | 2fe256a429cb6c0b0064563af4158470143a363c (patch) | |
tree | 59fc62a6e425abbf850165d17b62b5e4d84b6414 /tools/testing/selftests/bpf/prog_tests/test_bpffs.c | |
parent | 99a12a32fee4f740af2f36bb8f64e11c026f3389 (diff) |
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
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/test_bpffs.c')
-rw-r--r-- | tools/testing/selftests/bpf/prog_tests/test_bpffs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/test_bpffs.c b/tools/testing/selftests/bpf/prog_tests/test_bpffs.c index d29ebfeef9c5..ada95bfb9b1b 100644 --- a/tools/testing/selftests/bpf/prog_tests/test_bpffs.c +++ b/tools/testing/selftests/bpf/prog_tests/test_bpffs.c @@ -80,7 +80,7 @@ static int fn(void) if (!ASSERT_OK(err, "creating " TDIR "/fs1/b")) goto out; - map = bpf_create_map(BPF_MAP_TYPE_ARRAY, 4, 4, 1, 0); + map = bpf_map_create(BPF_MAP_TYPE_ARRAY, NULL, 4, 4, 1, NULL); if (!ASSERT_GT(map, 0, "create_map(ARRAY)")) goto out; err = bpf_obj_pin(map, TDIR "/fs1/c"); |