Skip to content

Disable TestFileManager.test_emptyFilename on Windows #5124

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

Merged
merged 1 commit into from
Nov 1, 2024

Conversation

jrflat
Copy link
Contributor

@jrflat jrflat commented Oct 28, 2024

TestFileManager.test_emptyFilename has been failing flakily on Windows with the following error:

TestFoundation/TestFileManager.swift:1361: error: TestFileManager.test_emptyFilename : XCTAssertEqual failed: ("Optional(FoundationEssentials.CocoaError.Code(rawValue: 512))") is not equal to ("Optional(FoundationEssentials.CocoaError.Code(rawValue: 4))")

This test itself does not create /tmp or /tmp/t, so it's suspected that another test might be creating one of these (or perhaps these files existed previously), changing the error thrown. This PR changes usage of /tmp/t to a unique, non-existent file name /test_emptyFilename_nonExistent instead.

Update: That did not fix the issue, so we're disabling the test while we continue to investigate.

@jrflat
Copy link
Contributor Author

jrflat commented Oct 28, 2024

@swift-ci please test

@parkera
Copy link
Contributor

parkera commented Oct 28, 2024

Similar tests sometimes append a UUID string to make sure we're not conflicting with anything else, but this seems like a fine start.

@jrflat
Copy link
Contributor Author

jrflat commented Oct 29, 2024

Looks like the Windows error is unrelated:

# | C:\Users\swift-ci\jenkins\workspace\swift-corelibs-foundation-PR-windows\swift\test\Interop\Cxx\class\method\inreg-sret.swift:27:18: error: CHECK-x86_64: expected string not found in input
# | // CHECK-x86_64: define {{.*}} void @"?getFirstBlock@BridgedFunction@@QEBA?AUOptionalBridgedBasicBlock@@XZ"(ptr {{.*}} %{{.*}}, ptr noalias sret(%struct.OptionalBridgedBasicBlock) {{.*}} %{{.*}})
# |                  ^
# | <stdin>:152:169: note: scanning from here
# |  call void @"?getFirstBlock@BridgedFunction@@QEBA?AUOptionalBridgedBasicBlock@@XZ"(ptr %1, ptr noalias nocapture sret(%TSo25OptionalBridgedBasicBlockV) %call.aggresult)

@jrflat
Copy link
Contributor Author

jrflat commented Oct 29, 2024

@swift-ci please test Windows Platform

@jrflat
Copy link
Contributor Author

jrflat commented Oct 29, 2024

The fix for that error is now merged in swift

@jrflat
Copy link
Contributor Author

jrflat commented Oct 29, 2024

@swift-ci please test Windows Platform

@jrflat
Copy link
Contributor Author

jrflat commented Oct 30, 2024

This didn't fix the failure. I still haven't been able to reproduce locally, only in CI. I'll add some logging to this PR to debug.

@jrflat jrflat marked this pull request as draft October 30, 2024 16:22
@jrflat
Copy link
Contributor Author

jrflat commented Oct 30, 2024

@swift-ci please test Windows Platform

@jrflat
Copy link
Contributor Author

jrflat commented Oct 30, 2024

@swift-ci please test

@jrflat
Copy link
Contributor Author

jrflat commented Oct 30, 2024

@swift-ci please test Windows Platform

@jrflat jrflat force-pushed the empty-path-filemanager-test branch from 0f26415 to 1dd1008 Compare October 31, 2024 17:56
@jrflat jrflat changed the title Fix flaky TestFileManager.test_emptyFilename on Windows Disable TestFileManager.test_emptyFilename on Windows Oct 31, 2024
@jrflat
Copy link
Contributor Author

jrflat commented Oct 31, 2024

I'm disabling the test to unblock Windows CI. I can reproduce readily in a swift-foundation PR to debug.

@jrflat jrflat marked this pull request as ready for review October 31, 2024 17:58
@jrflat
Copy link
Contributor Author

jrflat commented Oct 31, 2024

@swift-ci please test

@jrflat
Copy link
Contributor Author

jrflat commented Oct 31, 2024

@swift-ci please test Windows Platform

@jrflat jrflat force-pushed the empty-path-filemanager-test branch from 1dd1008 to 867775f Compare October 31, 2024 23:04
@jrflat
Copy link
Contributor Author

jrflat commented Oct 31, 2024

@swift-ci please test

@jrflat
Copy link
Contributor Author

jrflat commented Oct 31, 2024

@swift-ci please test Windows Platform

1 similar comment
@jrflat
Copy link
Contributor Author

jrflat commented Nov 1, 2024

@swift-ci please test Windows Platform

@jrflat jrflat merged commit 974106b into swiftlang:main Nov 1, 2024
2 checks passed
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.

3 participants