Gathering Coverage Data During Multiprocessing
In our software we use multiprocessing. The software entry point is always the same main-function, which calls different tasks in dependence on the given arguments.
If we want to gather coverage information about the main-function we have multiple tasks writing to the same TESTINSS.DAT-file simultaneously. This does not only lead to disordered coverage information but it also might happen, that the different processes try to access the TESTINSS.DAT-file at the same moment.
How can we assure that the multiple access to the TESTINSS.DAT-file does not lead to errors in the coverage information?