#51371 fixed failing test in iossimulator#63877
Conversation
|
Tagging subscribers to this area: @dotnet/area-system-io Issue Detailsnull
|
|
/azp run runtime-manual |
|
Commenter does not have sufficient privileges for PR 63877 in repo dotnet/runtime |
|
/azp run runtime-manual |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run runtime-manual |
|
Azure Pipelines successfully started running 1 pipeline(s). |
| [ActiveIssue("https://github.com/dotnet/runtime/issues/51371", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)] | ||
| public void SearchPatternCaseSensitive() | ||
| { | ||
| if (RuntimeInformation.RuntimeIdentifier.StartsWith("iossimulator") |
There was a problem hiding this comment.
Should we add a property to https://github.com/dotnet/runtime/blob/main/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs and use it in the condition instead?
src/libraries/Common/tests/TestUtilities/System/IO/FileCleanupTestBase.cs
Outdated
Show resolved
Hide resolved
|
|
||
| [ConditionalFact] | ||
| [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotRunningOnMacOS))] | ||
| [PlatformSpecific(CaseSensitivePlatforms)] |
There was a problem hiding this comment.
Would it make more sense to expand upon CaseSensitivePlatforms?
There was a problem hiding this comment.
Expanded IsCaseSensitiveOS.
|
/azp run runtime-manual |
|
|
||
| internal static string GetPipePath(string serverName, string pipeName) | ||
| { | ||
| if (RuntimeInformation.RuntimeIdentifier.StartsWith("iossimulator") |
There was a problem hiding this comment.
You don't need the logic here, this file is not included in simulator builds
| protected FileCleanupTestBase(string tempDirectory = null) | ||
| { | ||
| tempDirectory ??= Path.GetTempPath(); | ||
| tempDirectory ??= PlatformDetection.IsCaseSensitiveOS ? Path.GetTempPath() : "/tmp/"; |
There was a problem hiding this comment.
I would expect GetTempPath to work in all cases. Did you find otherwise?
There was a problem hiding this comment.
For iossimulator I get exception in IOSServices.GetPath function rootPath is long and I see in logs [Assert.Equal() Failure\nExpected: 257\nActual: 248]] for several test cases. After this change exception is not happening.
There was a problem hiding this comment.
Can you look at extending
? For OSX, I believe the max path length is 1024 and the max length of a file name is 255.There was a problem hiding this comment.
Changed it to 1016 (bigger values are throwing path too long exception) when it is not windows.
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
| if (RuntimeInformation.RuntimeIdentifier.StartsWith("iossimulator") | ||
| || RuntimeInformation.RuntimeIdentifier.StartsWith("tvossimulator")) | ||
| { | ||
| return $"/tmp/{pipeName}"; |
There was a problem hiding this comment.
I'm not sure why this is needed?
There was a problem hiding this comment.
In case of simulators in UnixDomainSocketEndPoint there was ArgumentOutOfRangeException. I added this to make path length shorter because s_nativePathLength is 104 (in UnixDomainSocketEndPoint) and by previous implementation path length is 255.
There was a problem hiding this comment.
Removed that part. Find out in FileCleanupTestBase path was wrong for osx, updated that.
…leCleanupTestBase.cs
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
steveisok
left a comment
There was a problem hiding this comment.
The windows failures look unrelated.
|
Cryptography tests are sometimes hanging on Windows due to an OS issue. @bartonjs do we have a tracking issue or something? |
|
@danmoseley Ooh, we've started testing on Win11... how fancy :) I haven't seen an issue in dotnet/runtime talking about it (this is the first mention I had that the problem was seen in CI, vs just on a few individuals' machines). I have the Windows OS bug for it, but since those aren't useful to non-employees I generally don't think it's appropriate to post them here. |
Fixes #51371
For CaseSensitive tests added check if they are running on ios/tvos_simulators or MacCatalyst.
Changed GetPipePath() and GetPath() for ios/tvos_simulator as they were too long and there was ArgumentOutOfRange exception