Lines Matching +full:com +full:- +full:seq
1 // SPDX-License-Identifier: GPL-2.0
4 * Author: Alan Maguire <alan.maguire@oracle.com>
12 #include "string-stream.h"
40 static void debugfs_print_result(struct seq_file *seq, in debugfs_print_result() argument
44 if (!test_case || !test_case->log) in debugfs_print_result()
47 seq_printf(seq, "%s", test_case->log); in debugfs_print_result()
53 static int debugfs_print_results(struct seq_file *seq, void *v) in debugfs_print_results() argument
55 struct kunit_suite *suite = (struct kunit_suite *)seq->private; in debugfs_print_results()
65 seq_puts(seq, "KTAP version 1\n"); in debugfs_print_results()
66 seq_puts(seq, "1..1\n"); in debugfs_print_results()
69 seq_puts(seq, KUNIT_SUBTEST_INDENT "KTAP version 1\n"); in debugfs_print_results()
70 seq_printf(seq, KUNIT_SUBTEST_INDENT "# Subtest: %s\n", suite->name); in debugfs_print_results()
71 seq_printf(seq, KUNIT_SUBTEST_INDENT "1..%zd\n", kunit_suite_num_test_cases(suite)); in debugfs_print_results()
74 debugfs_print_result(seq, suite, test_case); in debugfs_print_results()
76 if (suite->log) in debugfs_print_results()
77 seq_printf(seq, "%s", suite->log); in debugfs_print_results()
79 seq_printf(seq, "%s %d %s\n", in debugfs_print_results()
80 kunit_status_to_ok_not_ok(success), 1, suite->name); in debugfs_print_results()
93 suite = (struct kunit_suite *)inode->i_private; in debugfs_results_open()
110 suite->log = kzalloc(KUNIT_LOG_SIZE, GFP_KERNEL); in kunit_debugfs_create_suite()
112 test_case->log = kzalloc(KUNIT_LOG_SIZE, GFP_KERNEL); in kunit_debugfs_create_suite()
114 suite->debugfs = debugfs_create_dir(suite->name, debugfs_rootdir); in kunit_debugfs_create_suite()
117 suite->debugfs, in kunit_debugfs_create_suite()
125 debugfs_remove_recursive(suite->debugfs); in kunit_debugfs_destroy_suite()
126 kfree(suite->log); in kunit_debugfs_destroy_suite()
128 kfree(test_case->log); in kunit_debugfs_destroy_suite()