Skip to content

Commit fe684d7

Browse files
committed
[Concurrency] adjust custom_executors_complex_equality_crash.swift for swift6/legacy modes
1 parent f15da4a commit fe684d7

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

test/Concurrency/Runtime/custom_executors_complex_equality_crash.swift

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
// RUN: %target-run-simple-swift( -Xfrontend -disable-availability-checking %import-libdispatch -parse-as-library)
1+
// NOT: %target-run-simple-swift( -Xfrontend -disable-availability-checking %import-libdispatch -parse-as-library)
2+
3+
// RUN: %empty-directory(%t)
4+
// RUN: %target-build-swift -Xfrontend -disable-availability-checking -parse-as-library %s -o %t/a.out
5+
// RUN: %target-codesign %t/a.out
6+
// RUN: %env-SWIFT_IS_CURRENT_EXECUTOR_LEGACY_MODE_OVERRIDE=legacy %target-run %import-libdispatch %t/a.out
7+
// RUN: %env-SWIFT_IS_CURRENT_EXECUTOR_LEGACY_MODE_OVERRIDE=swift6 %target-run %import-libdispatch %t/a.out
8+
29

310
// REQUIRES: concurrency
411
// REQUIRES: executable_test
@@ -7,7 +14,7 @@
714
// rdar://106849189 move-only types should be supported in freestanding mode
815
// UNSUPPORTED: freestanding
916

10-
// rdar://119743909 fails in optimze tests.
17+
// rdar://119743909 fails in optimized tests.
1118
// UNSUPPORTED: swift_test_mode_optimize
1219
// UNSUPPORTED: swift_test_mode_optimize_size
1320

@@ -86,9 +93,9 @@ struct Runner {
8693
await actor.test(expectedExecutor: two)
8794
}
8895
tests.test("isSameExclusiveContext=false, causes same executor checks to crash") {
89-
expectCrashLater(withMessage: "Precondition failed: Incorrect actor executor assumption; " +
90-
"Expected 'NaiveQueueExecutor(unknown)' executor. " +
91-
"Expected deep equality to trigger for ")
96+
// In Swift6 mode the error message for the crash depends on dispatch, so it is lower
97+
// quality than our specialized messages; We cannot assert on the text since we run in both modes.
98+
expectCrashLater()
9299

93100
let unknown = NaiveQueueExecutor(name: "unknown", DispatchQueue(label: "unknown"))
94101
let actor = MyActor(executor: one)

0 commit comments

Comments
 (0)