Baseline most of the Pri0 test suite (#81685)
authorMichal Strehovský <MichalStrehovsky@users.noreply.github.com>
Tue, 7 Feb 2023 23:48:09 +0000 (08:48 +0900)
committerGitHub <noreply@github.com>
Tue, 7 Feb 2023 23:48:09 +0000 (08:48 +0900)
I made a pass over all Pri0 tests except the JIT directory.

src/tests/Directory.Build.targets
src/tests/Loader/classloader/MethodImpl/generics_override1.ilproj
src/tests/baseservices/exceptions/exceptioninterop/ExceptionInterop.csproj
src/tests/baseservices/exceptions/exceptioninterop/ExceptionInterop_ro.csproj
src/tests/issues.targets
src/tests/nativeaot/Directory.Build.props [new file with mode: 0644]

index d5a2956..597faa1 100644 (file)
     <BuildNativeAotFrameworkObjects Condition="'$(IlcMultiModule)' == 'true'">true</BuildNativeAotFrameworkObjects>
     <DisableFrameworkLibGeneration Condition="'$(BuildNativeAotFrameworkObjects)' == 'true'">true</DisableFrameworkLibGeneration>
     <FrameworkLibPath Condition="'$(BuildNativeAotFrameworkObjects)' == 'true'">$(IlcSdkPath)</FrameworkLibPath>
-
-    <!-- Forced by ILLink targets; we should fix the SDK -->
-    <SelfContained>true</SelfContained>
-    <HasRuntimeOutput>false</HasRuntimeOutput>
-    <_UsingDefaultForHasRuntimeOutput>false</_UsingDefaultForHasRuntimeOutput>
   </PropertyGroup>
 
   <ItemGroup Condition="'$(TestBuildMode)' == 'nativeaot'">
     <IlcReference Include="$(TargetingPackPath)/*.dll" />
+
+    <!-- xunit calls MakeGenericType to check if something is IEquatable -->
+    <IlcArg Condition="'$(EagerlyValidateTypeConstruction)' != 'false'" Include="--feature:System.Reflection.IsTypeConstructionEagerlyValidated=false" />
   </ItemGroup>
 
   <Import Project="$(CoreCLRBuildIntegrationDir)Microsoft.DotNet.ILCompiler.SingleEntry.targets" Condition="'$(TestBuildMode)' == 'nativeaot'" />
index 19cb7bf..974bb2e 100644 (file)
@@ -1,6 +1,9 @@
 <Project Sdk="Microsoft.NET.Sdk.IL">
   <PropertyGroup>
     <OutputType>Exe</OutputType>
+
+    <!-- Testing TypeLoad/MissingMethod exceptions in situations that are expensive to detect -->
+    <NativeAotIncompatible>true</NativeAotIncompatible>
   </PropertyGroup>
   <PropertyGroup>
     <DebugType>pdbonly</DebugType>
index d553892..8e06c4a 100644 (file)
@@ -1,6 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
     <PropertyGroup>
       <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+      <NativeAotIncompatible>true</NativeAotIncompatible>
     </PropertyGroup>
     <ItemGroup>
       <CMakeProjectReference Include="CMakeLists.txt" />
index 99c7f98..fbd90c9 100644 (file)
@@ -1,6 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
     <PropertyGroup>
       <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+      <NativeAotIncompatible>true</NativeAotIncompatible>
     </PropertyGroup>
     <PropertyGroup>
       <DebugType>None</DebugType>
index 5ea0e18..9420fdc 100644 (file)
         <ExcludeList Include="$(XunitTestBinBase)/baseservices/RuntimeConfiguration/TestConfig/*">
             <Issue>Test expects being run with corerun</Issue>
         </ExcludeList>
+        <ExcludeList Include="$(XunitTestBinBase)/baseservices/callconvs/TestCallingConventions/**">
+            <Issue>https://github.com/dotnet/runtime/issues/81677</Issue>
+        </ExcludeList>
         <ExcludeList Include="$(XunitTestBinBase)/JIT/Directed/debugging/debuginfo/tester/*">
             <Issue>Just-in-time compilation test</Issue>
         </ExcludeList>
         <ExcludeList Include="$(XunitTestBinBase)/Interop/ICustomMarshaler/ConflictingNames/MultipleALCs/*">
             <Issue>https://github.com/dotnet/runtimelab/issues/155: AssemblyLoadContext.LoadFromAssemblyPath</Issue>
         </ExcludeList>
+        <ExcludeList Include = "$(XunitTestBinBase)/Interop/DisabledRuntimeMarshalling/**">
+            <Issue>https://github.com/dotnet/runtime/issues/81676</Issue>
+        </ExcludeList>
+        <ExcludeList Include="$(XunitTestBinBase)/Interop/PInvoke/Attributes/LCID/LCIDTest/*">
+            <Issue>https://github.com/dotnet/runtimelab/issues/155: LCID marshalling</Issue>
+        </ExcludeList>
+        <ExcludeList Include="$(XunitTestBinBase)/Interop/PInvoke/Int128/Int128TestFieldLayout/*">
+            <Issue>https://github.com/dotnet/runtime/issues/74549</Issue>
+        </ExcludeList>
+        <ExcludeList Include="$(XunitTestBinBase)/Interop/PInvoke/Array/MarshalArrayAsParam/AsLPArray/AsLPArrayTest/**">
+            <Issue>https://github.com/dotnet/runtime/issues/81674</Issue>
+        </ExcludeList>
+        <ExcludeList Include="$(XunitTestBinBase)/Interop/LayoutClass/LayoutClassTest/**">
+            <Issue>https://github.com/dotnet/runtime/issues/81673</Issue>
+        </ExcludeList>
         <ExcludeList Include="$(XunitTestBinBase)/Interop/MarshalAPI/FunctionPointer/FunctionPtrTest/*">
             <Issue>https://github.com/dotnet/runtimelab/issues/164</Issue>
         </ExcludeList>
         <ExcludeList Include="$(XunitTestBinBase)/Loader/classloader/DictionaryExpansion/DictionaryExpansion/*">
             <Issue>https://github.com/dotnet/runtimelab/issues/154</Issue>
         </ExcludeList>
+        <ExcludeList Include="$(XunitTestBinBase)/Loader/classloader/Casting/Functionpointer/*">
+            <Issue>https://github.com/dotnet/runtime/issues/71883</Issue>
+        </ExcludeList>
+        <ExcludeList Include="$(XunitTestBinBase)/Loader/classloader/generics/Pointers/Pointers/*">
+            <Issue>https://github.com/dotnet/runtime/issues/71883</Issue>
+        </ExcludeList>
         <ExcludeList Include="$(XunitTestBinBase)/Loader/classloader/explicitlayout/Regressions/ASURT/ASURT150271/test3/*">
             <Issue>Won't fix https://github.com/dotnet/corert/issues/2396</Issue>
         </ExcludeList>
diff --git a/src/tests/nativeaot/Directory.Build.props b/src/tests/nativeaot/Directory.Build.props
new file mode 100644 (file)
index 0000000..b1c9743
--- /dev/null
@@ -0,0 +1,10 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <!-- SDK Style projects auto-magically include this file. -->
+  <Import Project="..\Directory.Build.props" />
+
+  <PropertyGroup>
+    <!-- NativeAOT tests don't need this xunit Assert compat quirk.
+         The tests explicitly test customer scenarios with eager type construction checks present. -->
+    <EagerlyValidateTypeConstruction>false</EagerlyValidateTypeConstruction>
+  </PropertyGroup>
+</Project>