-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
coverage report of lcov1.14 is not correct #392
Comments
@for2years LCOV 1.14 is from the stone age — "Maintenance & Security Support ends in 1 month and 2 weeks |
I install the lcov with latest git master: git clone https://github.com/linux-test-project/lcov.git
cd lcov
make install then I meet this error: $ lcov --version
Can't locate Capture/Tiny.pm in @INC (you may need to install the Capture::Tiny module) (@INC contains: /usr/local/lib/lcov /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/local/lib/lcov/lcovutil.pm line 16.
BEGIN failed--compilation aborted at /usr/local/lib/lcov/lcovutil.pm line 16.
Compilation failed in require at /usr/local/bin/lcov line 101.
BEGIN failed--compilation aborted at /usr/local/bin/lcov line 101. try to fix this error: apt install libcapture-tiny-perl libdatetime-perl Looks like it solved: $lcov --version
lcov: LCOV version 2.4-beta But I encountered a new problem: Capturing coverage data from build/.objs
geninfo cmd: '/usr/local/bin/geninfo build/.objs --toolname lcov --output-filename coverage.info --base-directory . --ignore-errors gcov --ignore-errors gcov --ignore-errors unsupported --ignore-errors unsupported --ignore-errors source --branch-coverage --rc branch_coverage=1 --gcov-tool /zelos/zmath/script/llvm-gcov.sh'
Found LLVM gcov version 14.0.6, which emulates gcov version 4.2.0
Using intermediate gcov format
Recording 'internal' directories:
/zelos/zmath/build/.objs
build/.objs
/zelos/zmath
Writing temporary data to /tmp/geninfo_datxEH1
Scanning build/.objs for .gcda files ...
Found 73 data files in build/.objs
using: chunkSize: 1, nchunks:73, intervalLength:3
Finished processing 73 GCDA files
Apply filtering..
lcov: WARNING: (source) unable to open /zelos/zmath/build/.objs/zmath.discretized_qp.discretized_qp_solver_test/linux/x86_64/coverage/zmath/discretized_qp/__cpp_discretized_qp_solver_test.cc.cc: No such file or directory
(use "lcov --ignore-errors source,source ..." to suppress this warning)
lcov: WARNING: (source) unable to open /zelos/zmath/build/.objs/zmath.math/linux/x86_64/coverage/zmath/math/__cpp_circle2d.cc.cc: No such file or directory
lcov: ERROR: (inconsistent) "/usr/local/include/Eigen/src/Core/CwiseUnaryOp.h":94: function _ZN5Eigen16CwiseUnaryOpImplINS_8internal14scalar_abs2_opIdEEKNS_6MatrixIdLi3ELi1ELi0ELi3ELi1EEENS_5DenseEEC2Ev found on line but no corresponding 'line' coverage data point. Cannot derive function end line. See lcovrc man entry for 'derive_function_end_line'.
(use "lcov --ignore-errors inconsistent ..." to bypass this error)
Message summary:
1 error message:
inconsistent: 1
2 warning messages:
source: 2
3 ignore messages:
gcov: 2
unsupported: 1 |
can I ignore all errors? lcov --ignore-errors gcov,unsupported,range,inconsistent,source,format ... and I also want to know is it a good behavior to ignore errors? |
@for2years thanks for the update. I'm not a maintainer here but if I was I would suggest to create a dedicated issue with a minimal reproducer — a shell session or a Dockerfile — for the new symptoms with |
If you really want to ignore all errors, then you can use:
Depends on your motivation.
If you are closer to the first environment than the second: it is likely that some warning/error messages remain once you have addressed all the issues to your satisfaction (e.g., because yacc/lex are numbering things incorrectly). With respect to you original issue/original question:
Please try your testcases again with a recent LLVM version (and/or with a recent GCC version) - so we can see if any LCOV issues are present, or if all the weird artifacts you see are due to ancient LCOV versions, compiler/toolchain issues that are addressed in newer releases, or are bugs in either the toolchain, LCOV, or both. I hope this helps Henry PS: still limited access/limited time. |
Environment
I installed lcov by
apt install lcov
.Problem Description
I collect coverage report by the following commands:
but the result is so confused:
The text was updated successfully, but these errors were encountered: