Lines Matching refs:log_buf

27 static void stdio_hijack_init(char **log_buf, size_t *log_cnt)  in stdio_hijack_init()  argument
38 stdout = open_memstream(log_buf, log_cnt); in stdio_hijack_init()
54 static void stdio_hijack(char **log_buf, size_t *log_cnt) in stdio_hijack() argument
65 stdio_hijack_init(log_buf, log_cnt); in stdio_hijack()
246 static void print_test_log(char *log_buf, size_t log_cnt) in print_test_log() argument
248 log_buf[log_cnt] = '\0'; in print_test_log()
249 fprintf(env.stdout, "%s", log_buf); in print_test_log()
250 if (log_buf[log_cnt - 1] != '\n') in print_test_log()
272 static void jsonw_write_log_message(json_writer_t *w, char *log_buf, size_t log_cnt) in jsonw_write_log_message() argument
278 jsonw_string_field(w, "message", log_buf); in jsonw_write_log_message()
310 print_test_log(test_state->log_buf, test_state->log_cnt); in dump_test_log()
316 jsonw_write_log_message(w, test_state->log_buf, test_state->log_cnt); in dump_test_log()
332 print_test_log(subtest_state->log_buf, in dump_test_log()
345 jsonw_write_log_message(w, subtest_state->log_buf, subtest_state->log_cnt); in dump_test_log()
478 stdio_hijack_init(&subtest_state->log_buf, &subtest_state->log_cnt); in test__start_subtest()
1035 strlen(msg->test_log.log_buf), in str_msg()
1080 stdio_hijack(&state->log_buf, &state->log_cnt); in run_one_test()
1124 static int dispatch_thread_read_log(int sock_fd, char **log_buf, size_t *log_cnt) in dispatch_thread_read_log() argument
1129 log_fp = open_memstream(log_buf, log_cnt); in dispatch_thread_read_log()
1141 fprintf(log_fp, "%s", msg.test_log.log_buf); in dispatch_thread_read_log()
1176 &subtest_state->log_buf, in dispatch_thread_send_subtests()
1248 &state->log_buf, in dispatch_thread()
1437 static void worker_main_send_log(int sock, char *log_buf, size_t log_cnt) in worker_main_send_log() argument
1442 src = log_buf; in worker_main_send_log()
1451 dest = msg_log.test_log.log_buf; in worker_main_send_log()
1466 if (state->log_buf) { in free_subtest_state()
1467 free(state->log_buf); in free_subtest_state()
1468 state->log_buf = NULL; in free_subtest_state()
1509 worker_main_send_log(sock, subtest_state->log_buf, subtest_state->log_cnt); in worker_main_send_subtests()
1573 worker_main_send_log(sock, state->log_buf, state->log_cnt); in worker_main()
1575 if (state->log_buf) { in worker_main()
1576 free(state->log_buf); in worker_main()
1577 state->log_buf = NULL; in worker_main()
1613 free(test_state->log_buf); in free_test_states()
1615 test_state->log_buf = NULL; in free_test_states()