Skip to content

Commit

Permalink
Fix sizeof tests for arm and x86
Browse files Browse the repository at this point in the history
On these tests the arm class layout happens to match the x64/arm64 layout and
is different than the x86 layout.

So, introduce arm specific test projects for these tests.

Also in the recent test build conversion one project was overlooked, so update
that project to work with this new scheme as well.

Closes dotnet#37470.
  • Loading branch information
AndyAyersMS committed Jun 29, 2020
1 parent 4ef07c2 commit 54de37a
Show file tree
Hide file tree
Showing 13 changed files with 111 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk.IL">
<PropertyGroup>
<OutputType>Exe</OutputType>
<RestorePackages>true</RestorePackages>
<CLRTestPriority>1</CLRTestPriority>
<!-- There are arch-specific versions of this test to allow it to be compiled for all targets -->
<CLRTestTargetUnsupported Condition="'$(TargetArchitecture)' != 'arm' and '$(TargetArchitecture)' != 'armel'">true</CLRTestTargetUnsupported>
<DebugType>Full</DebugType>
</PropertyGroup>
<ItemGroup>
<!-- Note arm happens to have the same class layout as 64 bit targets on this test -->
<Compile Include="64sizeof32.il" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
<OutputType>Exe</OutputType>
<RestorePackages>true</RestorePackages>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
<PropertyGroup>
<!-- There are arch-specific versions of this test to allow it to be compiled for all targets -->
<CLRTestTargetUnsupported Condition="'$(TargetArchitecture)' != 'x86'">true</CLRTestTargetUnsupported>
<DebugType>Full</DebugType>
</PropertyGroup>
<ItemGroup>
<Compile Condition="'$(TargetArchitecture)' == 'x86'" Include="sizeof64.il" />
<Compile Condition="'$(TargetArchitecture)' != 'x86'" Include="64sizeof64.il" />
<Compile Include="sizeof32.il" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk.IL">
<PropertyGroup>
<OutputType>Exe</OutputType>
<RestorePackages>true</RestorePackages>
<CLRTestPriority>1</CLRTestPriority>
<DebugType>Full</DebugType>
<!-- There are arch-specific versions of this test to allow it to be compiled for all targets -->
<CLRTestTargetUnsupported Condition="'$(TargetArchitecture)' != 'arm' and '$(TargetArchitecture)' != 'armel'">true</CLRTestTargetUnsupported>
</PropertyGroup>
<ItemGroup>
<!-- Note arm happens to have the same class layout as 64 bit targets on this test -->
<Compile Include="64sizeof64.il" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk.IL">
<PropertyGroup>
<OutputType>Exe</OutputType>
<RestorePackages>true</RestorePackages>
<CLRTestPriority>1</CLRTestPriority>
<DebugType>Full</DebugType>
<!-- There are arch-specific versions of this test to allow it to be compiled for all targets -->
<CLRTestTargetUnsupported Condition="'$(TargetArchitecture)' != 'x86'">true</CLRTestTargetUnsupported>
</PropertyGroup>
<ItemGroup>
<Compile Include="sizeof64.il" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<OutputType>Exe</OutputType>
<RestorePackages>true</RestorePackages>
<CLRTestPriority>1</CLRTestPriority>
<!-- There is a 32 and 64 version of this test to allow it to be compiled for all targets -->
<CLRTestTargetUnsupported Condition="'$(TargetBits)' != '32'">true</CLRTestTargetUnsupported>
<DebugType>Full</DebugType>
<!-- There are arch-specific versions of this test to allow it to be compiled for all targets -->
<CLRTestTargetUnsupported Condition="'$(TargetBits)' != '64'">true</CLRTestTargetUnsupported>
</PropertyGroup>
<ItemGroup>
<Compile Include="sizeof32.il" />
<Compile Include="64sizeof64.il" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk.IL">
<PropertyGroup>
<OutputType>Exe</OutputType>
<RestorePackages>true</RestorePackages>
<CLRTestPriority>1</CLRTestPriority>
<!-- There are arch-specific versions of this test to allow it to be compiled for all targets -->
<CLRTestTargetUnsupported Condition="'$(TargetArchitecture)' != 'arm' and '$(TargetArchitecture)' != 'armel'">true</CLRTestTargetUnsupported>
<DebugType>Full</DebugType>
</PropertyGroup>
<ItemGroup>
<!-- Note arm happens to have the same class layout as 64 bit targets on this test -->
<Compile Include="64sizeof.il" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<OutputType>Exe</OutputType>
<RestorePackages>true</RestorePackages>
<CLRTestPriority>1</CLRTestPriority>
<!-- There is a 32 and 64 version of this test to allow it to be compiled for all targets -->
<CLRTestTargetUnsupported Condition="'$(TargetBits)' != '32'">true</CLRTestTargetUnsupported>
<!-- There are arch-specific versions of this test to allow it to be compiled for all targets -->
<CLRTestTargetUnsupported Condition="'$(TargetArchitecture)' != 'x86'">true</CLRTestTargetUnsupported>
<DebugType>Full</DebugType>
</PropertyGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk.IL">
<PropertyGroup>
<OutputType>Exe</OutputType>
<RestorePackages>true</RestorePackages>
<CLRTestPriority>1</CLRTestPriority>
<!-- There are arch-specific versions of this test to allow it to be compiled for all targets -->
<CLRTestTargetUnsupported Condition="'$(TargetArchitecture)' != 'arm' and '$(TargetArchitecture)' != 'armel'">true</CLRTestTargetUnsupported>
<DebugType>PdbOnly</DebugType>
</PropertyGroup>
<ItemGroup>
<!-- Note arm happens to have the same class layout as 64 bit targets on this test -->
<Compile Include="64sizeof32.il" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<OutputType>Exe</OutputType>
<RestorePackages>true</RestorePackages>
<CLRTestPriority>1</CLRTestPriority>
<!-- There is a 32 and 64 version of this test to allow it to be compiled for all targets -->
<CLRTestTargetUnsupported Condition="'$(TargetBits)' != '32'">true</CLRTestTargetUnsupported>
<!-- There are arch-specific versions of this test to allow it to be compiled for all targets -->
<CLRTestTargetUnsupported Condition="'$(TargetArchitecture)' != 'x86'">true</CLRTestTargetUnsupported>
<DebugType>PdbOnly</DebugType>
</PropertyGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk.IL">
<PropertyGroup>
<OutputType>Exe</OutputType>
<RestorePackages>true</RestorePackages>
<CLRTestPriority>1</CLRTestPriority>
<!-- There are arch-specific versions of this test to allow it to be compiled for all targets -->
<CLRTestTargetUnsupported Condition="'$(TargetArchitecture)' != 'arm' and '$(TargetArchitecture)' != 'armel'">true</CLRTestTargetUnsupported>
<DebugType>PdbOnly</DebugType>
</PropertyGroup>
<ItemGroup>
<!-- Note arm happens to have the same class layout as 64 bit targets on this test -->
<Compile Include="64sizeof64.il" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<OutputType>Exe</OutputType>
<RestorePackages>true</RestorePackages>
<CLRTestPriority>1</CLRTestPriority>
<!-- There is a 32 and 64 version of this test to allow it to be compiled for all targets -->
<CLRTestTargetUnsupported Condition="'$(TargetBits)' != '32'">true</CLRTestTargetUnsupported>
<!-- There are arch-specific versions of this test to allow it to be compiled for all targets -->
<CLRTestTargetUnsupported Condition="'$(TargetArchitecture)' != 'x86'">true</CLRTestTargetUnsupported>
<DebugType>PdbOnly</DebugType>
</PropertyGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk.IL">
<PropertyGroup>
<OutputType>Exe</OutputType>
<RestorePackages>true</RestorePackages>
<CLRTestPriority>1</CLRTestPriority>
<!-- There are arch-specific versions of this test to allow it to be compiled for all targets -->
<CLRTestTargetUnsupported Condition="'$(TargetArchitecture)' != 'arm' and '$(TargetArchitecture)' != 'armel'">true</CLRTestTargetUnsupported>
<DebugType>PdbOnly</DebugType>
</PropertyGroup>
<ItemGroup>
<!-- Note arm happens to have the same class layout as 64 bit targets on this test -->
<Compile Include="64sizeof.il" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<OutputType>Exe</OutputType>
<RestorePackages>true</RestorePackages>
<CLRTestPriority>1</CLRTestPriority>
<!-- There is a 32 and 64 version of this test to allow it to be compiled for all targets -->
<CLRTestTargetUnsupported Condition="'$(TargetBits)' != '32'">true</CLRTestTargetUnsupported>
<!-- There are arch-specific versions of this test to allow it to be compiled for all targets -->
<CLRTestTargetUnsupported Condition="'$(TargetArchitecture)' != 'x86'">true</CLRTestTargetUnsupported>
<DebugType>PdbOnly</DebugType>
</PropertyGroup>
<ItemGroup>
Expand Down

0 comments on commit 54de37a

Please sign in to comment.