[compiler-rt] r195913 - tsan: deflake more tests
Dmitry Vyukov
dvyukov at google.com
Thu Nov 28 01:06:56 PST 2013
Author: dvyukov
Date: Thu Nov 28 03:06:55 2013
New Revision: 195913
URL: http://llvm.org/viewvc/llvm-project?rev=195913&view=rev
Log:
tsan: deflake more tests
Modified:
compiler-rt/trunk/lib/tsan/lit_tests/oob_race.cc
compiler-rt/trunk/lib/tsan/lit_tests/race_on_read.cc
Modified: compiler-rt/trunk/lib/tsan/lit_tests/oob_race.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/lit_tests/oob_race.cc?rev=195913&r1=195912&r2=195913&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/lit_tests/oob_race.cc (original)
+++ compiler-rt/trunk/lib/tsan/lit_tests/oob_race.cc Thu Nov 28 03:06:55 2013
@@ -1,10 +1,12 @@
// RUN: %clangxx_tsan -O1 %s -o %t && not %t 2>&1 | FileCheck %s
#include <pthread.h>
#include <stdio.h>
+#include <unistd.h>
const long kOffset = 64*1024;
void *Thread(void *p) {
+ sleep(1);
((char*)p)[-kOffset] = 43;
return 0;
}
Modified: compiler-rt/trunk/lib/tsan/lit_tests/race_on_read.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/lit_tests/race_on_read.cc?rev=195913&r1=195912&r2=195913&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/lit_tests/race_on_read.cc (original)
+++ compiler-rt/trunk/lib/tsan/lit_tests/race_on_read.cc Thu Nov 28 03:06:55 2013
@@ -5,11 +5,13 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
+#include <unistd.h>
int fd;
char buf;
void *Thread(void *x) {
+ sleep(1);
read(fd, &buf, 1);
return NULL;
}
More information about the llvm-commits
mailing list