[TSan][Darwin] Deflake test
authorJulian Lettner <julian.lettner@apple.com>
Fri, 27 May 2022 17:15:18 +0000 (10:15 -0700)
committerJulian Lettner <julian.lettner@apple.com>
Fri, 27 May 2022 17:19:56 +0000 (10:19 -0700)
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

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

index a52f4de..2e28a23 100644 (file)
@@ -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.