Skip to content

Commit

Permalink
Fix timeouts in coreroot_determinism test in GC stress mode (#56770)
Browse files Browse the repository at this point in the history
I have found two deficiencies in our CoreCLR test infrastructure
related to running Crossgen2 in GC stress mode; this change should
fix both:

1) In the Unix (bash) variant of Execute.Crossgen.targets we weren't
properly unsetting the GC stress-related COMPlus environment
variables.

2) In the particular case of the coreroot_determinism test this
needed fixing in r2rtest that is internally used by the test
implementation (on both Windows and Unix).

Thanks

Tomas
  • Loading branch information
trylek authored Aug 3, 2021
1 parent 4b3db59 commit 90edb16
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/coreclr/tools/r2rtest/Crossgen2Runner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ public override ProcessParameters CompilationProcess(string outputFileName, IEnu
{
ProcessParameters processParameters = base.CompilationProcess(outputFileName, inputAssemblyFileNames);
processParameters.Arguments = $"{Crossgen2Path} {processParameters.Arguments}";
processParameters.EnvironmentOverrides["COMPlus_GCStress"] = "";
processParameters.EnvironmentOverrides["COMPlus_HeapVerify"] = "";
processParameters.EnvironmentOverrides["COMPlus_ReadyToRun"] = "";
processParameters.EnvironmentOverrides["COMPlus_GCName"] = "";
return processParameters;
}

Expand Down
6 changes: 3 additions & 3 deletions src/tests/Common/CLRTest.CrossGen.targets
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ if [ ! -z ${RunCrossGen2+x} ]%3B then
local heapVerifyModeToRestore=$COMPlus_HeapVerify;
local readyToRunModeToRestore=$COMPlus_ReadyToRun;
local gcstandaloneModeToRestore=$COMPlus_GCName;
export COMPlus_GCStress=
export COMPlus_HeapVerify=
export COMPlus_ReadyToRun=
unset COMPlus_GCStress
unset COMPlus_HeapVerify
unset COMPlus_ReadyToRun
unset COMPlus_GCName
__Command=$_DebuggerFullPath
Expand Down

0 comments on commit 90edb16

Please sign in to comment.