Lines Matching refs:log_buf
49 static void stdio_hijack_init(char **log_buf, size_t *log_cnt) in stdio_hijack_init() argument
60 stdout = open_memstream(log_buf, log_cnt); in stdio_hijack_init()
76 static void stdio_hijack(char **log_buf, size_t *log_cnt) in stdio_hijack() argument
87 stdio_hijack_init(log_buf, log_cnt); in stdio_hijack()
365 static void print_test_log(char *log_buf, size_t log_cnt) in print_test_log() argument
367 log_buf[log_cnt] = '\0'; in print_test_log()
368 fprintf(env.stdout_saved, "%s", log_buf); in print_test_log()
369 if (log_buf[log_cnt - 1] != '\n') in print_test_log()
391 static void jsonw_write_log_message(json_writer_t *w, char *log_buf, size_t log_cnt) in jsonw_write_log_message() argument
397 jsonw_string_field(w, "message", log_buf); in jsonw_write_log_message()
429 print_test_log(test_state->log_buf, test_state->log_cnt); in dump_test_log()
435 jsonw_write_log_message(w, test_state->log_buf, test_state->log_cnt); in dump_test_log()
451 print_test_log(subtest_state->log_buf, in dump_test_log()
464 jsonw_write_log_message(w, subtest_state->log_buf, subtest_state->log_cnt); in dump_test_log()
597 stdio_hijack_init(&subtest_state->log_buf, &subtest_state->log_cnt); in test__start_subtest()
1330 strlen(msg->test_log.log_buf), in str_msg()
1384 stdio_hijack(&state->log_buf, &state->log_cnt); in run_one_test()
1435 static int dispatch_thread_read_log(int sock_fd, char **log_buf, size_t *log_cnt) in dispatch_thread_read_log() argument
1440 log_fp = open_memstream(log_buf, log_cnt); in dispatch_thread_read_log()
1452 fprintf(log_fp, "%s", msg.test_log.log_buf); in dispatch_thread_read_log()
1487 &subtest_state->log_buf, in dispatch_thread_send_subtests()
1559 &state->log_buf, in dispatch_thread()
1748 static void worker_main_send_log(int sock, char *log_buf, size_t log_cnt) in worker_main_send_log() argument
1753 src = log_buf; in worker_main_send_log()
1762 dest = msg_log.test_log.log_buf; in worker_main_send_log()
1777 if (state->log_buf) { in free_subtest_state()
1778 free(state->log_buf); in free_subtest_state()
1779 state->log_buf = NULL; in free_subtest_state()
1820 worker_main_send_log(sock, subtest_state->log_buf, subtest_state->log_cnt); in worker_main_send_subtests()
1885 worker_main_send_log(sock, state->log_buf, state->log_cnt); in worker_main()
1887 if (state->log_buf) { in worker_main()
1888 free(state->log_buf); in worker_main()
1889 state->log_buf = NULL; in worker_main()
1925 free(test_state->log_buf); in free_test_states()
1927 test_state->log_buf = NULL; in free_test_states()