diff options
| author | Ilya Leoshkevich <[email protected]> | 2019-07-16 12:58:27 +0000 |
|---|---|---|
| committer | Alexei Starovoitov <[email protected]> | 2019-07-17 01:41:00 +0000 |
| commit | 1cb59a6074e23c6f6513642f752a6d8d38327354 (patch) | |
| tree | 36d4796a2deccacc5a17ddb00d63d4199a36c7c8 /tools/testing/selftests/bpf/prog_tests/perf_buffer.c | |
| parent | selftests/bpf: structure test_{progs, maps, verifier} test runners uniformly (diff) | |
| download | kernel-1cb59a6074e23c6f6513642f752a6d8d38327354.tar.gz kernel-1cb59a6074e23c6f6513642f752a6d8d38327354.zip | |
selftests/bpf: fix perf_buffer on s390
perf_buffer test fails for exactly the same reason test_attach_probe
used to fail: different nanosleep syscall kprobe name.
Reuse the test_attach_probe fix.
Fixes: ee5cf82ce04a ("selftests/bpf: test perf buffer API")
Signed-off-by: Ilya Leoshkevich <[email protected]>
Acked-by: Andrii Nakryiko <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/perf_buffer.c')
| -rw-r--r-- | tools/testing/selftests/bpf/prog_tests/perf_buffer.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/perf_buffer.c b/tools/testing/selftests/bpf/prog_tests/perf_buffer.c index 3f1ef95865ff..3003fddc0613 100644 --- a/tools/testing/selftests/bpf/prog_tests/perf_buffer.c +++ b/tools/testing/selftests/bpf/prog_tests/perf_buffer.c @@ -5,12 +5,6 @@ #include <sys/socket.h> #include <test_progs.h> -#ifdef __x86_64__ -#define SYS_KPROBE_NAME "__x64_sys_nanosleep" -#else -#define SYS_KPROBE_NAME "sys_nanosleep" -#endif - static void on_sample(void *ctx, int cpu, void *data, __u32 size) { int cpu_data = *(int *)data, duration = 0; @@ -56,7 +50,7 @@ void test_perf_buffer(void) /* attach kprobe */ link = bpf_program__attach_kprobe(prog, false /* retprobe */, - SYS_KPROBE_NAME); + SYS_NANOSLEEP_KPROBE_NAME); if (CHECK(IS_ERR(link), "attach_kprobe", "err %ld\n", PTR_ERR(link))) goto out_close; |
