[compiler-rt] 2f6f24f - tsan: re-enable mmap_stress.cpp test

Dmitry Vyukov via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 24 00:48:43 PDT 2021


Author: Dmitry Vyukov
Date: 2021-06-24T09:48:34+02:00
New Revision: 2f6f24f0107c2f541297a4a0b365d862142d75e5

URL: https://github.com/llvm/llvm-project/commit/2f6f24f0107c2f541297a4a0b365d862142d75e5
DIFF: https://github.com/llvm/llvm-project/commit/2f6f24f0107c2f541297a4a0b365d862142d75e5.diff

LOG: tsan: re-enable mmap_stress.cpp test

The comment says it was flaky in 2016,
but it wasn't possible to debug it back then.
Re-enable the test at least on linux/x86_64.
It will either work, or at least we should
see failure output from lit today.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D104592

Added: 
    

Modified: 
    compiler-rt/test/tsan/mmap_stress.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/tsan/mmap_stress.cpp b/compiler-rt/test/tsan/mmap_stress.cpp
index f272779a49b96..c6fd8f02dd1d9 100644
--- a/compiler-rt/test/tsan/mmap_stress.cpp
+++ b/compiler-rt/test/tsan/mmap_stress.cpp
@@ -1,4 +1,9 @@
 // RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
+// This test is flaky on several builders:
+// https://groups.google.com/d/msg/llvm-dev/KUFPdLhBN3Q/L75rwW9xBgAJ
+// The cause is unknown (lit hides test output on failures).
+// Let's try to re-enable it at least in one configutaion.
+// REQUIRES: linux, x86_64-target-arch
 #include "test.h"
 #include <errno.h>
 #include <sys/mman.h>
@@ -47,10 +52,6 @@ void *Worker(void *arg) {
 }
 
 int main() {
-  // This test is flaky on several builders:
-  // https://groups.google.com/d/msg/llvm-dev/KUFPdLhBN3Q/L75rwW9xBgAJ
-  // The cause is unknown (lit hides test output on failures).
-#if 0
   pthread_t th[4];
   for (int i = 0; i < 4; i++) {
     if (pthread_create(&th[i], 0, Worker, 0))
@@ -60,7 +61,6 @@ int main() {
     if (pthread_join(th[i], 0))
       exit(printf("pthread_join failed: %d\n", errno));
   }
-#endif
   fprintf(stderr, "DONE\n");
 }
 


        


More information about the llvm-commits mailing list