Skip to content

Commit 1654d4d

Browse files
committed
Turn deref caching off by default in tests
1 parent 6eaaa85 commit 1654d4d

10 files changed

+19
-55
lines changed

jbmc/regression/jbmc/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
add_test_pl_tests(
2-
"$<TARGET_FILE:jbmc> --validate-goto-model --validate-ssa-equation --validate-trace --symex-cache-dereferences"
2+
"$<TARGET_FILE:jbmc> --validate-goto-model --validate-ssa-equation --validate-trace"
33
)
44

55
if(DEFINED BDD_GUARDS)

regression/cbmc/CMakeLists.txt

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,21 @@ else()
66
set(gcc_only_string "")
77
endif()
88

9-
# We run cbmc tests with dereference cache on by default. There are a handful
10-
# of tests (mostly tests that check SSA output) which that'd interefere with,
11-
# so we just exclude those here and run those few tests without dereference
12-
# caching.
139
add_test_pl_tests(
14-
"$<TARGET_FILE:cbmc> --validate-goto-model --validate-ssa-equation --symex-cache-dereferences" -X smt-backend -X no-dereference-cache ${gcc_only}
15-
)
16-
17-
add_test_pl_profile(
18-
"cbmc-no-dereference-cache"
19-
"$<TARGET_FILE:cbmc> --validate-goto-model --validate-ssa-equation"
20-
"-C;-X;smt-backend;-I;no-dereference-cache;${gcc_only_string}"
21-
"CORE"
10+
"$<TARGET_FILE:cbmc> --validate-goto-model --validate-ssa-equation" -X smt-backend ${gcc_only}
2211
)
2312

2413
add_test_pl_profile(
2514
"cbmc-paths-lifo"
26-
"$<TARGET_FILE:cbmc> --paths lifo --symex-cache-dereferences"
27-
"-C;-X;thorough-paths;-X;smt-backend;-X;paths-lifo-expected-failure;${gcc_only_string}-s;paths-lifo;-X;no-dereference-cache"
15+
"$<TARGET_FILE:cbmc> --paths lifo"
16+
"-C;-X;thorough-paths;-X;smt-backend;-X;paths-lifo-expected-failure;${gcc_only_string}-s;paths-lifo"
2817
"CORE"
2918
)
3019

3120
add_test_pl_profile(
3221
"cbmc-cprover-smt2"
33-
"$<TARGET_FILE:cbmc> --cprover-smt2 --symex-cache-dereferences"
34-
"-C;-X;broken-smt-backend;-X;thorough-smt-backend;${gcc_only_string}-s;cprover-smt2;-X;no-dereference-cache"
22+
"$<TARGET_FILE:cbmc> --cprover-smt2"
23+
"-C;-X;broken-smt-backend;-X;thorough-smt-backend;${gcc_only_string}-s;cprover-smt2"
3524
"CORE"
3625
)
3726

regression/cbmc/Makefile

Lines changed: 6 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -10,42 +10,17 @@ GCC_ONLY =
1010
endif
1111

1212
test:
13-
@../test.pl -e -p -c "../../../src/cbmc/cbmc --validate-goto-model --validate-ssa-equation --symex-cache-dereferences" \
14-
-X smt-backend \
15-
-X no-dereference-cache \
16-
$(GCC_ONLY)
17-
18-
test-no-dereference-cache:
19-
@../test.pl -e -p -c "../../../src/cbmc/cbmc --validate-goto-model --validate-ssa-equation" \
20-
-X smt-backend \
21-
-I no-dereference-cache \
22-
$(GCC_ONLY)
13+
@../test.pl -e -p -c "../../../src/cbmc/cbmc --validate-goto-model --validate-ssa-equation" -X smt-backend $(GCC_ONLY)
2314

2415
test-cprover-smt2:
25-
@../test.pl -e -p -c "../../../src/cbmc/cbmc --cprover-smt2 --symex-cache-dereferences" \
26-
-X broken-smt-backend \
27-
-X thorough-smt-backend \
28-
-X no-dereference-cache \
29-
$(GCC_ONLY)
16+
@../test.pl -e -p -c "../../../src/cbmc/cbmc --cprover-smt2" -X broken-smt-backend -X thorough-smt-backend $(GCC_ONLY)
3017

