Code Coverage: Missing information on lack of region coverage |
||||||
Issue descriptionExample Report: https://chromium-coverage.appspot.com/reports/558266/linux/chromium/src/net/ntlm/report.html https://chromium-coverage.appspot.com/reports/558266/linux/chromium/src/net/ntlm/ntlm_client.cc.html In the overall report, ntlm_client.cc is reported to have 100% coverage on function and line, but 80.69% (163/202) for region coverage. Unfortunately, because of the complete function and line coverage, it's difficult to determine what is missing to get the region coverage to 100%.
,
May 15 2018
Looking at how the llvm-cov works, I'm wondering if it's the compound conditionals that contribute to the lack of region coverage, since most of the tests don't exercise the success/failure path for every conditional. For example, the branches caused by violating the preconditions on lines 189-191 are likely to not be covered. Similarly, in the other compound conditionals (line 277-278, 28-31, 43-52, 63-70, etc), it's likely that the "some of the conditions succeed, others fail" may affect the overall coverage. At least, based on https://clang.llvm.org/docs/SourceBasedCodeCoverage.html#interpreting-reports So I also don't know how we'd report this, since the condition itself is covered, just the implicit short-circuits aren't.
,
May 16 2018
I have one idea to try, let me check that.
,
May 16 2018
Didn't work out :( I've tried removing https://cs.chromium.org/chromium/src/build/config/coverage/BUILD.gn?sq=package:chromium&dr&g=0&l=19 Needs more thinking / investigating.
,
May 16 2018
,
May 16 2018
,
May 18 2018
Here's perhaps a simpler example for testing: https://chromium-coverage.appspot.com/reports/559420/linux/chromium/src/net/der/tag.cc.html The coverage summary - https://chromium-coverage.appspot.com/reports/559420/linux/chromium/src/net/der/report.html - reports 100% Line and 100% function, but only 11/17 regions covered.
,
May 18 2018
That's a perfect example! Thanks, Ryan!
,
May 25 2018
,
May 25 2018
I'm a bit confused by region coverage. Do we get confused by DCHECKs or UMA macros? Here's an example: https://chromium-coverage.appspot.com/reports/561573/linux/chromium/src/components/subresource_filter/content/browser/subframe_navigation_filtering_throttle.cc.html There are two lines missing, which correspond to two missing regions. That leaves 14 missing regions that I need to search for. Since every other line is covered, I assumed that compound conditionals are what I need to look for. However, there are not really any that I saw from a quick read-through. Where are those 14 regions?
,
May 25 2018
Sorry, technically there are 4 lines missing if you count {}s, but it should still account for only two regions.
,
May 25 2018
Thanks for the example, csharrison@! This issue is on my radar, I'll look into that once I can. |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by mmoroz@chromium.org
, May 15 2018