From 2f11c4d09fe4debd69b3524a8ae853622078bf1b Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Mon, 14 Aug 2023 12:07:01 -0700 Subject: [PATCH 1/9] Run our windows legs on the scouting images (required until 17.7 ships) --- eng/pipelines/common/xplat-setup.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/common/xplat-setup.yml b/eng/pipelines/common/xplat-setup.yml index 28257b05265ba..0050ee3ab1ccf 100644 --- a/eng/pipelines/common/xplat-setup.yml +++ b/eng/pipelines/common/xplat-setup.yml @@ -173,7 +173,7 @@ jobs: # Public Windows Build Pool ${{ if and(or(eq(parameters.osGroup, 'windows'), eq(parameters.jobParameters.hostedOs, 'windows')), eq(variables['System.TeamProject'], 'public')) }}: name: $(DncEngPublicBuildPool) - demands: ImageOverride -equals windows.vs2022.amd64.open + demands: ImageOverride -equals windows.vs2022preview.scout.amd64.open ${{ if eq(parameters.helixQueuesTemplate, '') }}: From 2e92a286c852e66b36133666788c65021da4eac8 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Mon, 14 Aug 2023 12:07:12 -0700 Subject: [PATCH 2/9] Add Windows legs for ASAN --- eng/pipelines/runtime-sanitized.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eng/pipelines/runtime-sanitized.yml b/eng/pipelines/runtime-sanitized.yml index 3bc49fec69083..10f0b13b411b3 100644 --- a/eng/pipelines/runtime-sanitized.yml +++ b/eng/pipelines/runtime-sanitized.yml @@ -30,6 +30,7 @@ extends: platforms: - linux_x64 - osx_x64 + - windows_x64 variables: - name: _nativeSanitizersArg value: -fsanitize address @@ -63,6 +64,7 @@ extends: platforms: - linux_x64 - osx_x64 + - windows_x64 variables: - name: _nativeSanitizersArg value: -fsanitize address @@ -90,6 +92,7 @@ extends: platforms: - linux_x64 - osx_x64 + - windows_x64 variables: - name: _nativeSanitizersArg value: -fsanitize address From 32b3836dcee44802a5f7e1868f6648d710d9693e Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Wed, 17 Jan 2024 15:07:45 -0800 Subject: [PATCH 3/9] Disable tests that run crossgen2 in the sanitizer modes --- src/tests/readytorun/tests/mainv1.csproj | 2 ++ src/tests/readytorun/tests/mainv2.csproj | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/tests/readytorun/tests/mainv1.csproj b/src/tests/readytorun/tests/mainv1.csproj index 1b80a5c999de5..5b8c11a65a07e 100644 --- a/src/tests/readytorun/tests/mainv1.csproj +++ b/src/tests/readytorun/tests/mainv1.csproj @@ -5,6 +5,8 @@ false true + + true diff --git a/src/tests/readytorun/tests/mainv2.csproj b/src/tests/readytorun/tests/mainv2.csproj index 9ff6350fef141..28c975a569de6 100644 --- a/src/tests/readytorun/tests/mainv2.csproj +++ b/src/tests/readytorun/tests/mainv2.csproj @@ -5,6 +5,8 @@ false true + + true From 3cd58df75851185599fee0b2a5d954a093b19a27 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Wed, 17 Jan 2024 15:54:43 -0800 Subject: [PATCH 4/9] Don't PGO optimize sanitized builds --- src/coreclr/pgosupport.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/pgosupport.cmake b/src/coreclr/pgosupport.cmake index 34a42781ab2c8..fe42dc8e57f36 100644 --- a/src/coreclr/pgosupport.cmake +++ b/src/coreclr/pgosupport.cmake @@ -38,7 +38,7 @@ function(add_pgo TargetName) endif() endif(UPPERCASE_CMAKE_BUILD_TYPE STREQUAL RELEASE OR UPPERCASE_CMAKE_BUILD_TYPE STREQUAL RELWITHDEBINFO) endif(CLR_CMAKE_HOST_WIN32) - elseif(CLR_CMAKE_PGO_OPTIMIZE) + elseif(CLR_CMAKE_PGO_OPTIMIZE AND NOT CLR_CMAKE_ENABLE_SANITIZERS) if(CLR_CMAKE_HOST_WIN32) set(ProfileFileName "${TargetName}.pgd") else(CLR_CMAKE_HOST_WIN32) From 9259e229e585848fb238eba7eec3e8f0652634eb Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Thu, 18 Jan 2024 13:36:10 -0500 Subject: [PATCH 5/9] Disable custom MSBuild targets when the test target is unsupported --- src/tests/readytorun/tests/mainv1.csproj | 2 +- src/tests/readytorun/tests/mainv2.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/readytorun/tests/mainv1.csproj b/src/tests/readytorun/tests/mainv1.csproj index 5b8c11a65a07e..dba79aa2d2b35 100644 --- a/src/tests/readytorun/tests/mainv1.csproj +++ b/src/tests/readytorun/tests/mainv1.csproj @@ -158,7 +158,7 @@ export DOTNET_GCName DOTNET_GCStress DOTNET_HeapVerify DOTNET_ReadyToRun ]]> - + test.dll $(OutputPath)/../testv1/test/ diff --git a/src/tests/readytorun/tests/mainv2.csproj b/src/tests/readytorun/tests/mainv2.csproj index 28c975a569de6..72e5d816629f0 100644 --- a/src/tests/readytorun/tests/mainv2.csproj +++ b/src/tests/readytorun/tests/mainv2.csproj @@ -160,7 +160,7 @@ export DOTNET_GCName DOTNET_GCStress DOTNET_HeapVerify DOTNET_ReadyToRun ]]> - + test.dll $(OutputPath)/../testv1/test/ From 54fd5f48e0d5cd12fb880c768b6b434586914dd7 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Fri, 26 Jan 2024 14:16:33 -0800 Subject: [PATCH 6/9] Copy sanitizer runtimes for NativeAOT libraries tests --- eng/testing/linker/project.csproj.template | 4 ++++ eng/testing/linker/trimmingTests.targets | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/eng/testing/linker/project.csproj.template b/eng/testing/linker/project.csproj.template index f4177ee854261..41466e8d4492a 100644 --- a/eng/testing/linker/project.csproj.template +++ b/eng/testing/linker/project.csproj.template @@ -98,4 +98,8 @@ + + + + diff --git a/eng/testing/linker/trimmingTests.targets b/eng/testing/linker/trimmingTests.targets index a13c1a1250442..926bafa52cfef 100644 --- a/eng/testing/linker/trimmingTests.targets +++ b/eng/testing/linker/trimmingTests.targets @@ -119,7 +119,8 @@ .Replace('{MicrosoftNetCoreAppRuntimePackDir}', '$(MicrosoftNetCoreAppRuntimePackDir)') .Replace('{NativeSanitizersTargets}', '$(RepositoryEngineeringDir)nativeSanitizers.targets') .Replace('{AppHostSourcePath}', '$(AppHostSourcePath)') - .Replace('{SingleFileHostSourcePath}', '$(SingleFileHostSourcePath)'))" + .Replace('{SingleFileHostSourcePath}', '$(SingleFileHostSourcePath)') + .Replace('{SanitizerRuntimeFolder}', '$(DotNetHostBinDir)'))" Overwrite="true" /> Date: Fri, 26 Jan 2024 14:17:00 -0800 Subject: [PATCH 7/9] Double timeout for libraries tests --- eng/pipelines/runtime-sanitized.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/runtime-sanitized.yml b/eng/pipelines/runtime-sanitized.yml index a74c578ca9119..c92c99b01d866 100644 --- a/eng/pipelines/runtime-sanitized.yml +++ b/eng/pipelines/runtime-sanitized.yml @@ -73,7 +73,7 @@ extends: testGroup: innerloop nameSuffix: CoreCLR_LibrariesTests buildArgs: -s clr+libs+libs.tests -c $(_BuildConfig) -rc Checked $(_nativeSanitizersArg) /p:ArchiveTests=true - timeoutInMinutes: 180 + timeoutInMinutes: 360 # extra steps, run tests postBuildSteps: - template: /eng/pipelines/libraries/helix.yml From beeff46be726476ce74de344cfe3ecabf8771547 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Mon, 29 Jan 2024 13:58:51 -0800 Subject: [PATCH 8/9] Separate out the Windows libraries test runs and specify the helix queues manually --- eng/pipelines/runtime-sanitized.yml | 31 +++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/eng/pipelines/runtime-sanitized.yml b/eng/pipelines/runtime-sanitized.yml index c92c99b01d866..aa31142253177 100644 --- a/eng/pipelines/runtime-sanitized.yml +++ b/eng/pipelines/runtime-sanitized.yml @@ -65,6 +65,32 @@ extends: platforms: - linux_x64 - osx_x64 + variables: + - name: _nativeSanitizersArg + value: -fsanitize address + jobParameters: + testGroup: innerloop + nameSuffix: CoreCLR_LibrariesTests + buildArgs: -s clr+libs+libs.tests -c $(_BuildConfig) -rc Checked $(_nativeSanitizersArg) /p:ArchiveTests=true + timeoutInMinutes: 180 + # extra steps, run tests + postBuildSteps: + - template: /eng/pipelines/libraries/helix.yml + parameters: + creator: dotnet-bot + testRunNamePrefixSuffix: Libraries_$(_BuildConfig) + scenarios: + - normal + + # + # Build the whole product with CoreCLR and run libraries tests with AddressSanitizer + # + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: Debug + runtimeFlavor: coreclr + platforms: - windows_x64 variables: - name: _nativeSanitizersArg @@ -74,6 +100,11 @@ extends: nameSuffix: CoreCLR_LibrariesTests buildArgs: -s clr+libs+libs.tests -c $(_BuildConfig) -rc Checked $(_nativeSanitizersArg) /p:ArchiveTests=true timeoutInMinutes: 360 + # Hard-code queues here as we don't want to run on pre Win-10 queues + # and we don't want to overcompilcate helix-queues-setup.yml just for this case. + helixQueues: + - Windows.Amd64.Server2022.Open + - Windows.11.Amd64.Client # extra steps, run tests postBuildSteps: - template: /eng/pipelines/libraries/helix.yml From 88b3a5ffbab6cdbab494f17a048d3d66d8ffbd95 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Mon, 29 Jan 2024 15:57:03 -0800 Subject: [PATCH 9/9] Update runtime-sanitized.yml --- eng/pipelines/runtime-sanitized.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/runtime-sanitized.yml b/eng/pipelines/runtime-sanitized.yml index aa31142253177..ed0334b61b3e9 100644 --- a/eng/pipelines/runtime-sanitized.yml +++ b/eng/pipelines/runtime-sanitized.yml @@ -104,7 +104,7 @@ extends: # and we don't want to overcompilcate helix-queues-setup.yml just for this case. helixQueues: - Windows.Amd64.Server2022.Open - - Windows.11.Amd64.Client + - Windows.11.Amd64.Client.Open # extra steps, run tests postBuildSteps: - template: /eng/pipelines/libraries/helix.yml