You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think there is a principal issue when detecting the coverage of C programs using fork().
Imagine the following code:
staticpid_tspawn_process(...)
{
pid_tt;
init_code(); // correctly detected as coveredt=fork();
if (t==0) {
child_code(); // always detected as not covered
} elseif (t==-1) {
error_code(); // impossible to test / not covered
} else {
parent_code(); // correctly detected as covered
}
returnt; // detected as covered, counting only parents
}
I wonder if this is an inherent problem of the way coverage is detected, or if something can be configured differently, changed in the Travis CI script. I did not find any hints in the cpp-coveralls documentation, or in the gcov documentation. Maybe it's indeed impossible? Does anyone know?
Alternatively: Is there a way to mark the sections as "covered" or "un-cover-able" in the code? Some pragma or magic comment?
Or is this some limitation we just have to live with?
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked for closure because it has not had recent activity. It will be closed if no further activity occurs. If your issue is still active please add a comment and we’ll review as soon as we can. Thank you for your contributions.
I think there is a principal issue when detecting the coverage of C programs using fork().
Imagine the following code:
I wonder if this is an inherent problem of the way coverage is detected, or if something can be configured differently, changed in the Travis CI script. I did not find any hints in the cpp-coveralls documentation, or in the gcov documentation. Maybe it's indeed impossible? Does anyone know?
Alternatively: Is there a way to mark the sections as "covered" or "un-cover-able" in the code? Some pragma or magic comment?
Or is this some limitation we just have to live with?
The text was updated successfully, but these errors were encountered: