-
Notifications
You must be signed in to change notification settings - Fork 5.3k
#51371 fixed failing test in iossimulator #63877
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
Changes from 1 commit
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.IsNotRunningOnMacOS))] | ||
| [InlineData(FileAttributes.Hidden)] | ||
| [PlatformSpecific(TestPlatforms.AnyUnix & ~(TestPlatforms.OSX | TestPlatforms.FreeBSD))] | ||
|
Contributor
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?
Contributor
Author
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 |
|---|---|---|
|
|
@@ -219,16 +219,10 @@ public void LongFileName() | |
| Assert.False(File.Exists(path)); | ||
| } | ||
|
|
||
| [ConditionalFact] | ||
| [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotRunningOnMacOS))] | ||
| [PlatformSpecific(CaseSensitivePlatforms)] | ||
|
||
| public void CaseSensitive() | ||
| { | ||
| if (RuntimeInformation.RuntimeIdentifier.StartsWith("iossimulator") | ||
| || RuntimeInformation.RuntimeIdentifier.StartsWith("tvossimulator")) | ||
| { | ||
| throw new SkipTestException("iOS/tvOS simulators run on a macOS host and are subject to the same case sensitivity behavior."); | ||
| } | ||
|
|
||
| DirectoryInfo testDir = Directory.CreateDirectory(GetTestFilePath()); | ||
| string testFile = Path.Combine(testDir.FullName, GetTestFileName()); | ||
| using (File.Create(testFile + "AAAA")) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,7 @@ | |
| using System.Threading; | ||
| using System.Threading.Tasks; | ||
| using System.Diagnostics; | ||
| using System.Runtime.InteropServices; | ||
|
|
||
| namespace System.IO.Pipes | ||
| { | ||
|
|
@@ -78,7 +79,7 @@ public NamedPipeClientStream(string serverName, string pipeName, PipeDirection d | |
| } | ||
| if (impersonationLevel < TokenImpersonationLevel.None || impersonationLevel > TokenImpersonationLevel.Delegation) | ||
| { | ||
| throw new ArgumentOutOfRangeException(nameof(impersonationLevel), SR.ArgumentOutOfRange_ImpersonationInvalid); | ||
| throw new ArgumentOutOfRangeException(nameof(impersonationLevel), SR.ArgumentOutOfRange_ImpersonationInvalid); | ||
| } | ||
| if (inheritability < HandleInheritability.None || inheritability > HandleInheritability.Inheritable) | ||
| { | ||
|
|
@@ -88,8 +89,15 @@ public NamedPipeClientStream(string serverName, string pipeName, PipeDirection d | |
| { | ||
| IsCurrentUserOnly = true; | ||
| } | ||
|
|
||
| _normalizedPipePath = GetPipePath(serverName, pipeName); | ||
|
Contributor
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. Wouldn't be better to change GetPipePath implementation instead?
Contributor
Author
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. Yes, that is better. Changed like that. |
||
| if (RuntimeInformation.RuntimeIdentifier.StartsWith("iossimulator") | ||
| || RuntimeInformation.RuntimeIdentifier.StartsWith("tvossimulator")) | ||
| { | ||
| _normalizedPipePath = $"/tmp/{pipeName}"; | ||
| } | ||
| else | ||
| { | ||
| _normalizedPipePath = GetPipePath(serverName, pipeName); | ||
| } | ||
| _direction = direction; | ||
| _inheritability = inheritability; | ||
| _impersonationLevel = impersonationLevel; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.