Skip to content

Commit 9278728

Browse files
committed
Enhance NSConditionLock crash test
1 parent 0f0fb5a commit 9278728

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Tests/SignalHandlingTests/LockTest.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,16 @@ import XCTest
66
final class NSConditionLockTest : XCTestCase {
77

88
func testNSConditionLock() throws {
9+
/* https://bugs.swift.org/browse/SR-14676 */
910
// Thread(block: { NSConditionLock(condition: 0).lock(whenCondition: 1) }).start()
1011
Thread.sleep(forTimeInterval: 0.1)
1112

1213
#if !os(Linux)
1314
XCTAssert(true)
1415
#else
15-
XCTAssert(false, "This test crashes on Linux for now with Swift 5.4.1 (when the NSConditionLock line is uncommented); when it does not crash there will be something to do in the SwiftHandling code. So we fail the test to remember that.")
16+
/* Apparently XCTExpectFailure does not exist on Linux. */
17+
// XCTExpectFailure("Linux has a crash in NSConditionLock. This test is only here to remember to check if the bug is fixed from time to time (simply uncomment the second line of the test; if test does not crash on Linux we’re good).")
18+
XCTAssert(false, "Linux has a crash in NSConditionLock. This test is only here to remember to check if the bug is fixed from time to time (simply uncomment the second line of the test; if test does not crash on Linux we’re good).")
1619
#endif
1720
}
1821

0 commit comments

Comments
 (0)