3118
test-paths-lifo:
32-
@../test.pl -e -p -c "../../../src/cbmc/cbmc --paths lifo --symex-cache-dereferences" \
33-
-X thorough-paths \
34-
-X smt-backend \
35-
-X paths-lifo-expected-failure \
36-
-X no-dereference-cache \
37-
$(GCC_ONLY)
19+
@../test.pl -e -p -c "../../../src/cbmc/cbmc --paths lifo" -X thorough-paths -X smt-backend -X paths-lifo-expected-failure $(GCC_ONLY)
3820

3921
tests.log: ../test.pl test
4022

41-
show:
42-
@for dir in *; do \
43-
if [ -d "$$dir" ]; then \
44-
vim -o "$$dir/*.c" "$$dir/*.out"; \
45-
fi; \
46-
done;
47-
4823
clean:
49-
find -name '*.out' -execdir $(RM) '{}' \;
50-
find -name '*.smt2' -execdir $(RM) '{}' \;
51-
$(RM) tests.log
24+
find . -name '*.out' -execdir $(RM) '{}' \;
25+
find . -name '*.smt2' -execdir $(RM) '{}' \;
26+
$(RM) tests.log tests-paths-lifo.log tests-cprover-smt2.log

regression/cbmc/dereference-cache-flag/test-no-cache.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE no-dereference-cache
1+
CORE
22
test.c
33
--show-vcc
44
\(main::1::p!0@1#2 = address_of

regression/cbmc/dereference-cache-flag/test-with-cache.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
CORE
22
test.c
3-
--show-vcc
3+
--show-vcc --symex-cache-dereferences
44
symex::dereference_cache!0#1 = 0
55
^EXIT=0$
66
^SIGNAL=0$

regression/cbmc/double_deref/double_deref.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE no-dereference-cache
1+
CORE
22
double_deref.c
33
--show-vcc
44
\{1\} \(main::1::pptr!0@1#2 = address_of\(main::1::ptr[12]!0@1\) \? main::argc!0@1#1 = [12] : main::argc!0@1#1 = [12]\)

regression/cbmc/double_deref/double_deref_with_cast.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE no-dereference-cache
1+
CORE
22
double_deref_with_cast.c
33
--show-vcc
44
\{1\} \(cast\(main::1::pptr!0@1#2, signedbv\[32\]\*\*\) = address_of\(main::1::ptr2!0@1\) \? main::argc!0@1#1 = 2 \: main::argc!0@1#1 = 1\)

regression/cbmc/double_deref/double_deref_with_member.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE no-dereference-cache
1+
CORE
22
double_deref_with_member.c
33
--show-vcc
44
^\{1\} \(main::1::cptr!0@1#2 = address_of\(main::1::container2!0@1\) \? main::argc!0@1#1 = 2 : main::argc!0@1#1 = 1\)

regression/cbmc/double_deref/double_deref_with_pointer_arithmetic.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE no-dereference-cache
1+
CORE
22
double_deref_with_pointer_arithmetic.c
33
--show-vcc
44
^\{-[0-9]+\} derefd_pointer::derefd_pointer!0#1 = \{ symex_dynamic::dynamic_object1#3\[\[0\]\], symex_dynamic::dynamic_object1#3\[\[1\]\] \}\[cast\(mod #source_location=""\(main::argc!0@1#1, 2\), signedbv\[64\]\)\]

regression/cbmc/double_deref/double_deref_with_pointer_arithmetic_single_alias.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE no-dereference-cache
1+
CORE
22
double_deref_with_pointer_arithmetic_single_alias.c
33
--show-vcc
44
\{1\} \(derefd_pointer::derefd_pointer!0#1 = address_of\(symex_dynamic::dynamic_object2\) \? main::argc!0@1#1 = 1 : symex::invalid_object!0#0 = main::argc!0@1#1\)

0 commit comments

Comments
 (0)