linux-test-project / lcov

LCOV
GNU General Public License v2.0
866 stars 234 forks source link

[lcov-2.0] summary and list report different coverage values #261

Closed KineticTheory closed 5 months ago

KineticTheory commented 5 months ago

Maybe I don't understand something about version 2.0. I am expecting lcov --summary and lcov --list to generate the same summary values:

$ lcov --summary coverage.info

Summary coverage rate:
  lines......: 92.2% (20390 of 22125 lines)
  functions..: 94.9% (3234 of 3407 functions)

$ lcov --list coverage.info
                                               |Lines      |Functions|Branches
Filename                                       |Rate    Num|Rate  Num|Rate   Num
================================================================================
(file statistics)
================================================================================
                                         Total:|16.7% 20390| 0.0%  3k|    -    0

Why is the summary 92.2% but the listing 16.7%? What am I missing? Also, the output from genhtml matches the 92.2% case.

Thanks!

henry2cox commented 5 months ago

Can you try your testcase again, with the current top of tree? I think I fixed something similar some time back - see ded2e94. If your bug is NOT fixed: please attach a testcase which illustrates the issue (your coverage.info file is sufficient, I suspect). If the bug is fixed: please close this issue. Thanks Henry

KineticTheory commented 5 months ago

Can you try your testcase again, with the current top of tree? I think I fixed something similar some time back - see ded2e94. If your bug is NOT fixed: please attach a testcase which illustrates the issue (your coverage.info file is sufficient, I suspect). If the bug is fixed: please close this issue. Thanks Henry

@henry2cox Thanks for the quick reply. Indeed, working with hash d981242b50d945c0846721efd4ab9a698f08fa95 fixes this issue.