Lines Matching full:suite

131 size_t kunit_suite_num_test_cases(struct kunit_suite *suite)  in kunit_suite_num_test_cases()  argument
136 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
153 * We do not log the test suite header as doing so would in kunit_print_suite_start()
154 * mean debugfs display would consist of the test suite in kunit_print_suite_start()
156 * Hence directly printk the suite status, and we will in kunit_print_suite_start()
157 * separately seq_printf() the suite header for the debugfs in kunit_print_suite_start()
162 suite->name); in kunit_print_suite_start()
163 kunit_print_attr((void *)suite, false, KUNIT_LEVEL_CASE); in kunit_print_suite_start()
165 kunit_suite_num_test_cases(suite)); in kunit_print_suite_start()
179 * When test is NULL assume that results are from the suite in kunit_print_ok_not_ok()
180 * and today suite results are expected at level 0 only. in kunit_print_ok_not_ok()
182 WARN(!test && test_level, "suite test level can't be %u!\n", test_level); in kunit_print_ok_not_ok()
185 * We do not log the test suite results as doing so would in kunit_print_ok_not_ok()
187 * number. Hence directly printk the suite result, and we will in kunit_print_ok_not_ok()
188 * separately seq_printf() the suite results for the debugfs in kunit_print_ok_not_ok()
205 enum kunit_status kunit_suite_has_succeeded(struct kunit_suite *suite) in kunit_suite_has_succeeded() argument
210 if (suite->suite_init_err) in kunit_suite_has_succeeded()
213 kunit_suite_for_each_test_case(suite, test_case) { in kunit_suite_has_succeeded()
226 static void kunit_print_suite_end(struct kunit_suite *suite) in kunit_print_suite_end() argument
229 kunit_suite_has_succeeded(suite), in kunit_print_suite_end()
231 suite->name, in kunit_print_suite_end()
232 suite->status_comment); in kunit_print_suite_end()
235 unsigned int kunit_test_case_num(struct kunit_suite *suite, in kunit_test_case_num() argument
241 kunit_suite_for_each_test_case(suite, tc) { in kunit_test_case_num()
380 struct kunit_suite *suite, in kunit_run_case_internal() argument
385 if (suite->init) { in kunit_run_case_internal()
388 ret = suite->init(test); in kunit_run_case_internal()
415 struct kunit_suite *suite) in kunit_run_case_cleanup() argument
417 if (suite->exit) in kunit_run_case_cleanup()
418 suite->exit(test); in kunit_run_case_cleanup()
425 struct kunit_suite *suite; member
433 struct kunit_suite *suite = ctx->suite; in kunit_try_run_case() local
443 kunit_run_case_internal(test, suite, test_case); in kunit_try_run_case()
450 struct kunit_suite *suite = ctx->suite; in kunit_try_run_case_cleanup() local
454 kunit_run_case_cleanup(test, suite); in kunit_try_run_case_cleanup()
518 static void kunit_run_case_catch_errors(struct kunit_suite *suite, in kunit_run_case_catch_errors() argument
532 context.suite = suite; in kunit_run_case_catch_errors()
550 static void kunit_print_suite_stats(struct kunit_suite *suite, in kunit_print_suite_stats() argument
555 kunit_log(KERN_INFO, suite, in kunit_print_suite_stats()
557 suite->name, in kunit_print_suite_stats()
565 kunit_log(KERN_INFO, suite, in kunit_print_suite_stats()
601 int kunit_run_tests(struct kunit_suite *suite) in kunit_run_tests() argument
611 if (suite->suite_init) { in kunit_run_tests()
612 suite->suite_init_err = suite->suite_init(suite); in kunit_run_tests()
613 if (suite->suite_init_err) { in kunit_run_tests()
614 kunit_err(suite, KUNIT_SUBTEST_INDENT in kunit_run_tests()
615 "# failed to initialize (%d)", suite->suite_init_err); in kunit_run_tests()
620 kunit_print_suite_start(suite); in kunit_run_tests()
622 kunit_suite_for_each_test_case(suite, test_case) { in kunit_run_tests()
634 kunit_run_case_catch_errors(suite, test_case, &test); in kunit_run_tests()
647 kunit_run_case_catch_errors(suite, test_case, &test); in kunit_run_tests()
677 kunit_test_case_num(suite, test_case), in kunit_run_tests()
685 if (suite->suite_exit) in kunit_run_tests()
686 suite->suite_exit(suite); in kunit_run_tests()
688 kunit_print_suite_stats(suite, suite_stats, total_stats); in kunit_run_tests()
690 kunit_print_suite_end(suite); in kunit_run_tests()
696 static void kunit_init_suite(struct kunit_suite *suite) in kunit_init_suite() argument
698 kunit_debugfs_create_suite(suite); in kunit_init_suite()
699 suite->status_comment[0] = '\0'; in kunit_init_suite()
700 suite->suite_init_err = 0; in kunit_init_suite()
702 if (suite->log) in kunit_init_suite()
703 string_stream_clear(suite->log); in kunit_init_suite()
743 static void kunit_exit_suite(struct kunit_suite *suite) in kunit_exit_suite() argument
745 kunit_debugfs_destroy_suite(suite); in kunit_exit_suite()
810 * if the module load sequence has failed and the suite set has not in kunit_module_exit()