aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/test_progs.h
diff options
context:
space:
mode:
authorIlya Leoshkevich <iii@linux.ibm.com>2019-07-16 14:58:27 +0200
committerAlexei Starovoitov <ast@kernel.org>2019-07-16 18:41:00 -0700
commit1cb59a6074e23c6f6513642f752a6d8d38327354 (patch)
tree36d4796a2deccacc5a17ddb00d63d4199a36c7c8 /tools/testing/selftests/bpf/test_progs.h
parentselftests/bpf: structure test_{progs, maps, verifier} test runners uniformly (diff)
downloadlinux-dev-1cb59a6074e23c6f6513642f752a6d8d38327354.tar.xz
linux-dev-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 <iii@linux.ibm.com> Acked-by: Andrii Nakryiko <andriin@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/test_progs.h')
-rw-r--r--tools/testing/selftests/bpf/test_progs.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/test_progs.h b/tools/testing/selftests/bpf/test_progs.h
index f095e1d4c657..49e0f7d85643 100644
--- a/tools/testing/selftests/bpf/test_progs.h
+++ b/tools/testing/selftests/bpf/test_progs.h
@@ -92,3 +92,11 @@ int compare_map_keys(int map1_fd, int map2_fd);
int compare_stack_ips(int smap_fd, int amap_fd, int stack_trace_len);
int extract_build_id(char *build_id, size_t size);
void *spin_lock_thread(void *arg);
+
+#ifdef __x86_64__
+#define SYS_NANOSLEEP_KPROBE_NAME "__x64_sys_nanosleep"
+#elif defined(__s390x__)
+#define SYS_NANOSLEEP_KPROBE_NAME "__s390x_sys_nanosleep"
+#else
+#define SYS_NANOSLEEP_KPROBE_NAME "sys_nanosleep"
+#endif