[compiler-rt] r204824 - tsan: deflake test

Dmitry Vyukov dvyukov at google.com
Wed Mar 26 08:51:11 PDT 2014


Author: dvyukov
Date: Wed Mar 26 10:51:11 2014
New Revision: 204824

URL: http://llvm.org/viewvc/llvm-project?rev=204824&view=rev
Log:
tsan: deflake test

Modified:
    compiler-rt/trunk/test/tsan/halt_on_error.cc

Modified: compiler-rt/trunk/test/tsan/halt_on_error.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/halt_on_error.cc?rev=204824&r1=204823&r2=204824&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/halt_on_error.cc (original)
+++ compiler-rt/trunk/test/tsan/halt_on_error.cc Wed Mar 26 10:51:11 2014
@@ -1,10 +1,12 @@
 // RUN: %clang_tsan -O1 %s -o %t && TSAN_OPTIONS="$TSAN_OPTIONS halt_on_error=1" not %t 2>&1 | FileCheck %s
 #include <pthread.h>
 #include <stdio.h>
+#include <unistd.h>
 
 int X;
 
 void *Thread(void *x) {
+  sleep(1);
   X = 42;
   return 0;
 }





More information about the llvm-commits mailing list