From e329f03a1f1b547c858a308b2cfcd5d6e8dd8740 Mon Sep 17 00:00:00 2001 From: Ian Rogers Date: Wed, 3 Nov 2021 23:42:02 -0700 Subject: [PATCH] perf test: bp tests use test case Migration toward kunit style test cases. Signed-off-by: Ian Rogers Tested-by: Sohaib Mohamed Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Brendan Higgins Cc: Daniel Latypov Cc: David Gow Cc: Ingo Molnar Cc: Jin Yao Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Cc: Stephane Eranian Link: https://lore.kernel.org/r/20211104064208.3156807-17-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/tests/bp_account.c | 7 ++++++- tools/perf/tests/bp_signal.c | 7 ++++++- tools/perf/tests/bp_signal_overflow.c | 7 ++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/tools/perf/tests/bp_account.c b/tools/perf/tests/bp_account.c index 3651201..e4f7b63 100644 --- a/tools/perf/tests/bp_account.c +++ b/tools/perf/tests/bp_account.c @@ -205,8 +205,13 @@ static bool test__bp_account_is_supported(void) #endif } +static struct test_case bp_accounting_tests[] = { + TEST_CASE("Breakpoint accounting", bp_accounting), + { .name = NULL, } +}; + struct test_suite suite__bp_accounting = { .desc = "Breakpoint accounting", - .func = test__bp_accounting, + .test_cases = bp_accounting_tests, .is_supported = test__bp_account_is_supported, }; diff --git a/tools/perf/tests/bp_signal.c b/tools/perf/tests/bp_signal.c index 3c269f8..1676e3a 100644 --- a/tools/perf/tests/bp_signal.c +++ b/tools/perf/tests/bp_signal.c @@ -312,8 +312,13 @@ bool test__bp_signal_is_supported(void) #endif } +static struct test_case bp_signal_tests[] = { + TEST_CASE("Breakpoint overflow signal handler", bp_signal), + { .name = NULL, } +}; + struct test_suite suite__bp_signal = { .desc = "Breakpoint overflow signal handler", - .func = test__bp_signal, + .test_cases = bp_signal_tests, .is_supported = test__bp_signal_is_supported, }; diff --git a/tools/perf/tests/bp_signal_overflow.c b/tools/perf/tests/bp_signal_overflow.c index 5ac6e13..bc1f138 100644 --- a/tools/perf/tests/bp_signal_overflow.c +++ b/tools/perf/tests/bp_signal_overflow.c @@ -134,8 +134,13 @@ 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", - .func = test__bp_signal_overflow, + .test_cases = bp_signal_overflow_tests, .is_supported = test__bp_signal_is_supported, }; -- 2.7.4