New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 843223 link

Starred by 3 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug

Blocking:
issue 846743



Sign in to add a comment

Code Coverage: Missing information on lack of region coverage

Project Member Reported by rsleevi@chromium.org, May 15 2018

Issue description

Example 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%.
 

Comment 1 by mmoroz@chromium.org, May 15 2018

Labels: -Pri-3 Pri-2
Thanks Ryan, that's an interesting catch! Right, there must be red blocks highlighting non-covered regions, even if it's only part of a line.
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.

Comment 3 by mmoroz@chromium.org, May 16 2018

Owner: mmoroz@chromium.org
Status: Assigned (was: Untriaged)
I have one idea to try, let me check that.

Comment 4 by mmoroz@chromium.org, May 16 2018

Owner: ----
Status: Available (was: Assigned)
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.

Comment 5 by mmoroz@chromium.org, May 16 2018

Labels: Coverage-v2-Blocker

Comment 6 by mmoroz@chromium.org, May 16 2018

Labels: -Pri-2 Pri-1
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.

Comment 8 by mmoroz@chromium.org, May 18 2018

That's a perfect example! Thanks, Ryan!
Blocking: 846743
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?
Sorry, technically there are 4 lines missing if you count {}s, but it should still account for only two regions.
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