perf test bpf: Use designated struct field initializers

To follow standard practice in the kernel sources, documenting the
initialization better and helping quickly finding the value for some
field in a struct with many entries.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: https://lkml.kernel.org/n/tip-syn3hz9hz7ukxlxbx5x6hv20@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 6703c977
...@@ -63,46 +63,41 @@ static struct { ...@@ -63,46 +63,41 @@ static struct {
bool pin; bool pin;
} bpf_testcase_table[] = { } bpf_testcase_table[] = {
{ {
LLVM_TESTCASE_BASE, .prog_id = LLVM_TESTCASE_BASE,
"Basic BPF filtering", .desc = "Basic BPF filtering",
"[basic_bpf_test]", .name = "[basic_bpf_test]",
"fix 'perf test LLVM' first", .msg_compile_fail = "fix 'perf test LLVM' first",
"load bpf object failed", .msg_load_fail = "load bpf object failed",
&epoll_wait_loop, .target_func = &epoll_wait_loop,
(NR_ITERS + 1) / 2, .expect_result = (NR_ITERS + 1) / 2,
false,
}, },
{ {
LLVM_TESTCASE_BASE, .prog_id = LLVM_TESTCASE_BASE,
"BPF pinning", .desc = "BPF pinning",
"[bpf_pinning]", .name = "[bpf_pinning]",
"fix kbuild first", .msg_compile_fail = "fix kbuild first",
"check your vmlinux setting?", .msg_load_fail = "check your vmlinux setting?",
&epoll_wait_loop, .target_func = &epoll_wait_loop,
(NR_ITERS + 1) / 2, .expect_result = (NR_ITERS + 1) / 2,
true, .pin = true,
}, },
#ifdef HAVE_BPF_PROLOGUE #ifdef HAVE_BPF_PROLOGUE
{ {
LLVM_TESTCASE_BPF_PROLOGUE, .prog_id = LLVM_TESTCASE_BPF_PROLOGUE,
"BPF prologue generation", .desc = "BPF prologue generation",
"[bpf_prologue_test]", .name = "[bpf_prologue_test]",
"fix kbuild first", .msg_compile_fail = "fix kbuild first",
"check your vmlinux setting?", .msg_load_fail = "check your vmlinux setting?",
&llseek_loop, .target_func = &llseek_loop,
(NR_ITERS + 1) / 4, .expect_result = (NR_ITERS + 1) / 4,
false,
}, },
#endif #endif
{ {
LLVM_TESTCASE_BPF_RELOCATION, .prog_id = LLVM_TESTCASE_BPF_RELOCATION,
"BPF relocation checker", .desc = "BPF relocation checker",
"[bpf_relocation_test]", .name = "[bpf_relocation_test]",
"fix 'perf test LLVM' first", .msg_compile_fail = "fix 'perf test LLVM' first",
"libbpf error when dealing with relocation", .msg_load_fail = "libbpf error when dealing with relocation",
NULL,
0,
false,
}, },
}; };
......
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