[compiler-rt] r217870 - [asan] De-flake one test.

Evgeniy Stepanov eugeni.stepanov at gmail.com
Tue Sep 16 05:03:53 PDT 2014


Author: eugenis
Date: Tue Sep 16 07:03:52 2014
New Revision: 217870

URL: http://llvm.org/viewvc/llvm-project?rev=217870&view=rev
Log:
[asan] De-flake one test.

This change replaces an in-test timeout with an unconditional blocking wait.
It speeds up normal execution significantly at the cost of hanging up indefinitely
in case of a failure. This is a very specific regression test and we don't
expect any failures in the future.

Another approach ould be increasing the timeout to ~8 seconds, which seems too
much for a lit test.

Modified:
    compiler-rt/trunk/test/msan/fork.cc

Modified: compiler-rt/trunk/test/msan/fork.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/msan/fork.cc?rev=217870&r1=217869&r2=217870&view=diff
==============================================================================
--- compiler-rt/trunk/test/msan/fork.cc (original)
+++ compiler-rt/trunk/test/msan/fork.cc Tue Sep 16 07:03:52 2014
@@ -70,8 +70,8 @@ void test() {
   if (pid) {
     // parent
     __atomic_store_n(&done, 1, __ATOMIC_RELAXED);
-    usleep(1000000);
-    kill(pid, SIGKILL);
+    pid_t p;
+    while ((p = wait(NULL)) == -1) {  }
   } else {
     // child
     child();





More information about the llvm-commits mailing list