-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
#51371 fixed failing test in iossimulator #63877
#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). |
public void SearchPatternCaseSensitive() | ||
{ | ||
if (RuntimeInformation.RuntimeIdentifier.StartsWith("iossimulator") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, good idea.
src/libraries/Common/tests/TestUtilities/System/IO/FileCleanupTestBase.cs
Outdated
Show resolved
Hide resolved
@@ -219,16 +219,10 @@ public void LongFileName() | |||
Assert.False(File.Exists(path)); | |||
} | |||
|
|||
[ConditionalFact] | |||
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotRunningOnMacOS))] | |||
[PlatformSpecific(CaseSensitivePlatforms)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make more sense to expand upon CaseSensitivePlatforms
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expanded IsCaseSensitiveOS.
/azp run runtime-manual |
@@ -232,6 +232,12 @@ public override void EndWrite(IAsyncResult asyncResult) | |||
|
|||
internal static string GetPipePath(string serverName, string pipeName) | |||
{ | |||
if (RuntimeInformation.RuntimeIdentifier.StartsWith("iossimulator") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need the logic here, this file is not included in simulator builds
@@ -23,7 +23,7 @@ public abstract partial class FileCleanupTestBase : IDisposable | |||
/// <summary>Initialize the test class base. This creates the associated test directory.</summary> | |||
protected FileCleanupTestBase(string tempDirectory = null) | |||
{ | |||
tempDirectory ??= Path.GetTempPath(); | |||
tempDirectory ??= PlatformDetection.IsCaseSensitiveOS ? Path.GetTempPath() : "/tmp/"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would expect GetTempPath
to work in all cases. Did you find otherwise?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you look at extending
public static readonly int MaxDirectory = 247; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why this is needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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