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:
Dmitry Vyukov 2013-11-21 12:23:17 +00:00
parent 1bdf5c93e1
commit 5f1a783914
2 changed files with 3 additions and 0 deletions

View File

@ -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;
}

View File

@ -4,6 +4,7 @@
#include <unistd.h>
void *Thread2(void *a) {
sleep(1);
*(int*)a = 43;
return 0;
}