Skip to content

Add regression test for goto-instrument --show-struct-alignment - #9541

Merged
tautschnig merged 2 commits into
diffblue:developfrom
tautschnig:test-coverage/show-struct-alignment
Nov 27, 2026
Merged

tautschnig merged 2 commits into
diffblue:developfrom
tautschnig:test-coverage/show-struct-alignment

Conversation

@tautschnig

Copy link
Copy Markdown
Collaborator

No regression test used this option. The test checks that members which fit in a single memory operand are reported, and that wider ones are not.

  • 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.

Copilot AI balanced review requested due to automatic review settings November 19, 2026 21:58

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@codecov

codecov Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.32%. Comparing base (3e1f386) to head (ea22d08).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #9541      +/-   ##
===========================================
+ Coverage    81.29%   81.32%   +0.02%     
===========================================
  Files         1725     1725              
  Lines       191680   191682       +2     
  Branches        73       73              
===========================================
+ Hits        155835   155878      +43     
+ Misses       35845    35804      -41     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kroening

Copy link
Copy Markdown
Collaborator

Please put into regression/goto-instrument/show-struct-alignment

tautschnig and others added 2 commits November 27, 2026 12:20
No regression test used this option. The test checks that members which
fit in a single memory operand are reported, and that wider ones are
not. It also checks that padding counts towards the size of the memory
operand, but is not reported as a member.

Co-authored-by: Kiro <kiro-agent@users.noreply.github.com>
print_struct_alignment_problems reports the pairs of members that fit in
a single memory operand together with the first member of the group.
When a group has interferences, the members it covers are not meant to
start a group of their own ("no need to check with starting from an
already covered member"). This only worked for the first group of each
struct, though: first_time_seen_from was only cleared when printing the
header of the struct. For later groups, and for any group that runs to
the end of the struct, the covered members were reported again. For
example, for

  struct groups { char g1, g2, g3, g4; int i1; char h1, h2, h3; int i2; };

g2/g3 was suppressed, but h2/h3 was reported, and for

  struct tail { char t1, t2, t3; };

all of t1/t2, t1/t3 and t2/t3 were.

Clear first_time_seen_from whenever a pair is reported, and skip the
covered members also when the group runs to the end of the struct.

Co-authored-by: Kiro <kiro-agent@users.noreply.github.com>
@tautschnig
tautschnig force-pushed the test-coverage/show-struct-alignment branch from fb91b6b to ea22d08 Compare November 27, 2026 13:03
@tautschnig
tautschnig merged commit d796ef1 into diffblue:develop Nov 27, 2026
57 of 62 checks passed
@tautschnig
tautschnig deleted the test-coverage/show-struct-alignment branch November 27, 2026 15:30
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.

3 participants