Skip to content

Commit eb8f998

Browse files
Thomas Richteracmel
Thomas Richter
authored andcommitted
perf test: Remove now useless failing sub test "BPF relocation checker"
For some time now the 'perf test 42: BPF filter' returns an error on bpf relocation subtest, at least on x86 and s390. This is caused by d859900 ("bpf, libbpf: support global data/bss/rodata sections") which introduces support for global variables in eBPF programs. Perf test 42.4 checks that the eBPF relocation fails when the eBPF program contains a global variable. It returns OK when the eBPF program could not be loaded and FAILED otherwise. With above commit the test logic for the eBPF relocation is obsolete. The loading of the eBPF now succeeds and the test always shows FAILED. This patch removes the sub test completely. Also a lot of eBPF program testing is done in the eBPF test suite, it also contains tests for global variables. Output before: 42: BPF filter : 42.1: Basic BPF filtering : Ok 42.2: BPF pinning : Ok 42.3: BPF prologue generation : Ok 42.4: BPF relocation checker : Failed # Output after: # ./perf test -F 42 42: BPF filter : 42.1: Basic BPF filtering : Ok 42.2: BPF pinning : Ok 42.3: BPF prologue generation : Ok # Signed-off-by: Thomas Richter <[email protected]> Suggested-by: Arnaldo Carvalho de Melo <[email protected]> Tested-by: Arnaldo Carvalho de Melo <[email protected]> Cc: Heiko Carstens <[email protected]> Cc: Sumanth Korikkar <[email protected]> Cc: Sven Schnelle <[email protected]> Cc: Vasily Gorbik <[email protected]> Link: http://lore.kernel.org/lkml/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 9f177fd commit eb8f998

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

tools/perf/tests/bpf.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ static struct {
8686
.msg_load_fail = "check your vmlinux setting?",
8787
.target_func = &epoll_pwait_loop,
8888
.expect_result = (NR_ITERS + 1) / 2,
89-
.pin = true,
89+
.pin = true,
9090
},
9191
#ifdef HAVE_BPF_PROLOGUE
9292
{
@@ -99,13 +99,6 @@ static struct {
9999
.expect_result = (NR_ITERS + 1) / 4,
100100
},
101101
#endif
102-
{
103-
.prog_id = LLVM_TESTCASE_BPF_RELOCATION,
104-
.desc = "BPF relocation checker",
105-
.name = "[bpf_relocation_test]",
106-
.msg_compile_fail = "fix 'perf test LLVM' first",
107-
.msg_load_fail = "libbpf error when dealing with relocation",
108-
},
109102
};
110103

111104
static int do_test(struct bpf_object *obj, int (*func)(void),

0 commit comments

Comments
 (0)