Skip to content

[build-script] Add --parallel to supress output on success#261

Merged
benlangmuir merged 2 commits intoswiftlang:masterfrom
benlangmuir:parallel
Apr 8, 2020
Merged

[build-script] Add --parallel to supress output on success#261
benlangmuir merged 2 commits intoswiftlang:masterfrom
benlangmuir:parallel

Conversation

@benlangmuir
Copy link
Copy Markdown
Contributor

It's slightly faster and it helps supress the test output when tests
succeed (which avoids false positives in Jenkins' error regexes, for
example the error from "let pack" in a test).

@benlangmuir
Copy link
Copy Markdown
Contributor Author

@swift-ci please test

It's slightly faster and it helps supress the test output when tests
succeed (which avoids false positives in Jenkins' error regexes, for
example the error from "let pack" in a test).
@benlangmuir
Copy link
Copy Markdown
Contributor Author

@swift-ci please test

1 similar comment
@benlangmuir
Copy link
Copy Markdown
Contributor Author

@swift-ci please test

@benlangmuir
Copy link
Copy Markdown
Contributor Author

@swift-ci please test Linux

@benlangmuir
Copy link
Copy Markdown
Contributor Author

Looks like testCloseRace hangs in waitForExpectations(timeout: 10) on Linux when running with --parallel.

It's polling file descriptors, so probably double close on the FD or something.

* thread #1, name = 'SourceKitLSPPac', stop reason = signal SIGSTOP
    frame #0: 0x00007f389125ccf6 libc.so.6`ppoll + 166
    frame #1: 0x00007f3893b8e36d libFoundation.so`__CFRunLoopServiceFileDescriptors + 285
    frame #2: 0x00007f3893b8a2d1 libFoundation.so`__CFRunLoopRun + 1153
    frame #3: 0x00007f3893b89bc9 libFoundation.so`CFRunLoopRunSpecific + 473
    frame #4: 0x00007f3893ae22c2 libFoundation.so`Foundation.RunLoop.run(mode: Foundation.RunLoop.Mode, before: Foundation.Date) -> Swift.Bool + 210
    frame #5: 0x00007f3893e9be56 libXCTest.so`XCTest.XCTWaiter.wait(for: Swift.Array<XCTest.XCTestExpectation>, timeout: Swift.Double, enforceOrder: Swift.Bool, file: Swift.StaticString, line: Swift.Int) -> XCTest.XCTWaiter.Result + 534
    frame #6: 0x00007f3893ea1218 libXCTest.so`XCTest.XCTestCase.waitForExpectations(timeout: Swift.Double, file: Swift.StaticString, line: Swift.Int, handler: Swift.Optional<(Swift.Optional<Swift.Error>) -> ()>) -> () + 344
  * frame #7: 0x0000560ed8e6deab SourceKitLSPPackageTests.xctest`ConnectionTests.testCloseRace(self=<invalid> @ 0x00007ffff7c77ae0) at ConnectionTests.swift:248:7 [opt]
    frame #8: 0x0000560ed8e75e61 SourceKitLSPPackageTests.xctest`partial apply for thunk for @escaping @callee_guaranteed () -> () [inlined] reabstraction thunk helper from @escaping @callee_guaranteed () -> () to @escaping @callee_guaranteed () -> (@out ()) at <compiler-generated>:0 [opt]
    frame #9: 0x0000560ed8e75e5e SourceKitLSPPackageTests.xctest`partial apply for thunk for @escaping @callee_guaranteed () -> () at <compiler-generated>:0 [opt]
    frame #10: 0x0000560ed8e763c9 SourceKitLSPPackageTests.xctest`reabstraction thunk helper from @escaping @callee_guaranteed () -> () to @escaping @callee_guaranteed () -> (@out ())partial apply forwarder with unmangled suffix ".60" + 9
    frame #11: 0x00007f3893e8bc01 libXCTest.so`partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@out ()) to @escaping @callee_guaranteed () -> () + 17
    frame #12: 0x00007f3893e8bc6c libXCTest.so`partial apply forwarder for closure #1 (XCTest.XCTestCase) throws -> () in XCTest.(test in _3BE257A46ADB477C7BF2D39968B39F9D)<A where A: XCTest.XCTestCase>((A) -> () throws -> ()) -> (XCTest.XCTestCase) throws -> () + 60
    frame #13: 0x00007f3893e8bbe4 libXCTest.so`partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) + 20
    frame #14: 0x00007f3893e7c847 libXCTest.so`partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) + 39
    frame #15: 0x00007f3893e8a597 libXCTest.so`XCTest.XCTestCase.invokeTest() -> () + 55
    frame #16: 0x00007f3893e8a2d6 libXCTest.so`XCTest.XCTestCase.perform(XCTest.XCTestRun) -> () + 150
    frame #17: 0x00007f3893e8df56 libXCTest.so`XCTest.XCTest.run() -> () + 150
    frame #18: 0x00007f3893e8c1f0 libXCTest.so`XCTest.XCTestSuite.perform(XCTest.XCTestRun) -> () + 160
    frame #19: 0x00007f3893e8df56 libXCTest.so`XCTest.XCTest.run() -> () + 150
    frame #20: 0x00007f3893e8c1f0 libXCTest.so`XCTest.XCTestSuite.perform(XCTest.XCTestRun) -> () + 160
    frame #21: 0x00007f3893e8df56 libXCTest.so`XCTest.XCTest.run() -> () + 150
    frame #22: 0x00007f3893e88d4a libXCTest.so`XCTest.XCTMain(_: Swift.Array<(testCaseClass: XCTest.XCTestCase.Type, allTests: Swift.Array<(Swift.String, (XCTest.XCTestCase) throws -> ())>)>, arguments: Swift.Array<Swift.String>) -> Swift.Never + 1482
    frame #23: 0x00007f3893e88779 libXCTest.so`XCTest.XCTMain(Swift.Array<(testCaseClass: XCTest.XCTestCase.Type, allTests: Swift.Array<(Swift.String, (XCTest.XCTestCase) throws -> ())>)>) -> Swift.Never + 25
    frame #24: 0x0000560ed90466ed SourceKitLSPPackageTests.xctest`main at LinuxMain.swift:20:1 [opt]
    frame #25: 0x00007f3891169b97 libc.so.6`__libc_start_main + 231
    frame #26: 0x0000560ed8c0a26a SourceKitLSPPackageTests.xctest`_start + 42

Close the fd via the FileHandle rather than directly on the file
descriptor so that it does not get closed again when the pipe is
released. Fixes running test in parallel on Linux.
@benlangmuir
Copy link
Copy Markdown
Contributor Author

@swift-ci please test

1 similar comment
@benlangmuir
Copy link
Copy Markdown
Contributor Author

@swift-ci please test

@benlangmuir
Copy link
Copy Markdown
Contributor Author

@swift-ci please test macOS

@benlangmuir benlangmuir merged commit 233db3b into swiftlang:master Apr 8, 2020
@benlangmuir benlangmuir deleted the parallel branch April 8, 2020 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant