forked from OSchip/llvm-project
tsan: deflake tests
the tests produce episodic flakes the hypothesis is that it's due to our "racy" race detection algorithm sleeps should remove the flakes llvm-svn: 195351
This commit is contained in:
parent
1bdf5c93e1
commit
5f1a783914
|
@ -1,8 +1,10 @@
|
|||
// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s
|
||||
#include <pthread.h>
|
||||
#include <stddef.h>
|
||||
#include <unistd.h>
|
||||
|
||||
void *Thread(void *a) {
|
||||
sleep(1);
|
||||
*(int*)a = 43;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include <unistd.h>
|
||||
|
||||
void *Thread2(void *a) {
|
||||
sleep(1);
|
||||
*(int*)a = 43;
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue