Skip to content

Commit a840974

Browse files
Thomas Richteracmel
authored andcommitted
perf test: Test 73 Sig_trap fails on s390
In Linux next commit 5504f67 ("perf test sigtrap: Add basic stress test for sigtrap handling") introduced the new test which uses breakpoint events. These events are not supported on s390 and PowerPC and always fail: # perf test -F 73 73: Sigtrap : FAILED! # Fix it the same way as in the breakpoint tests in file tests/bp_account.c where these type of tests are skipped on s390 and PowerPC platforms. With this patch skip this test on both platforms. Output after: # perf test -F 73 73: Sigtrap # Fixes: 5504f67 ("perf test sigtrap: Add basic stress test for sigtrap handling") Signed-off-by: Thomas Richter <tmricht@linux.ibm.com> Acked-by: Marco Elver <elver@google.com> Cc: Heiko Carstens <hca@linux.ibm.com> Cc: Sumanth Korikkar <sumanthk@linux.ibm.com> Cc: Sven Schnelle <svens@linux.ibm.com> Cc: Vasily Gorbik <gor@linux.ibm.com> Link: https://lore.kernel.org/r/20211216151454.752066-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 9c5c605 commit a840974

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

‎tools/perf/tests/sigtrap.c‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,19 @@
2222
#include "tests.h"
2323
#include "../perf-sys.h"
2424

25+
/*
26+
* PowerPC and S390 do not support creation of instruction breakpoints using the
27+
* perf_event interface.
28+
*
29+
* Just disable the test for these architectures until these issues are
30+
* resolved.
31+
*/
32+
#if defined(__powerpc__) || defined(__s390x__)
33+
#define BP_ACCOUNT_IS_SUPPORTED 0
34+
#else
35+
#define BP_ACCOUNT_IS_SUPPORTED 1
36+
#endif
37+
2538
#define NUM_THREADS 5
2639

2740
static struct {
@@ -122,6 +135,11 @@ static int test__sigtrap(struct test_suite *test __maybe_unused, int subtest __m
122135
char sbuf[STRERR_BUFSIZE];
123136
int i, fd, ret = TEST_FAIL;
124137

138+
if (!BP_ACCOUNT_IS_SUPPORTED) {
139+
pr_debug("Test not supported on this architecture");
140+
return TEST_SKIP;
141+
}
142+
125143
pthread_barrier_init(&barrier, NULL, NUM_THREADS + 1);
126144

127145
action.sa_flags = SA_SIGINFO | SA_NODEFER;

0 commit comments

Comments
 (0)