Skip to content

Commit 0a0c97a

Browse files
kateinoigakukunMaxDesiatov
authored andcommitted
[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. # Conflicts: # test/Concurrency/Runtime/cancellation_handler.swift # test/Concurrency/Runtime/data_race_detection.swift
1 parent 6b7c366 commit 0a0c97a

File tree

5 files changed

+8
-4
lines changed

5 files changed

+8
-4
lines changed

test/Concurrency/Runtime/cancellation_handler.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
// rdar://76038845
66
// REQUIRES: concurrency_runtime
77
// UNSUPPORTED: back_deployment_runtime
8-
// UNSUPPORTED: OS=windows-msvc
9-
// UNSUPPORTED: OS=wasi
8+
// UNSUPPORTED: single_threaded_runtime
109

1110
// for sleep
1211
#if canImport(Darwin)

test/Concurrency/Runtime/data_race_detection.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// rdar://76038845
99
// REQUIRES: concurrency_runtime
1010
// UNSUPPORTED: back_deployment_runtime
11+
// UNSUPPORTED: single_threaded_runtime
12+
1113
import _Concurrency
1214
import Dispatch
1315

@@ -57,14 +59,14 @@ actor MyActor {
5759
struct Runner {
5860
static func main() async {
5961
print("Launching a main-actor task")
60-
// CHECK: warning: data race detected: @MainActor function at main/data_race_detection.swift:21 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
6163
launchFromMainThread()
6264
sleep(1)
6365

6466
let actor = MyActor()
6567
let actorFn = await actor.getTaskOnMyActor()
6668
print("Launching an actor-instance task")
67-
// CHECK: warning: data race detected: actor-isolated function at main/data_race_detection.swift:50 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
6870
launchTask(actorFn)
6971

7072
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)