-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gcov cannot write coverage data from child processes #18
Comments
This still seems like a gotcha for other projects using ct, so I'd like to keep it open. |
I think the ideal behavior here from ct would be:
Some things that make this difficult:
|
My rough plan for how to do this happens mostly in ... // setup test process state
t->f(); // run the test
if (fail) {
ctfailnow(); // send SIGABRT to self, indicating failure to driver
}
exit(0); // indicate success to driver process I'd like to add some logic immediately before that last line.
If the children exit promptly, these steps will complete in order. If any child takes too long, the timer will fire and the test process will just exit. Either way, the driver process will kill the process group with |
At the end of a successful test, the test process itself ends normally, but ct kills any remaining child of the test process with
SIGKILL
. This is a problem if that child is executing code under test, because it means gcov has no chance to write coverage data for that process.In #12 there's some discussion of how gcov writes coverage data.
The text was updated successfully, but these errors were encountered: