summaryrefslogtreecommitdiffstats
path: root/tools/perf/tests/wp.c
diff options
context:
space:
mode:
authorThomas Richter <tmricht@linux.ibm.com>2018-09-28 12:53:35 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2018-10-08 14:23:44 -0300
commit0e24147d69c9357b1ccb54a9bc028eb9a9f9ed1a (patch)
tree5e9214189be80c4dc996cce84c14752b729c2cfb /tools/perf/tests/wp.c
parent291ed51deee49ff35d0824fb7050538b449964d6 (diff)
perf test: S390 does not support watchpoints in test 22
S390 does not support the perf_event_open system call for attribute type PERF_TYPE_BREAKPOINT. This results in test failure for test 22: [root@s8360046 perf]# ./perf test 22 22: Watchpoint : 22.1: Read Only Watchpoint : FAILED! 22.2: Write Only Watchpoint : FAILED! 22.3: Read / Write Watchpoint : FAILED! 22.4: Modify Watchpoint : FAILED! [root@s8360046 perf]# Add s390 support to avoid these tests being executed on s390 platform: [root@s8360046 perf]# ./perf test 22 [root@s8360046 perf]# ./perf test -v 22 22: Watchpoint : Disabled [root@s8360046 perf]# Signed-off-by: Thomas Richter <tmricht@linux.ibm.com> Reviewed-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Link: http://lkml.kernel.org/r/20180928105335.67179-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests/wp.c')
-rw-r--r--tools/perf/tests/wp.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/perf/tests/wp.c b/tools/perf/tests/wp.c
index 017a99317f94..f89e6806557b 100644
--- a/tools/perf/tests/wp.c
+++ b/tools/perf/tests/wp.c
@@ -227,3 +227,15 @@ int test__wp(struct test *test __maybe_unused, int i)
return !wp_testcase_table[i].target_func() ? TEST_OK : TEST_FAIL;
}
+
+/* The s390 so far does not have support for
+ * instruction breakpoint using the perf_event_open() system call.
+ */
+bool test__wp_is_supported(void)
+{
+#if defined(__s390x__)
+ return false;
+#else
+ return true;
+#endif
+}