[compiler-rt] 8e724ad - [TSan][Darwin] Deflake test

Julian Lettner via llvm-commits llvm-commits at lists.llvm.org
Fri May 27 10:20:02 PDT 2022


Author: Julian Lettner
Date: 2022-05-27T10:19:56-07:00
New Revision: 8e724ad96565de7f91d7d9f89c24d0086086a903

URL: https://github.com/llvm/llvm-project/commit/8e724ad96565de7f91d7d9f89c24d0086086a903
DIFF: https://github.com/llvm/llvm-project/commit/8e724ad96565de7f91d7d9f89c24d0086086a903.diff

LOG: [TSan][Darwin] Deflake test

The asserted order of THREAD_DESTROY and end of main() is not
guaranteed:
```
 7: Hello from pthread
 8: THREAD_TERMINATE 0x7e8000104000, self: 0x7e8000104000, name: child thread
 9: Done.
10: THREAD_DESTROY 0x7e8000104000, self: 0x7e8000104000, name: child thread
```

Resulting in:
```
error: CHECK: expected string not found in input
// CHECK: Done.
```

Remove checking for "Done." (end of main()) to deflake this test.
Alternatively, we could use `CHECK-DAG`.

rdar://94036145

Added: 
    

Modified: 
    compiler-rt/test/tsan/Darwin/dyld-insert-libraries.c

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/tsan/Darwin/dyld-insert-libraries.c b/compiler-rt/test/tsan/Darwin/dyld-insert-libraries.c
index a52f4dea07bb1..2e28a23c227bc 100644
--- a/compiler-rt/test/tsan/Darwin/dyld-insert-libraries.c
+++ b/compiler-rt/test/tsan/Darwin/dyld-insert-libraries.c
@@ -110,4 +110,3 @@ int main() {
 // CHECK: Hello from pthread
 // CHECK: THREAD_TERMINATE [[CHILD]], self: [[CHILD]], name: child thread
 // CHECK: THREAD_DESTROY   [[CHILD]]
-// CHECK: Done.


        


More information about the llvm-commits mailing list