Skip to content

Commit e42fd92

Browse files
committed
SwiftReflectionTest: Don't exit until the parent asks for an instance
Child processes were exiting too early before the parent has a chance to read a null pointer from the child, indicating that there are no more instances to reflect. This wasn't a problem on OS X because the I/O latency is so small compared to the iOS simulator, where the problem would come up under heavy load. This makes the end-to-end remote mirror tests deterministic again. rdar://problem/26230879
1 parent 838b12e commit e42fd92

File tree

4 files changed

+1
-10
lines changed

4 files changed

+1
-10
lines changed

stdlib/private/SwiftReflectionTest/SwiftReflectionTest.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ public func reflect(function: () -> ()) {
418418
/// Call this function to indicate to the parent that there are
419419
/// no more instances to look at.
420420
public func doneReflecting() {
421-
sendValue(InstanceKind.None.rawValue)
421+
reflect(instanceAddress: UInt(InstanceKind.None.rawValue), kind: .None)
422422
}
423423

424424
/* Example usage

validation-test/Reflection/example.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
// RUN: %target-run %target-swift-reflection-test %t/example | FileCheck %s --check-prefix=CHECK-%target-ptrsize
44
// REQUIRES: objc_interop
55

6-
// rdar://problem/26230879
7-
// REQUIRES: OS=macosx
8-
96
import SwiftReflectionTest
107

118
class Container {

validation-test/Reflection/existentials.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
// RUN: %target-run %target-swift-reflection-test %t/existentials | FileCheck %s --check-prefix=CHECK-%target-ptrsize
44
// REQUIRES: objc_interop
55

6-
// rdar://problem/26230879
7-
// REQUIRES: OS=macosx
8-
96
/*
107
This file pokes at the swift_reflection_projectExistential API
118
of the SwiftRemoteMirror library.

validation-test/Reflection/functions.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
// RUN: %target-run %target-swift-reflection-test %t/functions 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
44
// REQUIRES: objc_interop
55

6-
// rdar://problem/26230879
7-
// REQUIRES: OS=macosx
8-
96
/*
107
This file pokes at the swift_reflection_infoForInstance() API
118
of the SwiftRemoteMirror library.

0 commit comments

Comments
 (0)