Lines Matching defs:log
27 * Hook to fail the current test and print an error message to the log.
114 * kunit_log_newline() - Add newline to the end of log if one is not
116 * @log: The log to add the newline to.
118 static void kunit_log_newline(char *log)
122 log_len = strlen(log);
125 if (log_len > 0 && log[log_len - 1] != '\n')
126 strncat(log, "\n", len_left);
130 * Append formatted message to log, size of which is limited to
133 void kunit_log_append(char *log, const char *fmt, ...)
138 if (!log)
141 log_len = strlen(log);
146 /* Evaluate length of line to add to log */
151 /* Print formatted line to the log */
153 vsnprintf(log + log_len, min(len, len_left), fmt, args);
156 /* Add newline to end of log if not already present. */
157 kunit_log_newline(log);
183 * We do not log the test suite header as doing so would
215 * We do not log the test suite results as doing so would
363 void kunit_init_test(struct kunit *test, const char *name, char *log)
368 test->log = log;
369 if (test->log)
370 test->log[0] = '\0';
656 kunit_init_test(&test, test_case->name, test_case->log);