-
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
Cleaner way of specifying environment variables for tests #76458
Conversation
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsExisting ways of specifying environment variables:
This changes CLRTestBashEnvironmentVariable and CLRTestBatchEnvironmentVariable to be a list of Identity/Value pairs and adds a new list CLRTestEnvironmentVariable in the same format. These are automatically expanded to the necessary A few details of note:
|
export COMPlus_TC_OnStackReplacement=1 | ||
export COMPlus_OSR_HitLimit=1 | ||
export COMPlus_TC_OnStackReplacement=1 | ||
export COMPlus_TC_OnStackReplacement_InitialCounter=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.
This diff condenses 6 variables to 5 because COMPlus_TC_OnStackReplacement
is defined twice.
@trylek @jkoritzinsky Could one of you please take a look at this? This is separate from the naming cleanup that was discussed in the disasm checks PR, though it does remove a lot of uses of the precommands variables. I doubt this will conflict with anything that you're doing, and if anything, putting these in symbolic form might help. cc @dotnet/jit-contrib This makes the specification of environment variables much simpler/shorter for tests. |
Nice cleanup. Did you use some script to convert the old to new format? |
Yes, I used a very brittle C# program, but it looks like all of these were copy/pasted since it worked on all of them. |
Got it. I was asking, so we don't have to review changes in each and every |
Not sure if failures are related though. |
I did the 5 (not PreCommands) cases by hand and did look through the others myself. That was how I noticed that one duplicate definition that I added a comment about :) |
@@ -8,16 +8,10 @@ | |||
</PropertyGroup> | |||
<ItemGroup> | |||
<Compile Include="$(MSBuildProjectName).cs" /> | |||
|
|||
<CLRTestEnvironmentVariable Include="COMPlus_JitStressModeNames" Value="STRESS_RANDOM_INLINE STRESS_DBL_ALN" /> | |||
</ItemGroup> | |||
<PropertyGroup> |
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 - feel free to ignore this or leave for a subsequent mop-up PR especially if you'd need to regenerate all the project changes but it would be nice to get rid of the emptied property groups.
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.
This is a really good catch. Most of the empty property groups are gone. My script did that, but I shouldn't have left it quiet when it found additional lines since my audit obviously missed that. In a few cases there were comments that should be moved as well. I'll do that by hand on top of these changes.
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 noticed that these are not really frequent and are probably just caused by the comments which are presumably valuable and can be moved to the new style environment variable items exactly as you say. Thanks for doing that!
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.
Just for reference - 24e297a does this. I removed a few comments that said capitalization matters for Linux because it applies to every one of these.
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.
Now this is a really beautiful cleanup, thanks so much Mark!
looks like it might be #73299 is a bit suspicious since pinnedlocal is actually a test where this PR moves the GCStress=3 to the new format. #70641 contains a reference (from June) about this test failing intermittently on Mono for a long time. It looks like most PRs skip this test leg. My changes have triggered another run, so we'll get another data point. |
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.
Looks good.
Did you consider eliminating the COMPlus_
or DOTNET_
prefix in the names? E.g., instead of:
<CLRTestEnvironmentVariable Include="COMPlus_DoubleArrayToLargeObjectHeap" Value="0x64" />
use:
<CLRTestEnvironmentVariable Include="DoubleArrayToLargeObjectHeap" Value="0x64" />
and have the CLRTestEnvironmentVariable
processing auto-prepend DOTNET_
? It would help in getting us away from using COMPlus_
. I suppose you might need a CLRTestEnvironmentVariableRaw
that doesn't do that, for some cases.
@BruceForstall I didn't think of that. Maybe we could even use metadata There are various places in the tree that check for one of |
/azp run runtime-wasm |
Azure Pipelines successfully started running 1 pipeline(s). |
Failure was JIT/opt/OSR/pinnedlocal/pinnedlocal.sh on Mono Browser wasm Release @ Ubuntu.1804.Amd64.Open. This test was known to occasionally fail on Mono and is now disabled by #76980 |
Existing ways of specifying environment variables:
export var=value
stringsset var=value
stringsexport
/set
strings for the same variablesThis changes CLRTestBashEnvironmentVariable and CLRTestBatchEnvironmentVariable to be a list of Identity/Value pairs and adds a new list CLRTestEnvironmentVariable in the same format. These are automatically expanded to the necessary
export
/set
strings as appropriate.A few details of note: