From d9f747be6a1cde8541919394812f2d3fa9eb1214 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Strehovsk=C3=BD?= Date: Tue, 20 Dec 2022 17:56:29 +0900 Subject: [PATCH 1/8] Add NativeAOT checked leg This is the same as the release leg, but checked runtime and on fewer queues (only Win x64 and Linux arm64). --- .../runtime-extra-platforms-other.yml | 31 ++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/eng/pipelines/extra-platforms/runtime-extra-platforms-other.yml b/eng/pipelines/extra-platforms/runtime-extra-platforms-other.yml index ee2d50e0e9b00d..823cff1f798148 100644 --- a/eng/pipelines/extra-platforms/runtime-extra-platforms-other.yml +++ b/eng/pipelines/extra-platforms/runtime-extra-platforms-other.yml @@ -73,7 +73,7 @@ jobs: eq(variables['isRollingBuild'], true)) # -# CoreCLR NativeAOT release build and additional libraries tests that are known to be passing +# CoreCLR NativeAOT release build and libraries tests # Only when CoreCLR or library is changed # - template: /eng/pipelines/common/platform-matrix.yml @@ -106,6 +106,35 @@ jobs: eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), eq(variables['isRollingBuild'], true)) +# +# CoreCLR NativeAOT release build (checked runtime) and libraries tests +# Only when CoreCLR or library is changed +# +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml + buildConfig: Release + platforms: + - windows_x64 + - Linux_arm64 + jobParameters: + testGroup: innerloop + isSingleFile: true + nameSuffix: NativeAOT_Checked_Libs + buildArgs: -s clr.aot+host.native+libs+libs.tests -c $(_BuildConfig) -rc Checked /p:TestNativeAot=true /p:ArchiveTests=true + timeoutInMinutes: 300 # doesn't normally take this long, but I've seen Helix queues backed up for 160 minutes + # extra steps, run tests + extraStepsTemplate: /eng/pipelines/libraries/helix.yml + extraStepsParameters: + creator: dotnet-bot + testRunNamePrefixSuffix: NativeAOT_Checked_$(_BuildConfig) + condition: >- + or( + eq(dependencies.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true), + eq(dependencies.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'], true), + eq(variables['isRollingBuild'], true)) + # Run net48 tests on win-x64 - template: /eng/pipelines/common/platform-matrix.yml parameters: From 61f9c2d66ebc056a65dafe06aab2c3d964faa913 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Strehovsk=C3=BD?= Date: Fri, 23 Dec 2022 17:14:23 +0900 Subject: [PATCH 2/8] Try bumping the timeout Checked RyuJIT is a lot slower than the rest of the checked system :/ --- eng/pipelines/extra-platforms/runtime-extra-platforms-other.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/extra-platforms/runtime-extra-platforms-other.yml b/eng/pipelines/extra-platforms/runtime-extra-platforms-other.yml index 823cff1f798148..eab647e47dea85 100644 --- a/eng/pipelines/extra-platforms/runtime-extra-platforms-other.yml +++ b/eng/pipelines/extra-platforms/runtime-extra-platforms-other.yml @@ -123,7 +123,7 @@ jobs: isSingleFile: true nameSuffix: NativeAOT_Checked_Libs buildArgs: -s clr.aot+host.native+libs+libs.tests -c $(_BuildConfig) -rc Checked /p:TestNativeAot=true /p:ArchiveTests=true - timeoutInMinutes: 300 # doesn't normally take this long, but I've seen Helix queues backed up for 160 minutes + timeoutInMinutes: 360 # extra steps, run tests extraStepsTemplate: /eng/pipelines/libraries/helix.yml extraStepsParameters: From b710127514ab3425d022776ca807eac9602e3725 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Strehovsk=C3=BD?= Date: Fri, 30 Dec 2022 11:46:49 +0900 Subject: [PATCH 3/8] Debug --- .../System/PlatformDetection.Windows.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Windows.cs b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Windows.cs index 1b570872d06d9f..c5066073d18d77 100644 --- a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Windows.cs +++ b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Windows.cs @@ -25,7 +25,19 @@ public static partial class PlatformDetection public static bool IsWindows8xOrLater => IsWindowsVersionOrLater(6, 2); public static bool IsWindows10OrLater => IsWindowsVersionOrLater(10, 0); public static bool IsWindowsServer2019 => IsWindows && IsNotWindowsNanoServer && GetWindowsVersion() == 10 && GetWindowsMinorVersion() == 0 && GetWindowsBuildVersion() == 17763; - public static bool IsWindowsNanoServer => IsWindows && (IsNotWindowsIoTCore && GetWindowsInstallationType().Equals("Nano Server", StringComparison.OrdinalIgnoreCase)); + public static bool IsWindowsNanoServer + { + get + { + Console.WriteLine($"GetWindowsInstallationType(): {GetWindowsInstallationType()}"); + Console.WriteLine($"GetWindowsProductType(): {GetWindowsProductType()}"); + Console.WriteLine($"IsWindows: {IsWindows}"); + Console.WriteLine($"IsNotWindowsIoTCore: {IsNotWindowsIoTCore}"); + Console.WriteLine($"Environment.OSVersion.Version.Major: {Environment.OSVersion.Version.Major}"); + Console.WriteLine($"Environment.OSVersion.Version.Minor: {Environment.OSVersion.Version.Minor}"); + return IsWindows && (IsNotWindowsIoTCore && GetWindowsInstallationType().Equals("Nano Server", StringComparison.OrdinalIgnoreCase)); + } + } public static bool IsWindowsServerCore => IsWindows && GetWindowsInstallationType().Equals("Server Core", StringComparison.OrdinalIgnoreCase); public static int WindowsVersion => IsWindows ? (int)GetWindowsVersion() : -1; public static bool IsNotWindows7 => !IsWindows7; From a9b79f69776b0a5e8dd90118258d398b82be987f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Strehovsk=C3=BD?= Date: Fri, 30 Dec 2022 20:30:36 +0900 Subject: [PATCH 4/8] Revert "Debug" This reverts commit b710127514ab3425d022776ca807eac9602e3725. --- .../System/PlatformDetection.Windows.cs | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Windows.cs b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Windows.cs index c5066073d18d77..1b570872d06d9f 100644 --- a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Windows.cs +++ b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.Windows.cs @@ -25,19 +25,7 @@ public static partial class PlatformDetection public static bool IsWindows8xOrLater => IsWindowsVersionOrLater(6, 2); public static bool IsWindows10OrLater => IsWindowsVersionOrLater(10, 0); public static bool IsWindowsServer2019 => IsWindows && IsNotWindowsNanoServer && GetWindowsVersion() == 10 && GetWindowsMinorVersion() == 0 && GetWindowsBuildVersion() == 17763; - public static bool IsWindowsNanoServer - { - get - { - Console.WriteLine($"GetWindowsInstallationType(): {GetWindowsInstallationType()}"); - Console.WriteLine($"GetWindowsProductType(): {GetWindowsProductType()}"); - Console.WriteLine($"IsWindows: {IsWindows}"); - Console.WriteLine($"IsNotWindowsIoTCore: {IsNotWindowsIoTCore}"); - Console.WriteLine($"Environment.OSVersion.Version.Major: {Environment.OSVersion.Version.Major}"); - Console.WriteLine($"Environment.OSVersion.Version.Minor: {Environment.OSVersion.Version.Minor}"); - return IsWindows && (IsNotWindowsIoTCore && GetWindowsInstallationType().Equals("Nano Server", StringComparison.OrdinalIgnoreCase)); - } - } + public static bool IsWindowsNanoServer => IsWindows && (IsNotWindowsIoTCore && GetWindowsInstallationType().Equals("Nano Server", StringComparison.OrdinalIgnoreCase)); public static bool IsWindowsServerCore => IsWindows && GetWindowsInstallationType().Equals("Server Core", StringComparison.OrdinalIgnoreCase); public static int WindowsVersion => IsWindows ? (int)GetWindowsVersion() : -1; public static bool IsNotWindows7 => !IsWindows7; From d7c83c4fce8c11ba72567e28bbd2922fb186f083 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Strehovsk=C3=BD?= Date: Fri, 30 Dec 2022 20:30:41 +0900 Subject: [PATCH 5/8] f --- .../tests/System/Environment.GetEnvironmentVariable.cs | 2 +- .../tests/System/Environment.SetEnvironmentVariable.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libraries/System.Runtime.Extensions/tests/System/Environment.GetEnvironmentVariable.cs b/src/libraries/System.Runtime.Extensions/tests/System/Environment.GetEnvironmentVariable.cs index 125b274b4b2ae4..ef532de9fbde5d 100644 --- a/src/libraries/System.Runtime.Extensions/tests/System/Environment.GetEnvironmentVariable.cs +++ b/src/libraries/System.Runtime.Extensions/tests/System/Environment.GetEnvironmentVariable.cs @@ -221,7 +221,7 @@ public void EnumerateEnvironmentVariables(EnvironmentVariableTarget target) || (PlatformDetection.IsWindows && PlatformDetection.IsPrivilegedProcess); // [ActiveIssue("https://github.com/dotnet/runtime/issues/30566")] - if (PlatformDetection.IsWindowsNanoServer && target == EnvironmentVariableTarget.User) + if (PlatformDetection.IsWindowsNanoServer) { lookForSetValue = false; } diff --git a/src/libraries/System.Runtime.Extensions/tests/System/Environment.SetEnvironmentVariable.cs b/src/libraries/System.Runtime.Extensions/tests/System/Environment.SetEnvironmentVariable.cs index 4554ccccafb2ea..05779d94d8ee6f 100644 --- a/src/libraries/System.Runtime.Extensions/tests/System/Environment.SetEnvironmentVariable.cs +++ b/src/libraries/System.Runtime.Extensions/tests/System/Environment.SetEnvironmentVariable.cs @@ -17,7 +17,7 @@ public class SetEnvironmentVariable internal static bool IsSupportedTarget(EnvironmentVariableTarget target) { // [ActiveIssue("https://github.com/dotnet/runtime/issues/30566")] - if (target == EnvironmentVariableTarget.User && PlatformDetection.IsWindowsNanoServer) + if (PlatformDetection.IsWindowsNanoServer) { return false; } From 119b5d6f00683025485f5b0ed3f417add7496f8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Strehovsk=C3=BD?= Date: Mon, 2 Jan 2023 09:20:23 +0900 Subject: [PATCH 6/8] Revert "f" This reverts commit d7c83c4fce8c11ba72567e28bbd2922fb186f083. --- .../tests/System/Environment.GetEnvironmentVariable.cs | 2 +- .../tests/System/Environment.SetEnvironmentVariable.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libraries/System.Runtime.Extensions/tests/System/Environment.GetEnvironmentVariable.cs b/src/libraries/System.Runtime.Extensions/tests/System/Environment.GetEnvironmentVariable.cs index ef532de9fbde5d..125b274b4b2ae4 100644 --- a/src/libraries/System.Runtime.Extensions/tests/System/Environment.GetEnvironmentVariable.cs +++ b/src/libraries/System.Runtime.Extensions/tests/System/Environment.GetEnvironmentVariable.cs @@ -221,7 +221,7 @@ public void EnumerateEnvironmentVariables(EnvironmentVariableTarget target) || (PlatformDetection.IsWindows && PlatformDetection.IsPrivilegedProcess); // [ActiveIssue("https://github.com/dotnet/runtime/issues/30566")] - if (PlatformDetection.IsWindowsNanoServer) + if (PlatformDetection.IsWindowsNanoServer && target == EnvironmentVariableTarget.User) { lookForSetValue = false; } diff --git a/src/libraries/System.Runtime.Extensions/tests/System/Environment.SetEnvironmentVariable.cs b/src/libraries/System.Runtime.Extensions/tests/System/Environment.SetEnvironmentVariable.cs index 05779d94d8ee6f..4554ccccafb2ea 100644 --- a/src/libraries/System.Runtime.Extensions/tests/System/Environment.SetEnvironmentVariable.cs +++ b/src/libraries/System.Runtime.Extensions/tests/System/Environment.SetEnvironmentVariable.cs @@ -17,7 +17,7 @@ public class SetEnvironmentVariable internal static bool IsSupportedTarget(EnvironmentVariableTarget target) { // [ActiveIssue("https://github.com/dotnet/runtime/issues/30566")] - if (PlatformDetection.IsWindowsNanoServer) + if (target == EnvironmentVariableTarget.User && PlatformDetection.IsWindowsNanoServer) { return false; } From 1c8ad2edc65f58d83f8a294986b304a6b1e76739 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Strehovsk=C3=BD?= Date: Mon, 2 Jan 2023 09:25:58 +0900 Subject: [PATCH 7/8] Update tests.proj --- src/libraries/tests.proj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj index f877d2046f8356..e45f6f61901ab1 100644 --- a/src/libraries/tests.proj +++ b/src/libraries/tests.proj @@ -425,6 +425,10 @@ + + + From 98fcc8be9b255337735582f455068009e73cbd32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Strehovsk=C3=BD?= Date: Mon, 2 Jan 2023 09:29:44 +0900 Subject: [PATCH 8/8] Update tests.proj --- src/libraries/tests.proj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj index e45f6f61901ab1..18faeaf20720ba 100644 --- a/src/libraries/tests.proj +++ b/src/libraries/tests.proj @@ -427,7 +427,7 @@ + Condition="'$(RuntimeConfiguration)' == 'checked' and '$(TargetOS)' == 'windows'" />