aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/tests/bp_signal_overflow.c
diff options
context:
space:
mode:
authorIan Rogers <[email protected]>2021-11-04 06:42:05 +0000
committerArnaldo Carvalho de Melo <[email protected]>2021-11-13 21:11:50 +0000
commit4935e2cd1b980cad8f3c8b78302740f6543d8dc9 (patch)
tree7367671c99143998e1ecb97b4fda98bbffbe3a42 /tools/perf/tests/bp_signal_overflow.c
parentperf test: Remove non test case style support. (diff)
downloadkernel-4935e2cd1b980cad8f3c8b78302740f6543d8dc9.tar.gz
kernel-4935e2cd1b980cad8f3c8b78302740f6543d8dc9.zip
perf test: BP tests, remove is_supported use
Migrate the is_supported functionality to returning TEST_SKIP. Motivation is kunit has no is_supported function. Signed-off-by: Ian Rogers <[email protected]> Tested-by: Sohaib Mohamed <[email protected]> Acked-by: Jiri Olsa <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Brendan Higgins <[email protected]> Cc: Daniel Latypov <[email protected]> Cc: David Gow <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jin Yao <[email protected]> Cc: John Garry <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paul Clarke <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/tests/bp_signal_overflow.c')
-rw-r--r--tools/perf/tests/bp_signal_overflow.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/tools/perf/tests/bp_signal_overflow.c b/tools/perf/tests/bp_signal_overflow.c
index bc1f13851750..4e897c2cf26b 100644
--- a/tools/perf/tests/bp_signal_overflow.c
+++ b/tools/perf/tests/bp_signal_overflow.c
@@ -66,6 +66,11 @@ static int test__bp_signal_overflow(struct test_suite *test __maybe_unused, int
long long count;
int fd, i, fails = 0;
+ if (!BP_SIGNAL_IS_SUPPORTED) {
+ pr_debug("Test not supported on this architecture");
+ return TEST_SKIP;
+ }
+
/* setup SIGIO signal handler */
memset(&sa, 0, sizeof(struct sigaction));
sa.sa_sigaction = (void *) sig_handler;
@@ -134,13 +139,4 @@ static int test__bp_signal_overflow(struct test_suite *test __maybe_unused, int
return fails ? TEST_FAIL : TEST_OK;
}
-static struct test_case bp_signal_overflow_tests[] = {
- TEST_CASE("Breakpoint overflow sampling", bp_signal_overflow),
- { .name = NULL, }
-};
-
-struct test_suite suite__bp_signal_overflow = {
- .desc = "Breakpoint overflow sampling",
- .test_cases = bp_signal_overflow_tests,
- .is_supported = test__bp_signal_is_supported,
-};
+DEFINE_SUITE("Breakpoint overflow sampling", bp_signal_overflow);