Lines Matching refs:child_proc
673 ChildProcInfo child_proc; in RunChildProcess() local
674 child_proc.child_read_fd = pipefd[0]; in RunChildProcess()
675 child_proc.pid = pid; in RunChildProcess()
676 child_proc.start_time_ns = NanoTime(); in RunChildProcess()
677 child_proc.deadline_end_time_ns = in RunChildProcess()
678 child_proc.start_time_ns + GetDeadlineInfo(test_name) * 1000000LL; in RunChildProcess()
679 child_proc.testcase_id = testcase_id; in RunChildProcess()
680 child_proc.test_id = test_id; in RunChildProcess()
681 child_proc.finished = false; in RunChildProcess()
682 return child_proc; in RunChildProcess()
691 for (const auto& child_proc : child_proc_list) { in HandleSignals() local
692 if (child_proc.pid != 0) { in HandleSignals()
694 testcase_list[child_proc.testcase_id].GetTestName( in HandleSignals()
695 child_proc.test_id); in HandleSignals()
698 (current_time_ns - child_proc.start_time_ns) / 1000000; in HandleSignals()
705 for (const auto& child_proc : child_proc_list) { in HandleSignals() local
706 if (child_proc.pid != 0) { in HandleSignals()
709 kill(child_proc.pid, SIGKILL); in HandleSignals()
748 for (const auto& child_proc : child_proc_list) { in ReadChildProcOutput() local
749 TestCase& testcase = testcase_list[child_proc.testcase_id]; in ReadChildProcOutput()
750 int test_id = child_proc.test_id; in ReadChildProcOutput()
754 read(child_proc.child_read_fd, buf, sizeof(buf) - 1)); in ReadChildProcOutput()
821 static void CollectChildTestResult(const ChildProcInfo& child_proc, in CollectChildTestResult() argument
823 int test_id = child_proc.test_id; in CollectChildTestResult()
825 child_proc.end_time_ns - child_proc.start_time_ns); in CollectChildTestResult()
826 if (child_proc.timed_out) { in CollectChildTestResult()
829 kill(child_proc.pid, SIGKILL); in CollectChildTestResult()
830 WaitForOneChild(child_proc.pid); in CollectChildTestResult()
832 close(child_proc.child_read_fd); in CollectChildTestResult()
834 if (child_proc.timed_out) { in CollectChildTestResult()
843 } else if (WIFSIGNALED(child_proc.exit_status)) { in CollectChildTestResult()
849 strsignal(WTERMSIG(child_proc.exit_status))); in CollectChildTestResult()
853 int exitcode = WEXITSTATUS(child_proc.exit_status); in CollectChildTestResult()
908 ChildProcInfo child_proc = RunChildProcess(test_name, next_testcase_id, in RunTestInSeparateProc() local
910 child_proc_list.push_back(child_proc); in RunTestInSeparateProc()
923 auto& child_proc = *it; in RunTestInSeparateProc() local
924 if (child_proc.finished == true) { in RunTestInSeparateProc()
925 size_t testcase_id = child_proc.testcase_id; in RunTestInSeparateProc()
926 size_t test_id = child_proc.test_id; in RunTestInSeparateProc()
929 CollectChildTestResult(child_proc, testcase); in RunTestInSeparateProc()