perf test: Skip Sigtrap test for arm+aarch64
PATCH v2 1/1 perf test: Skip Sigtrap test for arm+aarch64
Skip the Sigtrap test for arm + arm64, same as was done for s390 in commit a840974e96fd ("perf test: Test 73 Sig_trap fails on s390"). For this, reuse BP_SIGNAL_IS_SUPPORTED - meaning that the arch can use BP to generate signals - instead of BP_ACCOUNT_IS_SUPPORTED, which is appropriate.
As described by Will at [0], in the test we get stuck in a loop of handling the HW breakpoint exception and never making progress. GDB handles this by stepping over the faulting instruction, but with perf the kernel is expected to handle the step (which it doesn't for arm).
Dmitry made an attempt to get this work, also mentioned in the same thread as [0], which was appreciated. But the best thing to do is skip the test for now.
tools/perf/tests/sigtrap.c +1 -14
@@ -22,19 +22,6 @@#include "tests.h" #include "../perf-sys.h" -/* -* PowerPC and S390 do not support creation of instruction breakpoints using the -* perf_event interface. -* -* Just disable the test for these architectures until these issues are -* resolved. -*/ -#if defined(__powerpc__) || defined(__s390x__) -#define BP_ACCOUNT_IS_SUPPORTED 0 -#else -#define BP_ACCOUNT_IS_SUPPORTED 1 -#endif -#define NUM_THREADS 5 static struct {
@@ -135,7 +122,7 @@ static int test__sigtrap(struct test_suite *test __maybe_unused, int subtest __mchar sbuf[STRERR_BUFSIZE ];int i, fd, ret =TEST_FAIL ; -if (!BP_ACCOUNT_IS_SUPPORTED ) { +if (!BP_SIGNAL_IS_SUPPORTED ) {pr_debug ("Test not supported on this architecture" );return TEST_SKIP ; }
Signature · 1 line
2.26.2
Quoted 12 lines · John Garry
Skip the Sigtrap test for arm + arm64, same as was done for s390 in commit
a840974e96fd("perf test: Test 73Sig_trapfails on s390"). For this, reuseBP_SIGNAL_IS_SUPPORTED- meaning that the arch can use BP to generate signals - instead ofBP_ACCOUNT_IS_SUPPORTED, which is appropriate.As described by Will at [0], in the test we get stuck in a loop of handling the HW breakpoint exception and never making progress. GDB handles this by stepping over the faulting instruction, but with perf the kernel is expected to handle the step (which it doesn't for arm).
Quoted 8 lines
Dmitry made an attempt to get this work, also mentioned in the same thread as [0], which was appreciated. But the best thing to do is skip the test for now.
Fixes Fixes: 5504f67944484 ("perf test sigtrap: Add basic stress test for sigtrap handling")Signed-off-by John Garry <[email protected]>
Thanks !
Quoted 36 lines
tools/perf/tests/sigtrap.c +1
-15@@ -22,19 +22,6 @@#include "tests.h" #include "../perf-sys.h" -/* -* PowerPC and S390 do not support creation of instruction breakpoints using the -* perf_event interface. -* -* Just disable the test for these architectures until these issues are -* resolved. -*/ -#if defined(__powerpc__) || defined(__s390x__) -#define BP_ACCOUNT_IS_SUPPORTED 0 -#else -#define BP_ACCOUNT_IS_SUPPORTED 1 -#endif -#define NUM_THREADS 5 static struct {@@ -135,7 +122,7 @@ static int test__sigtrap(struct test_suite *test __maybe_unused, int subtest __mchar sbuf[STRERR_BUFSIZE ];int i, fd, ret =TEST_FAIL ; -if (!BP_ACCOUNT_IS_SUPPORTED ) { +if (!BP_SIGNAL_IS_SUPPORTED ) {pr_debug ("Test not supported on this architecture" );return TEST_SKIP ; } --2.26.2
Quoted 11 lines · John Garry
Skip the Sigtrap test for arm + arm64, same as was done for s390 in commit
a840974e96fd("perf test: Test 73Sig_trapfails on s390"). For this, reuseBP_SIGNAL_IS_SUPPORTED- meaning that the arch can use BP to generate signals - instead ofBP_ACCOUNT_IS_SUPPORTED, which is appropriate.As described by Will at [0], in the test we get stuck in a loop of handling the HW breakpoint exception and never making progress. GDB handles this by stepping over the faulting instruction, but with perf the kernel is expected to handle the step (which it doesn't for arm).
Quoted 8 lines
Dmitry made an attempt to get this work, also mentioned in the same thread as [0], which was appreciated. But the best thing to do is skip the test for now.
Fixes Fixes: 5504f67944484 ("perf test sigtrap: Add basic stress test for sigtrap handling")Signed-off-by John Garry <[email protected]>
I tested this patch on my Juno board:
root@Juno:# ./perf test 73 73: Sigtrap : Skip
Em Fri, Feb 18, 2022 at 06:46:11PM +0800, Leo Yan escreveu:
Quoted 21 lines · John Garry
Quoted 11 lines
Skip the Sigtrap test for arm + arm64, same as was done for s390 in commit
a840974e96fd("perf test: Test 73Sig_trapfails on s390"). For this, reuseBP_SIGNAL_IS_SUPPORTED- meaning that the arch can use BP to generate signals - instead ofBP_ACCOUNT_IS_SUPPORTED, which is appropriate.As described by Will at [0], in the test we get stuck in a loop of handling the HW breakpoint exception and never making progress. GDB handles this by stepping over the faulting instruction, but with perf the kernel is expected to handle the step (which it doesn't for arm).
Quoted 8 lines
Dmitry made an attempt to get this work, also mentioned in the same thread as [0], which was appreciated. But the best thing to do is skip the test for now.
Fixes Fixes: 5504f67944484 ("perf test sigtrap: Add basic stress test for sigtrap handling")Signed-off-by John Garry <[email protected]>
Quoted 6 lines
I tested this patch on my Juno board:
root@Juno:# ./perf test 73 73: Sigtrap : SkipTested-by Leo Yan <[email protected]>
Thanks, applied.
- Arnaldo
kajoljain
Tested-byQuoted 28 lines · Arnaldo Carvalho de Melo
Em Fri, Feb 18, 2022 at 06:46:11PM +0800, Leo Yan escreveu:
Quoted 27 lines · John Garry
Quoted 11 lines
Skip the Sigtrap test for arm + arm64, same as was done for s390 in commit
a840974e96fd("perf test: Test 73Sig_trapfails on s390"). For this, reuseBP_SIGNAL_IS_SUPPORTED- meaning that the arch can use BP to generate signals - instead ofBP_ACCOUNT_IS_SUPPORTED, which is appropriate.As described by Will at [0], in the test we get stuck in a loop of handling the HW breakpoint exception and never making progress. GDB handles this by stepping over the faulting instruction, but with perf the kernel is expected to handle the step (which it doesn't for arm).
Quoted 8 lines
Dmitry made an attempt to get this work, also mentioned in the same thread as [0], which was appreciated. But the best thing to do is skip the test for now.
Fixes Fixes: 5504f67944484 ("perf test sigtrap: Add basic stress test for sigtrap handling")Signed-off-by John Garry <[email protected]>I tested this patch on my Juno board:
root@Juno:# ./perf test 73 73: Sigtrap : SkipTested-by Leo Yan <[email protected]>
Sorry for late update.
Patch looks good to me. I tested it on powerpc.
Thanks,
Kajol Jain
Quoted 5 lines
Thanks, applied.
- Arnaldo
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel