[PATCH] D18476: [tsan] Remove long sleeps from fork tests
Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 7 05:15:59 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL265666: [tsan] Remove long sleeps from fork tests (authored by kuba.brecka).
Changed prior to commit:
http://reviews.llvm.org/D18476?vs=51775&id=52904#toc
Repository:
rL LLVM
http://reviews.llvm.org/D18476
Files:
compiler-rt/trunk/test/tsan/fork_deadlock.cc
compiler-rt/trunk/test/tsan/fork_multithreaded.cc
Index: compiler-rt/trunk/test/tsan/fork_multithreaded.cc
===================================================================
--- compiler-rt/trunk/test/tsan/fork_multithreaded.cc
+++ compiler-rt/trunk/test/tsan/fork_multithreaded.cc
@@ -6,7 +6,7 @@
#include <sys/wait.h>
static void *sleeper(void *p) {
- sleep(10); // not intended to exit during test
+ sleep(1000); // not intended to exit during test
return 0;
}
Index: compiler-rt/trunk/test/tsan/fork_deadlock.cc
===================================================================
--- compiler-rt/trunk/test/tsan/fork_deadlock.cc
+++ compiler-rt/trunk/test/tsan/fork_deadlock.cc
@@ -12,18 +12,10 @@
return 0;
}
-static void *watchdog(void *p) {
- sleep(100); // is not intended to exit
- fprintf(stderr, "timed out after 100 seconds\n");
- exit(1);
- return 0;
-}
-
int main() {
barrier_init(&barrier, 2);
- pthread_t th1, th2;
+ pthread_t th1;
pthread_create(&th1, 0, incrementer, 0);
- pthread_create(&th2, 0, watchdog, 0);
for (int i = 0; i < 10; i++) {
switch (fork()) {
default: // parent
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18476.52904.patch
Type: text/x-patch
Size: 1097 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160407/f77dd468/attachment.bin>
More information about the llvm-commits
mailing list