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
While working with @dorindabassey on a gpu in vhost-device, she has noticed the CI seem to be using the "function coverage" metric of llvm-cov. Then I also noticed the comment in the python code of the CI, that seems to suggest "line coverage" is intended to be used.
# where the first three numbers are related to region coverage, and next three to line coverage (what we want)
# and the last three to branch coverage (which is not yet supported). Below grabs the line coverage, and strips
# off the '%'.
coverage=float(summary.split()[6][:-1])
The comment here doesn't seem to be correct - at least on my machine the order of the columns in the CLI output of cargo llvm-cov test --summary-only is: Region coverage, Function coverage, Line coverage.
Confusingly the order of the columns is different when using the html output (cargo llvm-cov test --open): Function coverage, Line coverage, Region coverage.
Btw there is also cargo llvm-cov test --json --summary-only which could prevent such confusion.
This means that it seems like the projects using this CI, use the function coverage metric instead of line coverage.
Is this intended or it is it a bug in the parsing of the output? I would think the original intention was to use line coverage.
The text was updated successfully, but these errors were encountered:
Hey, thanks for reporting this! Yes, that is indeed supposed to be line coverage! I wonder something changed on llvm-cov's side recently (there was a rust toolchain update that caused weird changes of the coverage numbers all over the place). The json option does indeed sound more robust. I'll have a look into fixing this tomorrow morning (although if you already have a fix, please feel free to open a PR and I'll have a look at that instead :)
roypat
added a commit
to roypat/rust-vmm-ci
that referenced
this issue
Oct 23, 2024
It seems that the raw output of llvm-cov changed at some point, and we
ended upcomparing functoin coverage instead of line coverage. Fix this
by instead using the new json output, which will hopefully prevent such
goofs in the future.
Fixesrust-vmm#170
Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
It seems that the raw output of llvm-cov changed at some point, and we
ended upcomparing functoin coverage instead of line coverage. Fix this
by instead using the new json output, which will hopefully prevent such
goofs in the future.
Fixesrust-vmm#170
Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
While working with @dorindabassey on a gpu in vhost-device, she has noticed the CI seem to be using the "function coverage" metric of llvm-cov. Then I also noticed the comment in the python code of the CI, that seems to suggest "line coverage" is intended to be used.
rust-vmm-ci/integration_tests/test_coverage.py
Lines 101 to 106 in 209c04e
The comment here doesn't seem to be correct - at least on my machine the order of the columns in the CLI output of
cargo llvm-cov test --summary-only
is:Region coverage
,Function coverage
,Line coverage
.Confusingly the order of the columns is different when using the html output (
cargo llvm-cov test --open
):Function coverage
,Line coverage
,Region coverage
.Btw there is also
cargo llvm-cov test --json --summary-only
which could prevent such confusion.This means that it seems like the projects using this CI, use the function coverage metric instead of line coverage.
Is this intended or it is it a bug in the parsing of the output? I would think the original intention was to use line coverage.
The text was updated successfully, but these errors were encountered: