perf test: bp tests use test case
authorIan Rogers <irogers@google.com>
Thu, 4 Nov 2021 06:42:02 +0000 (23:42 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Sat, 13 Nov 2021 21:11:49 +0000 (18:11 -0300)
Migration toward kunit style test cases.

Signed-off-by: Ian Rogers <irogers@google.com>
Tested-by: Sohaib Mohamed <sohaib.amhmd@gmail.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Brendan Higgins <brendanhiggins@google.com>
Cc: Daniel Latypov <dlatypov@google.com>
Cc: David Gow <davidgow@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: John Garry <john.garry@huawei.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Clarke <pc@us.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: https://lore.kernel.org/r/20211104064208.3156807-17-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/bp_account.c
tools/perf/tests/bp_signal.c
tools/perf/tests/bp_signal_overflow.c

index 3651201..e4f7b63 100644 (file)
@@ -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,
 };
index 3c269f8..1676e3a 100644 (file)
@@ -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,
 };
index 5ac6e13..bc1f138 100644 (file)
@@ -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,
 };