Lines Matching refs:child_proc
686 ChildProcInfo child_proc; in RunChildProcess() local
687 child_proc.child_read_fd = pipefd[0]; in RunChildProcess()
688 child_proc.pid = pid; in RunChildProcess()
689 child_proc.start_time_ns = NanoTime(); in RunChildProcess()
690 child_proc.deadline_end_time_ns = child_proc.start_time_ns + GetTimeoutMs(test_name) * 1000000LL; in RunChildProcess()
691 child_proc.testcase_id = testcase_id; in RunChildProcess()
692 child_proc.test_id = test_id; in RunChildProcess()
693 child_proc.finished = false; in RunChildProcess()
694 return child_proc; in RunChildProcess()
703 for (const auto& child_proc : child_proc_list) { in HandleSignals() local
704 if (child_proc.pid != 0) { in HandleSignals()
705 … std::string test_name = testcase_list[child_proc.testcase_id].GetTestName(child_proc.test_id); in HandleSignals()
707 int64_t run_time_ms = (current_time_ns - child_proc.start_time_ns) / 1000000; in HandleSignals()
714 for (const auto& child_proc : child_proc_list) { in HandleSignals() local
715 if (child_proc.pid != 0) { in HandleSignals()
717 kill(child_proc.pid, SIGKILL); in HandleSignals()
755 for (const auto& child_proc : child_proc_list) { in ReadChildProcOutput() local
756 TestCase& testcase = testcase_list[child_proc.testcase_id]; in ReadChildProcOutput()
757 int test_id = child_proc.test_id; in ReadChildProcOutput()
760 ssize_t bytes_read = TEMP_FAILURE_RETRY(read(child_proc.child_read_fd, buf, sizeof(buf) - 1)); in ReadChildProcOutput()
827 static void CollectChildTestResult(const ChildProcInfo& child_proc, TestCase& testcase) { in CollectChildTestResult() argument
828 int test_id = child_proc.test_id; in CollectChildTestResult()
829 testcase.SetTestTime(test_id, child_proc.end_time_ns - child_proc.start_time_ns); in CollectChildTestResult()
830 if (child_proc.timed_out) { in CollectChildTestResult()
832 kill(child_proc.pid, SIGKILL); in CollectChildTestResult()
833 WaitForOneChild(child_proc.pid); in CollectChildTestResult()
835 close(child_proc.child_read_fd); in CollectChildTestResult()
837 if (child_proc.timed_out) { in CollectChildTestResult()
844 } else if (WIFSIGNALED(child_proc.exit_status)) { in CollectChildTestResult()
849 testcase.GetTestName(test_id).c_str(), strsignal(WTERMSIG(child_proc.exit_status))); in CollectChildTestResult()
853 int exitcode = WEXITSTATUS(child_proc.exit_status); in CollectChildTestResult()
903 ChildProcInfo child_proc = RunChildProcess(test_name, next_testcase_id, next_test_id, in RunTestInSeparateProc() local
905 child_proc_list.push_back(child_proc); in RunTestInSeparateProc()
918 auto& child_proc = *it; in RunTestInSeparateProc() local
919 if (child_proc.finished == true) { in RunTestInSeparateProc()
920 size_t testcase_id = child_proc.testcase_id; in RunTestInSeparateProc()
921 size_t test_id = child_proc.test_id; in RunTestInSeparateProc()
924 CollectChildTestResult(child_proc, testcase); in RunTestInSeparateProc()