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
This commit is contained in:
committed by
Daniel Borkmann
parent
99a12a32fe
commit
2fe256a429
@@ -91,9 +91,9 @@ static void test_sockmap_create_update_free(enum bpf_map_type map_type)
|
||||
if (CHECK_FAIL(s < 0))
|
||||
return;
|
||||
|
||||
map = bpf_create_map(map_type, sizeof(int), sizeof(int), 1, 0);
|
||||
map = bpf_map_create(map_type, NULL, sizeof(int), sizeof(int), 1, NULL);
|
||||
if (CHECK_FAIL(map < 0)) {
|
||||
perror("bpf_create_map");
|
||||
perror("bpf_cmap_create");
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user