[compiler-rt] 824d830 - [TSan] Relax pthread introspection-based test

Julian Lettner via llvm-commits llvm-commits at lists.llvm.org
Thu May 12 18:13:39 PDT 2022


Author: Julian Lettner
Date: 2022-05-12T18:13:12-07:00
New Revision: 824d83068efc4dda17b4b33368c1fbd019299171

URL: https://github.com/llvm/llvm-project/commit/824d83068efc4dda17b4b33368c1fbd019299171
DIFF: https://github.com/llvm/llvm-project/commit/824d83068efc4dda17b4b33368c1fbd019299171.diff

LOG: [TSan] Relax pthread introspection-based test

Thread create/destroy events are not guaranteed to belivered on the
parent thread, e.g., output from a CI job:
```
5: THREAD_CREATE 0x7e8000104000, self: 0x1102ebdc0, name: n/a
6: THREAD_START 0x7e8000104000, self: 0x7e8000104000, name: n/a
7: Hello from pthread
8: THREAD_TERMINATE 0x7e8000104000, self: 0x7e8000104000, name: child thread
9: THREAD_DESTROY 0x7e8000104000, self: 0x7e8000104000, name: child thread
```
Here, THREAD_DESTROY is delivered on the thread being destroyed.

rdar://92679941

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 04fa78a7665f5..a52f4dea07bb1 100644
--- a/compiler-rt/test/tsan/Darwin/dyld-insert-libraries.c
+++ b/compiler-rt/test/tsan/Darwin/dyld-insert-libraries.c
@@ -105,9 +105,9 @@ int main() {
 // CHECK: main
 // Ignore TSan background thread.
 // CHECK: THREAD_CREATE
-// CHECK: THREAD_CREATE    [[CHILD:0x[0-9a-f]+]], self: [[MAIN:0x[0-9a-f]+]], name: n/a
+// CHECK: THREAD_CREATE    [[CHILD:0x[0-9a-f]+]]
 // CHECK: THREAD_START     [[CHILD]], self: [[CHILD]], name: n/a
 // CHECK: Hello from pthread
 // CHECK: THREAD_TERMINATE [[CHILD]], self: [[CHILD]], name: child thread
-// CHECK: THREAD_DESTROY   [[CHILD]], self: [[MAIN]]
+// CHECK: THREAD_DESTROY   [[CHILD]]
 // CHECK: Done.


        


More information about the llvm-commits mailing list