[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
This commit is contained in:
Julian Lettner 2022-05-12 18:03:05 -07:00
parent 8a0fb965f6
commit 824d83068e
1 changed files with 2 additions and 2 deletions

View File

@ -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.