Skip to content

BuildCommandSwiftBuildTests.testParseableInterfaces fails on AmazonLinux2 #8545

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task done
bkhouri opened this issue Apr 22, 2025 · 3 comments
Closed
1 task done
Labels
bug linux swift build Changes impacting `swift build` test suite improvements to SwiftPM test suite

Comments

@bkhouri
Copy link
Contributor

bkhouri commented Apr 22, 2025

Is it reproducible with SwiftPM command-line tools: swift build, swift test, swift package etc?

  • Confirmed reproduction steps with SwiftPM CLI. The description text must include reproduction steps with either of command-line SwiftPM commands, swift build, swift test, swift package etc.

Description

The BuildCommandSwiftBuildTests.testParseableInterfaces test fails on Amazon Linux 2. We should look to re-enable the test.

The following OSS build failed.
https://ci.swift.org/job/oss-swift-package-amazon-linux-2/4172/

Expected behavior

The BuildCommandSwiftBuildTests.testParseableInterfaces test passed on Amazon Linux 2

Actual behavior

Test Suite 'Selected tests' started at 2025-04-21 10:50:42.694
Test Suite 'BuildCommandSwiftBuildTests' started at 2025-04-21 10:50:42.696
Test Case 'BuildCommandSwiftBuildTests.testParseableInterfaces' started at 2025-04-21 10:50:42.696
/home/build-user/swiftpm/Tests/CommandsTests/BuildCommandTests.swift:868: error: BuildCommandSwiftBuildTests.testParseableInterfaces : failed - error: working-directory unsupported on this platform
error: working-directory unsupported on this platform
error: Build failed

Test Case 'BuildCommandSwiftBuildTests.testParseableInterfaces' failed (1.944 seconds)
Test Suite 'BuildCommandSwiftBuildTests' failed at 2025-04-21 10:50:44.640
	 Executed 1 test, with 1 failure (0 unexpected) in 1.944 (1.944) seconds
Test Suite 'Selected tests' failed at 2025-04-21 10:50:44.640
	 Executed 1 test, with 1 failure (0 unexpected) in 1.944 (1.944) seconds

Steps to reproduce

N/A

Swift Package Manager version/commit hash

Observed in OSS CI failure

Swift & OS version (output of swift --version ; uname -a)

Observed on OSS CI build failure: https://ci.swift.org/job/oss-swift-package-amazon-linux-2/

@bkhouri bkhouri added bug linux swift build Changes impacting `swift build` test suite improvements to SwiftPM test suite labels Apr 22, 2025
@kcieplak
Copy link
Contributor

The issue here is that the test is causing swift-build to create a new task, with a different working directory based on the SWIFT_EMIT_MODULE_INTERFACE build setting being set. This ends up with llbuild reporting an error "working-directory unsupported on this platform" as amazon linux does not support thread safe working directories.
https://github.com/swiftlang/swift-llbuild/blob/0ee5a9d496ad3dd36eaf85bde30e120d5fbbdccb/lib/Basic/Subprocess.cpp#L927

This change enabled the test which was previously skipped unconditionally, unfortunately the PR builds only build on one flavour of linux, so the issue was not caught.
The fix will simply be to skip this test on Amazon Linux, similar to many tests in swift-build. (edited)

@kcieplak
Copy link
Contributor

Fixed by #8546

@dschaefer2
Copy link
Member

@kcieplak says it's fixed :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug linux swift build Changes impacting `swift build` test suite improvements to SwiftPM test suite
Projects
None yet
Development

No branches or pull requests

3 participants