Lines Matching full:suite

138 size_t kunit_suite_num_test_cases(struct kunit_suite *suite)  in kunit_suite_num_test_cases()  argument
143 kunit_suite_for_each_test_case(suite, test_case) in kunit_suite_num_test_cases()
150 static void kunit_print_suite_start(struct kunit_suite *suite) in kunit_print_suite_start() argument
152 kunit_log(KERN_INFO, suite, KUNIT_SUBTEST_INDENT "# Subtest: %s", in kunit_print_suite_start()
153 suite->name); in kunit_print_suite_start()
154 kunit_log(KERN_INFO, suite, KUNIT_SUBTEST_INDENT "1..%zd", in kunit_print_suite_start()
155 kunit_suite_num_test_cases(suite)); in kunit_print_suite_start()
165 struct kunit_suite *suite = is_test ? NULL : test_or_suite; in kunit_print_ok_not_ok() local
170 * We do not log the test suite results as doing so would in kunit_print_ok_not_ok()
171 * mean debugfs display would consist of the test suite in kunit_print_ok_not_ok()
173 * Hence directly printk the suite status, and we will in kunit_print_ok_not_ok()
174 * separately seq_printf() the suite status for the debugfs in kunit_print_ok_not_ok()
177 if (suite) in kunit_print_ok_not_ok()
190 enum kunit_status kunit_suite_has_succeeded(struct kunit_suite *suite) in kunit_suite_has_succeeded() argument
195 if (suite->suite_init_err) in kunit_suite_has_succeeded()
198 kunit_suite_for_each_test_case(suite, test_case) { in kunit_suite_has_succeeded()
211 static void kunit_print_suite_end(struct kunit_suite *suite) in kunit_print_suite_end() argument
213 kunit_print_ok_not_ok((void *)suite, false, in kunit_print_suite_end()
214 kunit_suite_has_succeeded(suite), in kunit_print_suite_end()
216 suite->name, in kunit_print_suite_end()
217 suite->status_comment); in kunit_print_suite_end()
220 unsigned int kunit_test_case_num(struct kunit_suite *suite, in kunit_test_case_num() argument
226 kunit_suite_for_each_test_case(suite, tc) { in kunit_test_case_num()
337 struct kunit_suite *suite, in kunit_run_case_internal() argument
340 if (suite->init) { in kunit_run_case_internal()
343 ret = suite->init(test); in kunit_run_case_internal()
364 struct kunit_suite *suite) in kunit_run_case_cleanup() argument
366 if (suite->exit) in kunit_run_case_cleanup()
367 suite->exit(test); in kunit_run_case_cleanup()
374 struct kunit_suite *suite; member
382 struct kunit_suite *suite = ctx->suite; in kunit_try_run_case() local
392 kunit_run_case_internal(test, suite, test_case); in kunit_try_run_case()
394 kunit_run_case_cleanup(test, suite); in kunit_try_run_case()
401 struct kunit_suite *suite = ctx->suite; in kunit_catch_run_case() local
427 kunit_run_case_cleanup(test, suite); in kunit_catch_run_case()
434 static void kunit_run_case_catch_errors(struct kunit_suite *suite, in kunit_run_case_catch_errors() argument
449 context.suite = suite; in kunit_run_case_catch_errors()
460 static void kunit_print_suite_stats(struct kunit_suite *suite, in kunit_print_suite_stats() argument
465 kunit_log(KERN_INFO, suite, in kunit_print_suite_stats()
467 suite->name, in kunit_print_suite_stats()
475 kunit_log(KERN_INFO, suite, in kunit_print_suite_stats()
511 int kunit_run_tests(struct kunit_suite *suite) in kunit_run_tests() argument
521 if (suite->suite_init) { in kunit_run_tests()
522 suite->suite_init_err = suite->suite_init(suite); in kunit_run_tests()
523 if (suite->suite_init_err) { in kunit_run_tests()
524 kunit_err(suite, KUNIT_SUBTEST_INDENT in kunit_run_tests()
525 "# failed to initialize (%d)", suite->suite_init_err); in kunit_run_tests()
530 kunit_print_suite_start(suite); in kunit_run_tests()
532 kunit_suite_for_each_test_case(suite, test_case) { in kunit_run_tests()
539 kunit_run_case_catch_errors(suite, test_case, &test); in kunit_run_tests()
549 kunit_run_case_catch_errors(suite, test_case, &test); in kunit_run_tests()
575 kunit_test_case_num(suite, test_case), in kunit_run_tests()
583 if (suite->suite_exit) in kunit_run_tests()
584 suite->suite_exit(suite); in kunit_run_tests()
586 kunit_print_suite_stats(suite, suite_stats, total_stats); in kunit_run_tests()
588 kunit_print_suite_end(suite); in kunit_run_tests()
594 static void kunit_init_suite(struct kunit_suite *suite) in kunit_init_suite() argument
596 kunit_debugfs_create_suite(suite); in kunit_init_suite()
597 suite->status_comment[0] = '\0'; in kunit_init_suite()
598 suite->suite_init_err = 0; in kunit_init_suite()
623 static void kunit_exit_suite(struct kunit_suite *suite) in kunit_exit_suite() argument
625 kunit_debugfs_destroy_suite(suite); in kunit_exit_suite()