Skip to content

Commit 848beac

Browse files
committed
Added new tags for SMT regression tests
As per the proposal described in diffblue#5982, this PR introduces new tags that can be used to label tests that are known to be broken with specific solvers. It also updates the Makefile targets to use these solver-specific tags.
1 parent abba3d7 commit 848beac

File tree

3 files changed

+73
-10
lines changed

3 files changed

+73
-10
lines changed

regression/cbmc/CMakeLists.txt

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,24 @@ add_test_pl_profile(
1717
"CORE"
1818
)
1919

20+
add_test_pl_profile(
21+
"cbmc-cvc4"
22+
"$<TARGET_FILE:cbmc> --cvc4"
23+
"-C;-X;broken-smt-backend;-X;thorough-smt-backend;-X;broken-cvc4-smt-backend;-X;thorough-cvc4-smt-backend;${gcc_only_string}-s;cvc4"
24+
"CORE"
25+
)
26+
2027
add_test_pl_profile(
2128
"cbmc-cprover-smt2"
2229
"$<TARGET_FILE:cbmc> --cprover-smt2"
23-
"-C;-X;broken-smt-backend;-X;thorough-smt-backend;${gcc_only_string}-s;cprover-smt2"
30+
"-C;-X;broken-smt-backend;-X;thorough-smt-backend;-X;broken-cprover-smt-backend;-X;thorough-cprover-smt-backend;${gcc_only_string}-s;cprover-smt2"
31+
"CORE"
32+
)
33+
34+
add_test_pl_profile(
35+
"cbmc-cprover-smt2"
36+
"$<TARGET_FILE:cbmc> --z3"
37+
"-C;-X;broken-smt-backend;-X;thorough-smt-backend;-X;broken-z3-smt-backend;-X;thorough-z3-smt-backend;${gcc_only_string}-s;z3"
2438
"CORE"
2539
)
2640

regression/cbmc/Makefile

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,23 @@ endif
1212
test:
1313
@../test.pl -e -p -c "../../../src/cbmc/cbmc --validate-goto-model --validate-ssa-equation" -X smt-backend $(GCC_ONLY)
1414

15+
test-cvc4:
16+
@../test.pl -e -p -c "../../../src/cbmc/cbmc --cvc4" \
17+
-X broken-smt-backend -X thorough-smt-backend \
18+
-X broken-cvc4-smt-backend -X thorough-cvc4-smt-backend \
19+
$(GCC_ONLY)
20+
1521
test-cprover-smt2:
16-
@../test.pl -e -p -c "../../../src/cbmc/cbmc --cprover-smt2" -X broken-smt-backend -X thorough-smt-backend $(GCC_ONLY)
22+
@../test.pl -e -p -c "../../../src/cbmc/cbmc --cprover-smt2" \
23+
-X broken-smt-backend -X thorough-smt-backend \
24+
-X broken-cprover-smt-backend -X thorough-cprover-smt-backend \
25+
$(GCC_ONLY)
26+
27+
test-z3:
28+
@../test.pl -e -p -c "../../../src/cbmc/cbmc --z3" \
29+
-X broken-smt-backend -X thorough-smt-backend \
30+
-X broken-z3-smt-backend -X thorough-z3-smt-backend \
31+
$(GCC_ONLY)
1732

1833
test-paths-lifo:
1934
@../test.pl -e -p -c "../../../src/cbmc/cbmc --paths lifo" -X thorough-paths -X smt-backend -X paths-lifo-expected-failure $(GCC_ONLY)

regression/readme.md

Lines changed: 42 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,46 @@
1-
# CProver regression tests
1+
# CProver Regression Tests
22

33
This folder contains the CProver regression test-suite.
44

5-
## Notes
5+
## Tags
66

7-
* Tests marked as `winbug` are currently known to be failing
8-
on Windows, but passing on other platforms. The reason for
9-
this is not known, and it's currently being investigated.
10-
This was discovered during work done to port CI from travis
11-
and codebuild to github actions. Worth noting that those tests
12-
were not being run on Windows before.
7+
### Backend
8+
9+
- `smt-backend`:
10+
These tests _require_ the SMT backend and do not work with the SAT backend.
11+
For example, quantified predicates are not fully supported in SAT.
12+
- `broken-smt-backend`:
13+
These tests are blocked on missing / buggy goto -> SMT translation rules,
14+
and therefore do not work with any SMT solver.
15+
- `thorough-smt-backend`:
16+
These tests are too slow to be run in CI with the SMT backend.
17+
18+
### Solver
19+
20+
- `broken-cvc4-smt-backend`:
21+
These tests are known to not work with CVC4 (the version running on our CI).
22+
- `thorough-cvc4-smt-backend`:
23+
These tests are too slow to be run in CI with CVC4.
24+
- `broken-cprover-smt-backend`:
25+
These tests are known to not work with CPROVER SMT2.
26+
- `thorough-cprover-smt-backend`:
27+
These tests are too slow to be run in CI with CPROVER SMT2.
28+
- `broken-z3-smt-backend`:
29+
These tests are known to not work with Z3 (the version running on our CI).
30+
- `thorough-z3-smt-backend`:
31+
These tests are too slow to be run in CI with Z3.
32+
33+
### Platform
34+
35+
- `winbug`:
36+
These tests are currently known to be failing on Windows,
37+
but passing on other platforms.
38+
The reason for this is not known, and it's currently being investigated.
39+
This was discovered during work done to port CI from [Travis]
40+
and [AWS CodeBuild] to [GitHub Actions].
41+
Worth noting that those tests were not being run on Windows before.
42+
43+
44+
[AWS CodeBuild]: https://aws.amazon.com/codebuild/
45+
[GitHub Actions]: https://github.com/features/actions
46+
[Travis]: https://travis-ci.com/

0 commit comments

Comments
 (0)