Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordotnet-bot <dotnet-bot@microsoft.com>2022-02-14 21:47:56 +0300
committerdotnet-bot <dotnet-bot@microsoft.com>2022-02-14 21:47:56 +0300
commit5b0b8a01e547a97908697ba4a41984a10e1c7c27 (patch)
treef321a819fc0565a22ef086e0409694fb8ed0c77a /src/libraries
parentfa9dc99b5c5c2de38217703d7d29d517fe6dffdc (diff)
parent6dd808ff7ae62512330d2f111eb1f60f1ae40125 (diff)
Merge in 'release/6.0' changes
Diffstat (limited to 'src/libraries')
-rw-r--r--src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs1
-rw-r--r--src/libraries/System.Globalization/tests/IcuTests.cs4
-rw-r--r--src/libraries/System.IO.FileSystem/tests/Directory/CreateDirectory.cs4
3 files changed, 7 insertions, 2 deletions
diff --git a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs
index df3c3b44ecb..6b77b65fefd 100644
--- a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs
+++ b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs
@@ -48,6 +48,7 @@ namespace System
public static bool IsNotArm64Process => !IsArm64Process;
public static bool IsArmOrArm64Process => IsArmProcess || IsArm64Process;
public static bool IsNotArmNorArm64Process => !IsArmOrArm64Process;
+ public static bool IsX86Process => RuntimeInformation.ProcessArchitecture == Architecture.X86;
public static bool IsArgIteratorSupported => IsMonoRuntime || (IsWindows && IsNotArmProcess);
public static bool IsArgIteratorNotSupported => !IsArgIteratorSupported;
public static bool Is32BitProcess => IntPtr.Size == 4;
diff --git a/src/libraries/System.Globalization/tests/IcuTests.cs b/src/libraries/System.Globalization/tests/IcuTests.cs
index 190da7f676c..e28872759be 100644
--- a/src/libraries/System.Globalization/tests/IcuTests.cs
+++ b/src/libraries/System.Globalization/tests/IcuTests.cs
@@ -10,7 +10,9 @@ namespace System.Globalization.Tests
public class IcuTests
{
private static bool IsIcuCompatiblePlatform => PlatformDetection.IsNotWindows ||
- PlatformDetection.IsWindows10Version1903OrGreater;
+ PlatformDetection.IsWindows10Version1903OrGreater &&
+ // Server core doesn't have icu.dll on SysWOW64
+ !(PlatformDetection.IsWindowsServerCore && PlatformDetection.IsX86Process);
[ConditionalFact(nameof(IsIcuCompatiblePlatform))]
public static void IcuShouldBeUsedByDefault()
diff --git a/src/libraries/System.IO.FileSystem/tests/Directory/CreateDirectory.cs b/src/libraries/System.IO.FileSystem/tests/Directory/CreateDirectory.cs
index fb3a74305bc..4e53a93a4e0 100644
--- a/src/libraries/System.IO.FileSystem/tests/Directory/CreateDirectory.cs
+++ b/src/libraries/System.IO.FileSystem/tests/Directory/CreateDirectory.cs
@@ -270,8 +270,10 @@ namespace System.IO.Tests
{
var paths = IOInputs.GetPathsLongerThanMaxLongPath(GetTestFilePath(), useExtendedSyntax: true);
+ // Ideally this should be PathTooLongException or DirectoryNotFoundException but on some machines
+ // windows gives us ERROR_INVALID_NAME, producing IOException.
Assert.All(paths, path =>
- AssertExtensions.ThrowsAny<PathTooLongException, DirectoryNotFoundException>(() => Create(path)));
+ AssertExtensions.ThrowsAny<PathTooLongException, DirectoryNotFoundException, IOException>(() => Create(path)));
}
[ConditionalFact(nameof(LongPathsAreNotBlocked), nameof(UsingNewNormalization))]