Skip to content

Commit 5b0b8a0

Browse files
committed
Merge in 'release/6.0' changes
2 parents fa9dc99 + 6dd808f commit 5b0b8a0

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public static partial class PlatformDetection
4848
public static bool IsNotArm64Process => !IsArm64Process;
4949
public static bool IsArmOrArm64Process => IsArmProcess || IsArm64Process;
5050
public static bool IsNotArmNorArm64Process => !IsArmOrArm64Process;
51+
public static bool IsX86Process => RuntimeInformation.ProcessArchitecture == Architecture.X86;
5152
public static bool IsArgIteratorSupported => IsMonoRuntime || (IsWindows && IsNotArmProcess);
5253
public static bool IsArgIteratorNotSupported => !IsArgIteratorSupported;
5354
public static bool Is32BitProcess => IntPtr.Size == 4;

src/libraries/System.Globalization/tests/IcuTests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ namespace System.Globalization.Tests
1010
public class IcuTests
1111
{
1212
private static bool IsIcuCompatiblePlatform => PlatformDetection.IsNotWindows ||
13-
PlatformDetection.IsWindows10Version1903OrGreater;
13+
PlatformDetection.IsWindows10Version1903OrGreater &&
14+
// Server core doesn't have icu.dll on SysWOW64
15+
!(PlatformDetection.IsWindowsServerCore && PlatformDetection.IsX86Process);
1416

1517
[ConditionalFact(nameof(IsIcuCompatiblePlatform))]
1618
public static void IcuShouldBeUsedByDefault()

src/libraries/System.IO.FileSystem/tests/Directory/CreateDirectory.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,10 @@ public void DirectoryLongerThanMaxLongPathWithExtendedSyntax_ThrowsException()
270270
{
271271
var paths = IOInputs.GetPathsLongerThanMaxLongPath(GetTestFilePath(), useExtendedSyntax: true);
272272

273+
// Ideally this should be PathTooLongException or DirectoryNotFoundException but on some machines
274+
// windows gives us ERROR_INVALID_NAME, producing IOException.
273275
Assert.All(paths, path =>
274-
AssertExtensions.ThrowsAny<PathTooLongException, DirectoryNotFoundException>(() => Create(path)));
276+
AssertExtensions.ThrowsAny<PathTooLongException, DirectoryNotFoundException, IOException>(() => Create(path)));
275277
}
276278

277279
[ConditionalFact(nameof(LongPathsAreNotBlocked), nameof(UsingNewNormalization))]

0 commit comments

Comments
 (0)