Commit f1246882 authored by Andrii Nakryiko's avatar Andrii Nakryiko Committed by Alexei Starovoitov

selftests/bpf: Remove last bpf_create_map_xattr from test_verifier

bpf_create_map_xattr() call was reintroduced after merging bpf tree into
bpf-next tree. Convert the last instance into bpf_map_create() call.
Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20211212191341.2529573-1-andrii@kernel.org
parent f18a4997
...@@ -701,22 +701,18 @@ static int create_sk_storage_map(void) ...@@ -701,22 +701,18 @@ static int create_sk_storage_map(void)
static int create_map_timer(void) static int create_map_timer(void)
{ {
struct bpf_create_map_attr attr = { LIBBPF_OPTS(bpf_map_create_opts, opts,
.name = "test_map",
.map_type = BPF_MAP_TYPE_ARRAY,
.key_size = 4,
.value_size = 16,
.max_entries = 1,
.btf_key_type_id = 1, .btf_key_type_id = 1,
.btf_value_type_id = 5, .btf_value_type_id = 5,
}; );
int fd, btf_fd; int fd, btf_fd;
btf_fd = load_btf(); btf_fd = load_btf();
if (btf_fd < 0) if (btf_fd < 0)
return -1; return -1;
attr.btf_fd = btf_fd;
fd = bpf_create_map_xattr(&attr); opts.btf_fd = btf_fd;
fd = bpf_map_create(BPF_MAP_TYPE_ARRAY, "test_map", 4, 16, 1, &opts);
if (fd < 0) if (fd < 0)
printf("Failed to create map with timer\n"); printf("Failed to create map with timer\n");
return fd; return fd;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment