Skip to content

Commit 52382b2

Browse files
author
Julian Lettner
committed
[Sanitizer] Deflake TSan test
This test does: ``` race() print("Done!") // CHECK: ThreadSanitizer: data race // CHECK: Done! ``` We see some recent cases where the output of the test binary on iOS devices was: ``` Done! ================== WARNING: ThreadSanitizer: data race … ``` So apparently the TSan report output is not guaranteed to be printed before "Done!". Maybe this is because we print "Done!" on stdout and the sanitizer report on stderr? The remaining question is: what changed that we are seeing this issue now, but not previously? rdar://99713724 (cherry picked from commit 35c7c41)
1 parent 3a943ba commit 52382b2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/Sanitizers/tsan/libdispatch.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,5 @@ for _ in 1...10 {
4949

5050
print("Done!")
5151

52-
// CHECK: ThreadSanitizer: data race
53-
// CHECK: Done!
52+
// CHECK-DAG: ThreadSanitizer: data race
53+
// CHECK-DAG: Done!

0 commit comments

Comments
 (0)