Skip to content

Commit 3541779

Browse files
author
Peter Schrammel
committed
regression tests for diffblue#123
1 parent 151bded commit 3541779

File tree

6 files changed

+102
-0
lines changed

6 files changed

+102
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#include <pthread.h>
2+
#include <assert.h>
3+
4+
int s[2];
5+
6+
void* thread_0(void* arg)
7+
{
8+
s[0] = 2;
9+
assert(s[0] == 2);
10+
return NULL;
11+
}
12+
13+
void* thread_1(void* arg)
14+
{
15+
s[1] = 1;
16+
assert(s[1] == 1);
17+
return NULL;
18+
}
19+
20+
int main(void)
21+
{
22+
pthread_t thread0, thread1;
23+
pthread_create(&thread0, NULL, thread_0, 0);
24+
pthread_create(&thread1, NULL, thread_1, 0);
25+
return 0;
26+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
main.c
3+
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^VERIFICATION SUCCESSFUL$
7+
--
8+
^warning: ignoring
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#include <pthread.h>
2+
#include <assert.h>
3+
4+
int f0, f1;
5+
6+
void* thread_0(void* arg)
7+
{
8+
f0 = 2;
9+
assert(f0 == 2);
10+
return NULL;
11+
}
12+
13+
void* thread_1(void* arg)
14+
{
15+
f1 = 1;
16+
assert(f1 == 1);
17+
return NULL;
18+
}
19+
20+
int main(void)
21+
{
22+
pthread_t thread0, thread1;
23+
pthread_create(&thread0, NULL, thread_0, 0);
24+
pthread_create(&thread1, NULL, thread_1, 0);
25+
return 0;
26+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
main.c
3+
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^VERIFICATION SUCCESSFUL$
7+
--
8+
^warning: ignoring
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#include <pthread.h>
2+
#include <assert.h>
3+
4+
struct { int f0; int f1; } s;
5+
6+
void* thread_0(void* arg)
7+
{
8+
s.f0 = 2;
9+
assert(s.f0 == 2);
10+
return NULL;
11+
}
12+
13+
void* thread_1(void* arg)
14+
{
15+
s.f1 = 1;
16+
assert(s.f1 == 1);
17+
return NULL;
18+
}
19+
20+
int main(void)
21+
{
22+
pthread_t thread0, thread1;
23+
pthread_create(&thread0, NULL, thread_0, 0);
24+
pthread_create(&thread1, NULL, thread_1, 0);
25+
return 0;
26+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
main.c
3+
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^VERIFICATION SUCCESSFUL$
7+
--
8+
^warning: ignoring

0 commit comments

Comments
 (0)