tsan: make the test more robust
currently it episodically fails
the hypothesis it is due to racy race detection algorithm
the sleep should make it more robust


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184752 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/tsan/lit_tests/tiny_race.c b/lib/tsan/lit_tests/tiny_race.c
index 44cc133..1ade8e2 100644
--- a/lib/tsan/lit_tests/tiny_race.c
+++ b/lib/tsan/lit_tests/tiny_race.c
@@ -1,15 +1,21 @@
 // RUN: %clang_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s
 #include <pthread.h>
+#include <unistd.h>
+
 int Global;
+
 void *Thread1(void *x) {
+  sleep(1);
   Global = 42;
   return x;
 }
+
 int main() {
   pthread_t t;
-  pthread_create(&t, NULL, Thread1, NULL);
+  pthread_create(&t, 0, Thread1, 0);
   Global = 43;
-  pthread_join(t, NULL);
+  pthread_join(t, 0);
   return Global;
 }
+
 // CHECK: WARNING: ThreadSanitizer: data race