Comments (1)
I fear that I'm not entirely sure which fixes/workarounds you are looking for.
It appears that we see two different errors/inconsistencies in the gcov data for this testcase:
-
function _ZN17TEST1_SUITE1_Test8TestBodyEv is found to end on line .../test1.cpp:9 in one GCDA file but is found to end on line 19 in another file.
This appears to be a bug in gcov (or in gcc) which turns up sometimes (...which is why lcov checks for it).
lcov uses the function range to figure out which coverpoints belong to the function, in order to support function-level exclusion and also to report covered proportions.
You can safely ignore the error if you don't care about those features.
To work around it is a bit painful - as you would have to manually fix the start/end lines (e.g., viased
on the data file)...or possibly someone can fix it in gcc/gcov. -
The gcov output data is not consistent at line file1.c:2811.
I fear that I have forgotten the details, but the comment near linegeninfo:2324
suggests that the report will look weird because we will see a block inside some conditional (say, the 'if' clause) such that the 'if' expression is not evaluated but the statement is hit.
The suggested workaround is to tell geninfo to set the block hit count to zero when that happens (or gcc/gcov need to fix the bug).
To see how the second issue affects your coverage report: capture your coverage data twice - once setting the count and once without, then generate a differential coverage report (genhtml -o whatTheHeck --baseline-file without.info with.info ...
) and inspect the differences.
from lcov.
Related Issues (20)
- genhtml: --keep-going doesn't work for ERROR: <file> is not readable or doesn't exist. HOT 8
- how to see the verbose error msg? HOT 11
- LCOV 2.1 not compatible with Codecov HOT 9
- LCOV coverage.dat file has "DA:0:0" HOT 3
- lcov on x86 HOT 9
- genhtml: ERROR: Can't call method "branchElem" on an undefined value HOT 2
- Duplicate folder structure (--prefix does not help) HOT 2
- gcov error:std::bad_alloc HOT 8
- perl2lcov: unexpected data type 'time' HOT 6
- genhtml package removed from PyPI HOT 1
- RPM 2.1-1 does not install on Rocky Linux 8 or Centos7 HOT 1
- Unable to generate gcda file for cc_library_shared module HOT 4
- inconsistent branch coverage summary HOT 1
- Build of example fails on Ubuntu 22.04.4 LTS due to Makefile using SHELL of /bin/sh (softlink to /bin/dash) HOT 1
- Build of examples fails if part of path is a softlink HOT 4
- Option geninfo_external from a user-provided lcovrc file gets ignored HOT 4
- Incorrect #line directives cause Perl warnings HOT 1
- lcov fails with "(inconsistent) mismatched end line" for googletest code HOT 1
- lcov --no-external behaves incorrectly with 2 or more -d
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lcov.