-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Changes from 14 commits
c9e82e3
0428831
cfe4592
4b8fe65
7a3053c
5e2771d
4b2dfb1
69ea51e
65daf2f
8696973
100cac7
507d239
6154087
d989e86
d457075
bdc06e9
eddd2ca
2501ef2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,10 +62,9 @@ public void SettingInvalidAttributes_Unix(FileAttributes attributes) | |
AssertSettingInvalidAttributes(path, attributes); | ||
} | ||
|
||
[Theory] | ||
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsCaseSensitiveOS))] | ||
[InlineData(FileAttributes.Hidden)] | ||
[PlatformSpecific(TestPlatforms.AnyUnix & ~(TestPlatforms.OSX | TestPlatforms.FreeBSD))] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is ConditionalTheory needed if this test is PlatformSpecific? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This test is failing on iossimulator/tvossimulator and MacCatalyst. They are considered a separate TestPlatform. |
||
[ActiveIssue("https://github.com/dotnet/runtime/issues/51371", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)] | ||
public void SettingInvalidAttributes_UnixExceptOSXAndFreeBSD(FileAttributes attributes) | ||
{ | ||
string path = CreateItem(); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -196,6 +196,12 @@ internal static string GetPipePath(string serverName, string pipeName) | |
throw new ArgumentOutOfRangeException(nameof(pipeName), SR.ArgumentOutOfRange_AnonymousReserved); | ||
} | ||
|
||
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 commentThe 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 commentThe 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 commentThe 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. |
||
} | ||
|
||
// Since pipes are stored as files in the system we support either an absolute path to a file name | ||
// or a file name. The support of absolute path was added to allow working around the limited | ||
// length available for the pipe name when concatenated with the temp path, while being | ||
|
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
runtime/src/libraries/System.IO.FileSystem/tests/PortedCommon/IOInputs.cs
Line 26 in 0240828
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.