-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Add JIT stress mode testing using libraries tests #36486
Add JIT stress mode testing using libraries tests #36486
Conversation
Tagging subscribers to this area: @ViktorHofer |
Would be nice if we could get rid of the corefx and replace it with libraries there. |
@safern @ViktorHofer This PR will enable 3 new AzDO pipelines to test checked CoreCLR with various stress modes against the libraries test assets. Because these haven't been run in 6-9 months, there are some test failures. How should I disable these failing tests temporarily? Based on https://github.com/dotnet/runtime/blob/master/docs/workflow/testing/libraries/filtering-tests.md it looks like I should annotate the failing tests with something like |
99d2ab7
to
3ae4eef
Compare
We should use SkipOnCoreClrAttribute that one has support for adding a string with an issue and also to disable on specific stress scenarios. |
3ae4eef
to
652cc75
Compare
I're renamed the pipelines. I'd like to rename the files as a separate PR that only does the rename. |
This is ready to be reviewed. I've triggered the pipelines, and they all seem to work as expected. I've had to up the timeout. I don't know if that's because I can't create/submit the helix jobs all at once due to a Helix synchronization issue, or if the jobs just take a long time. There are still some test failures that I need to repro and disable, if possible, especially on arm/arm64. |
<_Scenarios Include="$(_Scenarios.Split(','))" /> | ||
|
||
<!-- MSBuild creates a new instance of the project for each %(_Scenarios.Identity) and can build them in parallel. --> | ||
<_ProjectsToBuild Include="$(MSBuildProjectFile)"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not instead use sendtohelix.proj
? that way we don't have to duplicate all the helix targets and properties?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would want to avoid so much duplication of the code as, as we move and add more features we would need to maintain both this projects (for example to add more helix data to kusto info, or other stuff).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue is that my new sendtohelix-scenarios.proj
is quite a bit more complicated than the existing sendtohelix.proj
. So I did it as-is to avoid perturbing (and potentially breaking) the existing queues, at least while I was doing development,
I can certainly make everyone use my new system, and have the existing pipelines use a default or empty scenario list. This would require more testing (maybe drastically more testing) to ensure existing pipelines aren't broken.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't mean augmenting sendtohelix.proj
-- I meant, calling into sendtohelix.proj
from sendtohelix-scenarios.proj
.
So basically sendtohelix-scenarios
does the fan out of the scenarios and expands into sendtohelix.proj
foreach scenario present. Then that way we avoid much duplication.
Then stuff specific to multiple scenarios like env vars and stuff like that, we could put it in a targets file and import that file when scenario
is not null in sendtohelix.proj
. Does that makes it easier/cleaner?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll look into this; I've thought before about whether that would be easier, but was following the previous model (this same basic code exists in the coreclr sendtohelix
equivalent).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, but now that we share the same sources, I think it makes sense to avoid duplication and this brings a lot of duplication, like the targets to zip the testhost and to build the helix workitems, etc.
/cc @naricc |
@@ -0,0 +1,34 @@ | |||
parameters: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should introduce a new template just for this.
Maybe make the project a parameter?
parameters:
helixProject: '$(Build.SourcesDirectory)/src/libraries/sendtohelix.proj'
...
steps:
- script: ${{ parameters.msbuildScript }}
${{ parameters.helixProject }}
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could do this, but if we decide to just augment the existing sendtohelix.proj
with the new scenarios functionality, it won't be necessary.
b63b0b4
to
bbd606b
Compare
bbd606b
to
c50a086
Compare
There are three separate pipelines, with different sets of JIT stress modes enabled for each: - libraries-jitstress.yml - libraries-jitstress2-jitstressregs.yml - libraries-jitstressregs.yml The live built Release libraries are used with a Checked CoreCLR. The non-stress configuration is tested during normal PR testing. The libraries `sendtohelix.proj` file is changed to take an optional list of CoreCLR stress scenarios to run. If given, a set of environment setting scripts is created and added to the Helix correlation payload. Then, an auxiliary `sendtohelixhelp.proj` file is invoked for each scenario (or just the default, empty scenario) to create and run the Helix tasks.
``` src/libraries/System.Numerics.Vectors/tests/Matrix3x2Tests.cs dotnet#36587 Matrix3x2CreateRotationCenterTest() dotnet#36587 Matrix3x2CreateScaleCenterTest1() dotnet#36587 Matrix3x2CreateScaleCenterTest3() src/libraries/System.Numerics.Vectors/tests/Matrix4x4Tests.cs dotnet#36586 Matrix4x4CreateFromAxisAngleTest() ```
c50a086
to
c9ed92f
Compare
@safern @ViktorHofer @jashook This is ready to be reviewed again. The main thing I've done is split the libraries
All libraries jobs go through this path, and the "no scenarios given" case, which is the default, should behave as before. I've disabled a few tests, but I noticed while testing this today that there are additional regressions, so the test runs will not be clean. That's ok; we can clean those up after this gets checked in. Triggered stress runs: jitstress: https://dev.azure.com/dnceng/public/_build/results?buildId=684206&view=results |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great improvements and cleanup, thanks Bruce!
<!-- The helix runtime payload and the tests to run --> | ||
<HelixCorrelationPayload Condition="'$(HelixCorrelationPayload)' == ''">$(TestArchiveRuntimeFile)</HelixCorrelationPayload> | ||
<WorkItemArchiveWildCard Condition="'$(WorkItemArchiveWildCard)' == ''">$(TestArchiveTestsRoot)**/*.zip</WorkItemArchiveWildCard> | ||
In the simple case, no scenarios are specified and the default CoreCLR optimization configuration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit, CoreCLR -> Runtime
<WorkItemArchiveWildCard Condition="'$(WorkItemArchiveWildCard)' == ''">$(TestArchiveTestsRoot)**/*.zip</WorkItemArchiveWildCard> | ||
In the simple case, no scenarios are specified and the default CoreCLR optimization configuration | ||
is used to run the tests. If a set of comma-separated scenarios are specified in the `_Scenarios` | ||
property, then each test is run for each of the specified CoreCLR scenarios (e.g., COMPlus_JitStress=1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto.
<!-- Helix auto-magically imports local *.props files. We're not going to import the Helix Sdk, | ||
so we need to import those files manually so we can reference the properties defined there. | ||
--> | ||
<Import Project="$(MSBuildThisFileDirectory)/*.props" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually we just need to import Directory.Build.props no?
<IncludeDotNetCli>true</IncludeDotNetCli> | ||
<DotNetCliPackageType>sdk</DotNetCliPackageType> | ||
<!-- Re-invoke MSBuild on this project to create the correlation payload --> | ||
<MSBuild Projects="$(MSBuildProjectFile)" Targets="PrepareCorrelationPayloadDirectory" Properties="Scenarios=$(_Scenarios)" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to re-invoke this project? We could just make the current target depend on PrepareCorrelationPayloadDirectory; we didn’t need to do this as an extra MSbuild node.
<DotNetCliVersion>$([System.Text.RegularExpressions.Regex]::Match($(GlobalJsonContent), '(%3F<="dotnet": ").*(%3F=")'))</DotNetCliVersion> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<PerScenarioProjectFile>$(MSBuildProjectDirectory)\sendtohelixhelp.proj</PerScenarioProjectFile> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need of \
<HelixCommand>$(HelixCommand) /p:RestorePackagesPath=%HELIX_WORKITEM_PAYLOAD%\packages</HelixCommand> | ||
<HelixCommand>$(HelixCommand) /p:LocalPackagesPath="%HELIX_CORRELATION_PAYLOAD%\packages\"</HelixCommand> | ||
<!-- The Helix correlation payload file --> | ||
<TestArchiveRuntimeFile Condition="'$(BuildAllConfigurations)' != 'true'">$(TestArchiveRuntimeRoot)test-runtime-$(BuildSettings).zip</TestArchiveRuntimeFile> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need these properties here and then passed down as global property? Or can they be moved to sendtohelixhelp.proj
?
<Message Importance="High" Text="Using Queues: $(HelixTargetQueues)" /> | ||
</Target> | ||
|
||
<Target Name="PrintBuildTargetFramework"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aren’t these already printed in sendtohelix.proj?
</Target> | ||
|
||
<Target Name="PrintHelixQueues"> | ||
<Message Importance="High" Text="Using Queues: $(HelixTargetQueues)" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are already printed in sendtohelix.proj right?
<Message Condition="'$(Scenario)' == ''" Importance="High" Text="Building Helix work items" /> | ||
<Message Condition="'$(Scenario)' != ''" Importance="High" Text="Building Helix work items for scenario $(Scenario)" /> | ||
<Message Importance="High" Text="Using TestRunNamePrefix: $(TestRunNamePrefix)" /> | ||
<Message Importance="High" Text="Using HelixCorrelationPayload: $(HelixCorrelationPayload)" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All these are already printed in sendtohelix.proj
<HelixType Condition="'$(BuildAllConfigurations)' == 'true'">test/functional/packaging/</HelixType> | ||
</PropertyGroup> | ||
|
||
<ItemGroup Condition="'$(HelixCommand)' == '' and '$(BuildAllConfigurations)' == 'true'"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this condition probe for HelixPreCommand instead?
@safern Thanks for the careful review. I merged just before your review was posted, so I will try to follow up on this soon with an update PR if appropriate. |
No worries, my review was a little bit late 😄 I will try to take a deeper look at how all is setup but I believe this is what jumped out. Also, maybe |
Add JIT stress mode testing using libraries tests
There are three separate pipelines, with different sets of JIT
stress modes enabled for each:
The live built Release libraries are used with a Checked CoreCLR.
The non-stress configuration is tested during normal PR testing.
The libraries
sendtohelix.proj
file is changed to take an optionallist of CoreCLR stress scenarios to run. If given, a set of environment
setting scripts is created and added to the Helix correlation payload.
Then, an auxiliary
sendtohelixhelp.proj
file is invoked for eachscenario (or just the default, empty scenario) to create and run the
Helix tasks.
Remove remnants of old corefx-on-coreclr test run infrastructure.
Disable tests:
src/libraries/System.Numerics.Vectors/tests/Matrix3x2Tests.cs
#36587
Matrix3x2CreateRotationCenterTest()
#36587
Matrix3x2CreateScaleCenterTest1()
#36587
Matrix3x2CreateScaleCenterTest3()
src/libraries/System.Numerics.Vectors/tests/Matrix4x4Tests.cs
#36586
Matrix4x4CreateFromAxisAngleTest()