Skip to content

De-duplicate contracts regression tests #7581

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

Conversation

tautschnig
Copy link
Collaborator

e22a788 added a wholesale copy of regression/contracts as regression/contracts-dfcc. This is now follow-up cleanup to reduce duplication with the intent to reduce future maintenance cost. See individual commit messages for details on how the cleanup was done.

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

@qinheping
Copy link
Collaborator

We should do the same thing in #7541.

@tautschnig tautschnig self-assigned this Mar 7, 2023
Reduce the maintenance burden by using tags to run contracts tests both
with and without DFCC. A first round of filtering was done as follows:

```
cd regression/contracts-dfcc ; sed -i '1s/$/ dfcc-only/' */*.desc
cd ../contracts
for d in * ; do
  [ -d $d ] || continue
  [ -d ../contracts-dfcc/$d ] || continue
  cp -a ../contracts-dfcc/$d ../contracts-dfcc/X.$d
  sed -i '1s/ dfcc-only$//' ../contracts-dfcc/X.$d/*.desc
  sed -i '3s/--dfcc main //' ../contracts-dfcc/X.$d/*.desc
  if diff -urN $d ../contracts-dfcc/X.$d ; then
    sed -i '1s/ dfcc-only$//' ../contracts-dfcc/$d/*.desc
    git rm -r $d
  fi
  rm -r ../contracts-dfcc/X.$d
done
```
Removal of duplicates based on a manual review of the diff between test
directories of the same name.
@tautschnig tautschnig force-pushed the cleanup/dedup-contracts-regression-tests branch from 7fb297a to 205e123 Compare March 8, 2023 13:38
@codecov
Copy link

codecov bot commented Mar 8, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.10 ⚠️

Comparison is base (88e3145) 78.50% compared to head (205e123) 78.41%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7581      +/-   ##
===========================================
- Coverage    78.50%   78.41%   -0.10%     
===========================================
  Files         1670     1670              
  Lines       191768   191768              
===========================================
- Hits        150549   150373     -176     
- Misses       41219    41395     +176     
Impacted Files Coverage Δ
src/util/validate_types.cpp 46.66% <0.00%> (-46.67%) ⬇️
src/util/string_hash.cpp 0.00% <0.00%> (-45.46%) ⬇️
src/util/type.cpp 27.27% <0.00%> (-45.46%) ⬇️
src/util/validate_helpers.h 66.66% <0.00%> (-33.34%) ⬇️
src/util/validate_expressions.cpp 68.75% <0.00%> (-25.00%) ⬇️
src/util/string_container.h 81.81% <0.00%> (-18.19%) ⬇️
src/big-int/bigint.cc 71.76% <0.00%> (-17.24%) ⬇️
src/util/string_container.cpp 37.03% <0.00%> (-14.82%) ⬇️
src/util/ssa_expr.h 88.63% <0.00%> (-11.37%) ⬇️
src/util/type.h 92.53% <0.00%> (-7.47%) ⬇️
... and 3 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.

@feliperodri feliperodri added the aws Bugs or features of importance to AWS CBMC users label Mar 9, 2023
@tautschnig tautschnig removed their assignment Mar 10, 2023
Copy link
Collaborator

@qinheping qinheping left a comment

Choose a reason for hiding this comment

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

LGTM!

@tautschnig tautschnig merged commit 2d4b3f7 into diffblue:develop Mar 20, 2023
@tautschnig tautschnig deleted the cleanup/dedup-contracts-regression-tests branch March 20, 2023 15:35
tautschnig added a commit to tautschnig/cbmc that referenced this pull request Mar 23, 2023
The tagged test configuration in diffblue#7581 introduced a race for multiple
test runs would read/write via the same file names, and may be doing so
concurrently. See
https://github.com/diffblue/cbmc/actions/runs/4480043988/jobs/7874814034
for one such example.
@tautschnig tautschnig mentioned this pull request Mar 23, 2023
3 tasks
jparsert pushed a commit to jparsert/cbmc that referenced this pull request Apr 19, 2023
The tagged test configuration in diffblue#7581 introduced a race for multiple
test runs would read/write via the same file names, and may be doing so
concurrently. See
https://github.com/diffblue/cbmc/actions/runs/4480043988/jobs/7874814034
for one such example.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws Bugs or features of importance to AWS CBMC users cleanup Code Contracts Function and loop contracts Tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants