Skip to content

Commit 2cc0ff5

Browse files
author
Daniel Kroening
committed
test from Lucas
1 parent 9bf80da commit 2cc0ff5

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#include <assert.h>
2+
#include <pthread.h>
3+
#include <stdlib.h>
4+
5+
unsigned long data[2];
6+
7+
void *thread0(void *arg)
8+
{
9+
data[0] = 1;
10+
return NULL;
11+
}
12+
13+
void *thread1(void *arg)
14+
{
15+
data[1] = 1;
16+
return NULL;
17+
}
18+
19+
int main(int argc, char *argv[])
20+
{
21+
pthread_t t0;
22+
pthread_t t1;
23+
24+
pthread_create(&t0, NULL, thread0, NULL);
25+
pthread_create(&t1, NULL, thread1, NULL);
26+
pthread_join(t0, NULL);
27+
pthread_join(t1, NULL);
28+
29+
assert(data[0] == 1);
30+
assert(data[1] == 1);
31+
32+
return 0;
33+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
KNOWNBUG
2+
main.c
3+
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^VERIFICATION SUCCESSFUL$
7+
--
8+
^warning: ignoring

0 commit comments

Comments
 (0)