swiftlang / swift-corelibs-foundation

The Foundation Project, providing core utilities, internationalization, and OS independence
swift.org
Apache License 2.0
5.29k stars 1.13k forks source link

Disable TestFileManager.test_emptyFilename on Windows #5124

Closed jrflat closed 3 weeks ago

jrflat commented 3 weeks ago

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 commented 3 weeks ago

@swift-ci please test

parkera commented 3 weeks ago

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 commented 3 weeks ago

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 commented 3 weeks ago

@swift-ci please test Windows Platform

jrflat commented 3 weeks ago

The fix for that error is now merged in swift

jrflat commented 3 weeks ago

@swift-ci please test Windows Platform

jrflat commented 3 weeks ago

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 commented 3 weeks ago

@swift-ci please test Windows Platform

jrflat commented 3 weeks ago

@swift-ci please test

jrflat commented 3 weeks ago

@swift-ci please test Windows Platform

jrflat commented 3 weeks ago

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

jrflat commented 3 weeks ago

@swift-ci please test

jrflat commented 3 weeks ago

@swift-ci please test Windows Platform

jrflat commented 3 weeks ago

@swift-ci please test

jrflat commented 3 weeks ago

@swift-ci please test Windows Platform

jrflat commented 3 weeks ago

@swift-ci please test Windows Platform