Skip to content

Commit 9b809be

Browse files
committed
Do not (unnecessarily) require preprocessing for fixed 32/64 bit regression tests
This is not portable as some architectures might not provide header files for non-native bit widths. Preprocessing/the use of header files is not essential for any of these regression tests.
1 parent 8187bdd commit 9b809be

File tree

26 files changed

+39
-84
lines changed

26 files changed

+39
-84
lines changed

.travis.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ jobs:
101101
- g++-5
102102
- libubsan0
103103
- parallel
104-
- libc6-dev-i386
105104
before_install:
106105
- mkdir bin
107106
- ln -s /usr/bin/gcc-5 bin/gcc
@@ -136,7 +135,6 @@ jobs:
136135
- libwww-perl
137136
- g++-5
138137
- libubsan0
139-
- libc6-dev-i386
140138
before_install:
141139
- mkdir bin
142140
- ln -s /usr/bin/gcc-5 bin/gcc
@@ -165,7 +163,6 @@ jobs:
165163
- libstdc++-5-dev
166164
- libubsan0
167165
- parallel
168-
- libc6-dev-i386
169166
before_install:
170167
- mkdir bin
171168
- ln -s /usr/bin/gcc-5 bin/gcc
@@ -194,7 +191,6 @@ jobs:
194191
- g++-5
195192
- libstdc++-5-dev
196193
- libubsan0
197-
- libc6-dev-i386
198194
before_install:
199195
- mkdir bin
200196
- ln -s /usr/bin/gcc-5 bin/gcc
@@ -220,7 +216,6 @@ jobs:
220216
- ubuntu-toolchain-r-test
221217
packages:
222218
- g++-5
223-
- libc6-dev-i386
224219
before_install:
225220
- mkdir bin
226221
- ln -s /usr/bin/gcc-5 bin/gcc
@@ -245,7 +240,6 @@ jobs:
245240
- ubuntu-toolchain-r-test
246241
packages:
247242
- g++-7
248-
- libc6-dev-i386
249243
before_install:
250244
- mkdir bin
251245
- ln -s /usr/bin/gcc-7 bin/gcc
@@ -276,7 +270,6 @@ jobs:
276270
- libstdc++-5-dev
277271
- libubsan0
278272
- parallel
279-
- libc6-dev-i386
280273
before_install:
281274
- mkdir bin
282275
# Use gcc/g++ 5 for tests, as Clang doesn't work yet
File renamed without changes.

regression/cbmc/Float24/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CORE
2-
main.c
2+
main.i
33
--win32 --xml-ui
44
^EXIT=10$
55
^SIGNAL=0$
File renamed without changes.

regression/cbmc/Malloc15/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CORE
2-
main.c
2+
main.i
33
--32
44
^EXIT=0$
55
^SIGNAL=0$
File renamed without changes.

regression/cbmc/Malloc16/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CORE
2-
main.c
2+
main.i
33
--32
44
^EXIT=0$
55
^SIGNAL=0$

regression/cbmc/Pointer_Arithmetic12/main.c renamed to regression/cbmc/Pointer_Arithmetic12/main.i

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
#include <stdint.h>
2-
3-
#include <assert.h>
1+
typedef unsigned int uint32_t;
42

53
uint32_t __stack[32];
64

@@ -98,35 +96,25 @@ int main()
9896
L_0x401_0: esp-=0x14;
9997
L_0x404_0: var15=ebp;
10098
L_0x404_1: var15-=0x4;
101-
#ifdef NONDET
102-
L_0x404_2: *(uint32_t*)(var15)=nondet_uint();
103-
#else
10499
L_0x404_2: *(uint32_t*)(var15)=0xffffffff;
105-
#endif
106100
L_0x40b_0: var16=ebp;
107101
L_0x40b_1: var16-=0x4;
108102
L_0x40b_2: eax=*(uint32_t*)(var16);
109103
L_0x40e_0: *(uint32_t*)(esp)=eax;
110104
L_0x411_0: esp-=4; f__L_0x3c6_0(); esp+=4;
111-
#if 1
112105
uint32_t eax1=eax;
113106
C_0x3ff_0: ebp=esp;
114107
C_0x401_0: esp-=0x14;
115108
C_0x404_0: var15=ebp;
116109
C_0x404_1: var15-=0x4;
117-
#ifdef NONDET
118-
C_0x404_2: *(uint32_t*)(var15)=nondet_uint();
119-
#else
120110
C_0x404_2: *(uint32_t*)(var15)=0xffffffff;
121-
#endif
122111
C_0x40b_0: var16=ebp;
123112
C_0x40b_1: var16-=0x4;
124113
C_0x40b_2: eax=*(uint32_t*)(var16);
125114
C_0x40e_0: *(uint32_t*)(esp)=eax;
126115
C_0x411_0: esp-=4; f__L_0x3c6_0(); esp+=4;
127116
uint32_t eax2=eax;
128-
assert(eax2==eax1);
129-
#endif
117+
__CPROVER_assert(eax2 == eax1, "");
130118
L_0x416_0: esp=ebp;
131119
L_0x416_1: ebp=*(uint32_t*)(esp);
132120
L_0x416_2: esp+=0x4;

regression/cbmc/Pointer_Arithmetic12/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CORE
2-
main.c
2+
main.i
33
--32 --little-endian
44
^EXIT=0$
55
^SIGNAL=0$
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#include <assert.h>
2-
31
int main()
42
{
53
int arrayOfIntegers[] = {1, 2, 3};
@@ -8,6 +6,6 @@ int main()
86
int iFirst=(int)pointer2FirstElem;
97
int iThird=(int)pointer2ThirdElem;
108
int addrDiff = iThird-iFirst;
11-
assert(addrDiff == 2* sizeof(int));
9+
__CPROVER_assert(addrDiff == 2* sizeof(int), "");
1210
return 0;
1311
}

0 commit comments

Comments
 (0)