Skip to content

Commit 722d790

Browse files
[test] mark multi-thread based tests as UNSUPPORTED in single-thread
Some of test cases assumes that the runtime is built for multi-threaded platform.
1 parent 8e2a7db commit 722d790

File tree

5 files changed

+7
-2
lines changed

5 files changed

+7
-2
lines changed

test/Concurrency/Runtime/cancellation_handler.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// rdar://76038845
66
// REQUIRES: concurrency_runtime
77
// UNSUPPORTED: back_deployment_runtime
8+
// UNSUPPORTED: single_threaded_runtime
89

910
// for sleep
1011
#if canImport(Darwin)

test/Concurrency/Runtime/data_race_detection.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// rdar://76038845
99
// REQUIRES: concurrency_runtime
1010
// UNSUPPORTED: back_deployment_runtime
11+
// UNSUPPORTED: single_threaded_runtime
1112

1213
import _Concurrency
1314
import Dispatch
@@ -58,14 +59,14 @@ actor MyActor {
5859
struct Runner {
5960
static func main() async {
6061
print("Launching a main-actor task")
61-
// CHECK: warning: data race detected: @MainActor function at main/data_race_detection.swift:22 was not called on the main thread
62+
// CHECK: warning: data race detected: @MainActor function at main/data_race_detection.swift:23 was not called on the main thread
6263
launchFromMainThread()
6364
sleep(1)
6465

6566
let actor = MyActor()
6667
let actorFn = await actor.getTaskOnMyActor()
6768
print("Launching an actor-instance task")
68-
// CHECK: warning: data race detected: actor-isolated function at main/data_race_detection.swift:51 was not called on the same actor
69+
// CHECK: warning: data race detected: actor-isolated function at main/data_race_detection.swift:52 was not called on the same actor
6970
launchTask(actorFn)
7071

7172
sleep(1)

test/Concurrency/Runtime/mainactor.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
// rdar://76038845
88
// REQUIRES: concurrency_runtime
99
// UNSUPPORTED: back_deployment_runtime
10+
// UNSUPPORTED: single_threaded_runtime
1011

1112
import Dispatch
1213

test/Interpreter/enforce_exclusive_access.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// RUN: %target-codesign %t/a.out
55
// RUN: %target-run %t/a.out
66
// REQUIRES: executable_test
7+
// UNSUPPORTED: single_threaded_runtime
78

89
// Tests for traps at run time when enforcing exclusive access.
910

validation-test/Runtime/ConcurrentMetadata.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// RUN: %target-run-simple-swift
22
// REQUIRES: executable_test
3+
// UNSUPPORTED: single_threaded_runtime
34

45
// Exercise the metadata cache from multiple threads to shake out any
56
// concurrency bugs.

0 commit comments

Comments
 (0)