Skip to content

Commit b6ceb8c

Browse files
Changes to tests
Co-authored-by: Simmo Saan <simmo.saan@gmail.com>
1 parent 0e2522a commit b6ceb8c

8 files changed

Lines changed: 14 additions & 11 deletions

tests/regression/85-narrow_globs/02-state-machine.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// PARAM: --enable ana.int.interval --enable solvers.td3.narrow-globs.enabled
2-
#include <stdlib.h>
2+
#include <pthread.h>
3+
#include <goblint.h>
34

45
int state = 0;
56

tests/regression/85-narrow_globs/07-ctxt-widen.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// PARAM: --enable ana.int.interval_set --set ana.context.gas_value 0 --enable solvers.td3.narrow-globs.enabled
22
// Taken from context gas tests, where the assertions were unknown.
3-
#include <stdio.h>
3+
#include <goblint.h>
44

55
int h(int i)
66
{

tests/regression/85-narrow_globs/08-ctxt-insensitive.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
// PARAM: --set ana.context.callString_length 0 --set "ana.activated[+]" call_string --set ana.ctx_sens "['call_string']" --enable ana.int.interval_set --enable solvers.td3.narrow-globs.enabled
2+
#include <goblint.h>
23

34
int fac(int i) {
45
if (i > 0) {
56
return fac(i - 1) * i;
67
}
7-
assert(i == 0);
8+
__goblint_check(i == 0);
89
return 1;
910
}
1011

tests/regression/85-narrow_globs/12-multiple-growing-updates.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
// PARAM: --enable ana.int.interval_set --enable solvers.td3.narrow-globs.enabled
22
#include <pthread.h>
3+
#include <goblint.h>
34

45
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
56
int glob = 0;
67
int glob2 = 0;
78

8-
void *thread(void *d) {
9+
void *thread(void *d) {
910
for(int i = 0; i < 10; i++) {
1011
pthread_mutex_lock(&mutex);
1112
glob = i;

tests/regression/85-narrow_globs/13-threaded-ctxt-widen.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
// PARAM: --enable ana.int.interval_set --set ana.context.gas_value 0 --enable solvers.td3.narrow-globs.enabled
22
#include <pthread.h>
3+
#include <goblint.h>
34

45
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
56
int glob = 0;
67
int glob2 = 0;
78

8-
void *thread(void *d) {
9+
void *thread(void *d) {
910
f(10);
1011
return NULL;
1112
}

tests/regression/85-narrow_globs/14-widening-thresholds.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// PARAM: --enable ana.int.interval --enable ana.int.interval_threshold_widening --set ana.int.interval_threshold_widening_constants comparisons --enable solvers.td3.narrow-globs.enabled
22
#include <pthread.h>
3+
#include <goblint.h>
34

4-
//TODO: this tests that threshold widening also narrows correctly. This should not be in this folder
55
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
66
int glob = 0;
77

tests/regression/85-narrow_globs/15-intertwined_increment.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// PARAM: --enable ana.int.interval --enable solvers.td3.narrow-globs.enabled
1+
// PARAM: --enable ana.int.interval --enable solvers.td3.narrow-globs.enabled
22
#include <pthread.h>
3-
#include <stdio.h>
3+
#include <goblint.h>
44

55
int a, b;
66
pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER;

tests/regression/85-narrow_globs/16-cyclic-dependency-guarded.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// PARAM: --enable solvers.td3.narrow-globs.enabled --set solvers.td3.narrow-globs.narrow-gas 9 --enable ana.int.interval --set ana.base.privatization protection-read --enable ana.base.priv.protection.changes-only
2-
3-
// This is supposed to check if the solver terminates
2+
// NOTIMEOUT
43
#include <pthread.h>
54
#include <goblint.h>
65

@@ -32,4 +31,4 @@ int main(void) {
3231
__goblint_check(b <= 10);
3332
pthread_mutex_unlock(&mutex);
3433
return 0;
35-
}
34+
}

0 commit comments

Comments
 (0)