-
Notifications
You must be signed in to change notification settings - Fork 114
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
Differences in executable line detection between CI jobs #841
Comments
The reason for this seems to be related to the workaround described in https://github.com/JuliaCI/Coverage.jl#a-note-for-advanced-users. |
Running some simple coverage test locally (
Thus, the Julia code coverage generation mechanism doesn't seem to count |
Hopefully fixed by JuliaLang/julia#42170 |
Closed by #985 |
I have noticed something odd when looking at the coverage
lcov.info
files from the individual jobs in https://github.com/trixi-framework/Trixi.jl/runs/3512265649: For example, I compared the fileslcov-tree_part1-ubuntu-latest-1.6-x64.info
andlcov-p4est_part1-ubuntu-latest-1.6-x64.info
for the filesrc/equations/compressible_euler_equations_1d.jl
, for the lines 259ff (theflux
function).The
flux
function is defined from lines 259 to 268 (inclusive), where the first line and the last lines are thefunction flux(...)
signature and theend
statement, respectively. In the first LCOV filelcov-tree_part1-ubuntu-latest-1.6-x64.info
, we getwhere
DA
means "line with executable code" and the numbers are "line number, execution count". That is, both thefunction flux(...)
line (line 259) and theend
line (line 268) are not counted as "executable", and are thus not instrumented (see https://manpages.debian.org/stretch/lcov/geninfo.1.en.html#FILES or https://twiki.cern.ch/twiki/bin/view/SPI/PrincipleOfGCOV for more details onDA
and the LCOV file structure), while the function body was executed 12,680,238 times.The second LCOV file,
lcov-p4est_part1-ubuntu-latest-1.6-x64.info
, is for P4est.jl tests, thus the 1D Euler equations will never be used. As expected, the respective line execution counts in the LCOV file are all zero:However, what's clearly different is that now lines 259 and 267 are also marked as executable, although with count zero (as they should be).
My strong suspicion now is that this is what causes the weird (and wrong) effect in the final Coverage report:
Somehow, while merging the two reports in Coverage.jl, the zero-count from the P4est tests for line 259 is registered as "hey, this line is executable but wasn't", while the Tree tests do not consider this line as executable and thus do not report any execution count at all. The
end
statement is obviously successfully discarded, but the function statement isn't - which causes the final report to contain a zero-count for the function statement.Finally, the culprit seems to lie either with the parallel Coverage.jl execution, which extracts the line counts from the gcov files and does a bad job in filtering non-executable lines. Alternatively, the error is in the merging routine which should have discarded the line that is not reported at all by one of the measurements as executable.
Now, what to do with this? One possibility is to try to comb through the Coverage.jl code; alternatively we could open an issue there and ask about this behavior. Any suggestions?
The text was updated successfully, but these errors were encountered: