Skip to content

Commit

Permalink
Disabling disasm checks under certain testing environments (#76202)
Browse files Browse the repository at this point in the history
* Disabling disasm checks under certain testing environments

* Add extra linux musl check

* Add JitDisasm check back

* Remove JitDisasm check

* Re-enable musl

* Do not run disasm checks under stress modes

* Feedback, force a failure

* Trying to fix targets

* Trying to fix targets

* Update Runtime_34937.cs
  • Loading branch information
TIHan authored Sep 27, 2022
1 parent 31e0bd1 commit c6f5267
Showing 1 changed file with 26 additions and 19 deletions.
45 changes: 26 additions & 19 deletions src/tests/Common/CLRTest.Jit.targets
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,10 @@ IF NOT DEFINED DoLink (
</ItemGroup>
<PropertyGroup>
<HasDisasmCheck>false</HasDisasmCheck>
<HasDisasmCheck Condition="@(DisasmCheckFiles->Count()) &gt; 0 And '$(CLRTestKind)' == 'BuildAndRun'">true</HasDisasmCheck>
<HasDisasmCheck Condition="@(DisasmCheckFiles->Count()) &gt; 0 And '$(CLRTestKind)' == 'BuildAndRun' and '$(RunCrossGen2)' != 'true'">true</HasDisasmCheck>

<GCStressIncompatible Condition="'$(HasDisasmCheck)' == 'true'">true</GCStressIncompatible>
<HeapVerifyIncompatible Condition="'$(HasDisasmCheck)' == 'true'">true</HeapVerifyIncompatible>
</PropertyGroup>
</Target>

Expand Down Expand Up @@ -231,16 +234,18 @@ IF NOT DEFINED DoLink (
<BashDisasmListOutputFile Condition="'$(HasBashDisasmCheck)' == 'true'">$(scriptPath)__jit_disasm_list.out</BashDisasmListOutputFile>

<BashCLRTestPreCommands Condition="'$(HasBashDisasmCheck)' == 'true'"><![CDATA[
@(DisasmCheckFiles -> ' dotnet $CORE_ROOT/SuperFileCheck/SuperFileCheck.dll --csharp-list-method-names "%(Identity)" --allow-unused-prefixes --check-prefixes=CHECK,$(TargetArchitecture.ToUpperInvariant()),$(TargetArchitecture.ToUpperInvariant())-$(TargetOS.ToUpperInvariant()) > "$(BashDisasmListOutputFile)"
ERRORLEVEL=$?
export COMPlus_JitDisasm=`cat $(BashDisasmListOutputFile)`
export COMPlus_JitDiffableDasm=1
export COMPlus_JitStdOutFile=$(BashDisasmOutputFile)
if [[ $ERRORLEVEL -ne 0 ]]
then
echo EXECUTION OF FILECHECK - FAILED $ERRORLEVEL
exit 1
fi', '%0a')
if [[ ( -z "$COMPlus_JitStress" ) && ( -z "$COMPlus_JitStressRegs" ) && ( -z "$COMPlus_TailcallStress" ) && ( "$COMPlus_TieredPGO" != "1" ) ]]; then
@(DisasmCheckFiles -> ' dotnet $CORE_ROOT/SuperFileCheck/SuperFileCheck.dll --csharp-list-method-names "%(Identity)" --allow-unused-prefixes --check-prefixes=CHECK,$(TargetArchitecture.ToUpperInvariant()),$(TargetArchitecture.ToUpperInvariant())-$(TargetOS.ToUpperInvariant()) > "$(BashDisasmListOutputFile)"
ERRORLEVEL=$?
export COMPlus_JitDisasm=`cat $(BashDisasmListOutputFile)`
export COMPlus_JitDiffableDasm=1
export COMPlus_JitStdOutFile=$(BashDisasmOutputFile)
if [[ $ERRORLEVEL -ne 0 ]]
then
echo EXECUTION OF FILECHECK - FAILED $ERRORLEVEL
exit 1
fi', '%0a')
fi
]]>
</BashCLRTestPreCommands>

Expand Down Expand Up @@ -276,14 +281,16 @@ fi
<CLRTestBatchPreCommands Condition="'$(HasBatchDisasmCheck)' == 'true'">
<![CDATA[
$(CLRTestBatchPreCommands)
@(DisasmCheckFiles -> ' dotnet %CORE_ROOT%\SuperFileCheck\SuperFileCheck.dll --csharp-list-method-names "%(Identity)" --check-prefixes=CHECK,$(TargetArchitecture.ToUpperInvariant()),$(TargetArchitecture.ToUpperInvariant())-$(TargetOS.ToUpperInvariant()) > "$(BatchDisasmListOutputFile)"
IF NOT "!ERRORLEVEL!" == "0" (
ECHO EXECUTION OF FILECHECK LISTING METHOD NAMES - FAILED !ERRORLEVEL!
Exit /b 1
)', '%0d%0a')
for /F "delims=" %%g in ($(BatchDisasmListOutputFile)) do set COMPlus_JitDisasm=%%g
set COMPlus_JitDiffableDasm=1
set COMPlus_JitStdOutFile=$(BatchDisasmOutputFile)
IF "%COMPlus_JitStress%"=="" IF "%COMPlus_JitStressRegs%"=="" IF "%COMPlus_TailcallStress%"=="" IF NOT "%COMPlus_TieredPGO%" == "1" (
@(DisasmCheckFiles -> ' dotnet %CORE_ROOT%\SuperFileCheck\SuperFileCheck.dll --csharp-list-method-names "%(Identity)" --check-prefixes=CHECK,$(TargetArchitecture.ToUpperInvariant()),$(TargetArchitecture.ToUpperInvariant())-$(TargetOS.ToUpperInvariant()) > "$(BatchDisasmListOutputFile)"
IF NOT "!ERRORLEVEL!" == "0" (
ECHO EXECUTION OF FILECHECK LISTING METHOD NAMES - FAILED !ERRORLEVEL!
Exit /b 1
)', '%0d%0a')
for /F "delims=" %%g in ($(BatchDisasmListOutputFile)) do set COMPlus_JitDisasm=%%g
set COMPlus_JitDiffableDasm=1
set COMPlus_JitStdOutFile=$(BatchDisasmOutputFile)
)
]]>
</CLRTestBatchPreCommands>

Expand Down

0 comments on commit c6f5267

Please sign in to comment.