Skip to content

Ensure test coverage of remove_asmt::msc_asm_function_call #7174

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
Oct 3, 2022

Conversation

tautschnig
Copy link
Collaborator

We had coverage of the GCC counterpart to this function. This commit now adds a variant of an existing test to use MSVC assembler syntax. Running this new test with --winx64 now ensures that the code paths reaching msc_asm_function_call are hit.

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

@kroening
Copy link
Member

kroening commented Oct 2, 2022

Testing MSC assembler parsing doesn't seem to be a good fit for the set of concurrency tests.

@tautschnig
Copy link
Collaborator Author

Testing MSC assembler parsing doesn't seem to be a good fit for the set of concurrency tests.

Fair point, even when it does seem to be the right place to test handling of mfence etc. So I kept the test, but also added one to exercise fstcw, which in turn uncovered a few bugs (which I have now fixed).

@tautschnig tautschnig self-assigned this Oct 3, 2022
We did not have any tests that exercised the parameter-requiring cases
of inline assembler. Enabling these uncovered that we failed to
construct the correct types. In the MSVC case we did not have any
support for parameters at all.
@tautschnig tautschnig force-pushed the feature/test-msc-asm branch from a9e65f8 to 3fc6fd5 Compare October 3, 2022 12:18
@codecov
Copy link

codecov bot commented Oct 3, 2022

Codecov Report

Base: 77.82% // Head: 77.90% // Increases project coverage by +0.08% 🎉

Coverage data is based on head (3fc6fd5) compared to base (2a08d59).
Patch coverage: 93.10% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7174      +/-   ##
===========================================
+ Coverage    77.82%   77.90%   +0.08%     
===========================================
  Files         1578     1616      +38     
  Lines       182242   186710    +4468     
===========================================
+ Hits        141824   145454    +3630     
- Misses       40418    41256     +838     
Impacted Files Coverage Δ
src/assembler/remove_asm.cpp 78.66% <93.10%> (+27.28%) ⬆️
src/solvers/smt2/smt2_conv.h 84.61% <0.00%> (-15.39%) ⬇️
src/goto-programs/goto_program.h 90.19% <0.00%> (-0.51%) ⬇️
src/cprover/console.cpp 32.46% <0.00%> (ø)
src/cprover/cprover_parse_options.h 100.00% <0.00%> (ø)
src/cprover/may_be_same_object.cpp 90.00% <0.00%> (ø)
src/cprover/format_hooks.cpp 49.42% <0.00%> (ø)
src/cprover/axioms.cpp 91.56% <0.00%> (ø)
src/cprover/wcwidth.c 0.00% <0.00%> (ø)
src/cprover/report_properties.cpp 88.46% <0.00%> (ø)
... and 42 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@tautschnig tautschnig merged commit 4db88f2 into diffblue:develop Oct 3, 2022
@tautschnig tautschnig deleted the feature/test-msc-asm branch October 3, 2022 13:57
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.

2 participants