question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TST: gcov missing a few files in report

See original GitHub issue

@pv correctly notes that a few C source files are missing from our coverage report.

Digging through a recent master branch build log, I can see some “warning” style output for gcov of this nature:

./_configtest.gcda:stamp mismatch with notes file
./build/temp.linux-x86_64-3.6/numpy/core/src/dummymodule.gcda:cannot open data file, assuming not executed
./build/temp.linux-x86_64-3.6/numpy/core/src/private/mem_overlap.gcda:stamp mismatch with notes file
./build/temp.linux-x86_64-3.6/numpy/core/src/private/npy_longdouble.gcda:stamp mismatch with notes file
./build/temp.linux-x86_64-3.6/numpy/core/src/private/ufunc_override.gcda:stamp mismatch with notes file
./empty/_configtest.gcda:cannot open data file, assuming not executed

Possible solutions to this issue have been discussed elsewhere & appear related to build / machine time stamps relative to tests.

When I test locally, this is not reproduced; my current idea is to first open a PR that tries one of the simpler solutions – i.e., using find to recursively touch the generated *.gcda files. I’ll first see if I can reproduce the issue locally by touching the *.c and *.gcno files before running gcov recursively so that the timestamps are messed up. It looks like one user reports that touch may not suffice because the timestamp is actually embedded in the gcda files – I’ll have to check this.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
pvcommented, Aug 21, 2018

Maybe it’s related to the fact that some files are compiled twice (included both in umath and multiarray). If so, gh-10915 should fix it.

0reactions
tylerjereddycommented, Aug 21, 2018

Ok, proposed a fix that works locally in that PR for mem_overlap

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why doesn't gcov report any lines being covered by my unit ...
In Xcode 4.6, coverage reports just seem to work. Turn on "Generate Test Coverage Files" and "Instrument Program Flow" for the app target,...
Read more >
Report not showing hits and misses in source code - Codecov
We build and run the model in a different directory than where the source code lives. Then we copy the gcno,gcda/gcov files into...
Read more >
Unable to exclude certain source files from gcov coverage test
I have been trying to use the gcov plugin and it does work in general, creating a coverage report for all files in...
Read more >
gcovr Documentation - Read the Docs
This will search for all your .gcno and .gcda files, run the compiler's gcov tool, and summarize the code coverage statistics into a...
Read more >
C++ Code Coverage - Laurent Aphecetche
A few notes on how to get code coverage for O2 (and QC). ... are using gcov to go from the *.gcno and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found