Skip to content

Exit tests crash main process on Windows (testing fails) #1209

Closed
@jmschonfeld

Description

@jmschonfeld

Description

When enabling exit tests on Windows, the tests fail indicating that swift.exe unexpectedly exited:

Error: Process completed with exit code 1.

Reproduction

We're seeing this with any exit test we enable on Windows, to reproduce simply create a test that uses #expect(processExitsWith: .failure) and testing will fail with this message

Expected behavior

I'd expect tests to succeed and not crash (except for the expected crashing code) on Windows like the other platforms

Environment

https://github.com/swiftlang/swift-foundation/actions/runs/16126481664/job/45504492458?pr=1406

Swift version 6.2-dev (LLVM 3c4a54b02dd62b7, Swift a40a7be6945a895)
Target: x86_64-unknown-windows-msvc
Build config: +assertions
→ Testing Library Version: 6.3-dev (25b61ef4667a6d1)

Additional information

Note that the same exit tests in https://github.com/swiftlang/swift-foundation/actions/runs/16126481664?pr=1406 pass on Linux and macOS but hit this issue on Windows. I've also tried to reproduce locally on an arm64 Windows VM and have not reproduced so it may be specific to Intel Windows. I've also tried to reproduce with the swift-testing package dependency and it did not reproduce, so it may be specific to the toolchain swift-testing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug🪲 Something isn't workingexit-tests☠️ Work related to exit testswindows🪟 Windows support

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions