Skip to content

Location coverage reporting should ignore globals #6981

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

Merged
merged 1 commit into from
Jun 30, 2022

Conversation

tautschnig
Copy link
Collaborator

We iterate over instructions in non-built-in functions, and it is
therefore reasonable to expect that all source locations have functions
that they belong to. If symbols declared at global scope are part of
expressions then this shouldn't yield calling them out in location
coverage. (That's just where they were declared, it doesn't even
strictly imply their assignments were covered.)

Fixes: #6978

  • Each commit message has a non-empty body, explaining why the change was made.
  • n/a Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • n/a The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • n/a My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • n/a White-space or formatting changes outside the feature-related changed lines are in commits of their own.

We iterate over instructions in non-built-in functions, and it is
therefore reasonable to expect that all source locations have functions
that they belong to. If symbols declared at global scope are part of
expressions then this shouldn't yield calling them out in location
coverage. (That's just where they were declared, it doesn't even
strictly imply their assignments were covered.)

Fixes: diffblue#6978
@tautschnig tautschnig force-pushed the bugfixes/6978-source-loc branch from b512ece to fffc77e Compare June 29, 2022 13:43
@codecov
Copy link

codecov bot commented Jun 29, 2022

Codecov Report

Merging #6981 (fffc77e) into develop (257bfc4) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff            @@
##           develop    #6981   +/-   ##
========================================
  Coverage    77.83%   77.84%           
========================================
  Files         1571     1571           
  Lines       180484   180487    +3     
========================================
+ Hits        140488   140508   +20     
+ Misses       39996    39979   -17     
Impacted Files Coverage Δ
src/goto-instrument/cover_basic_blocks.cpp 89.56% <100.00%> (+0.27%) ⬆️
src/util/simplify_expr.cpp 84.28% <0.00%> (+1.20%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8bf2503...fffc77e. Read the comment docs.

@peterschrammel peterschrammel removed their assignment Jun 30, 2022
@tautschnig tautschnig merged commit 045e421 into diffblue:develop Jun 30, 2022
@tautschnig tautschnig deleted the bugfixes/6978-source-loc branch June 30, 2022 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Coverage generates incomplete source location
4 participants