Skip to content

Commit

Permalink
More native AOT Pri-1 test tree bring up (dotnet#111994)
Browse files Browse the repository at this point in the history
I've also dropped `RequiresProcessIsolation` from tests while I was looking at them.
  • Loading branch information
MichalStrehovsky authored Jan 30, 2025
1 parent 56b7d0e commit 586e891
Show file tree
Hide file tree
Showing 13 changed files with 22 additions and 16 deletions.
2 changes: 2 additions & 0 deletions src/tests/Common/CoreCLRTestLibrary/PlatformDetection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ public static class PlatformDetection

public static bool IsRareEnumsSupported => !Utilities.IsNativeAot;

public static bool IsCollectibleAssembliesSupported => !Utilities.IsNativeAot;

private static volatile Tuple<bool> s_lazyNonZeroLowerBoundArraySupported;
public static bool IsNonZeroLowerBoundArraySupported
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
<!-- Needed for mechanical merging of all remaining tests, this particular project may not actually need process isolation -->
<RequiresProcessIsolation>true</RequiresProcessIsolation>
<CLRTestPriority>1</CLRTestPriority>
<!-- AssemblyDependencyResolver is not supported -->
<NativeAotIncompatible>true</NativeAotIncompatible>
</PropertyGroup>
<ItemGroup>
<Compile Include="InvalidHostingTest.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.IO;
using TestLibrary;
using Xunit;

class TestAssemblyLoadContext : AssemblyLoadContext
Expand Down Expand Up @@ -207,7 +208,7 @@ private static int TestFullUnload(TestCase testCase)
return 100;
}

[Fact]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsCollectibleAssembliesSupported))]
public static int TestEntryPoint()
{
int status = 100;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<ItemGroup>
<ProjectReference Include="TestInterface.csproj" ReferenceOutputAssembly="false" />
<ProjectReference Include="TestClass.csproj" ReferenceOutputAssembly="false" />
<ProjectReference Include="$(TestSourceDir)Common/CoreCLRTestLibrary/CoreCLRTestLibrary.csproj" />
</ItemGroup>

<PropertyGroup>
Expand Down
2 changes: 2 additions & 0 deletions src/tests/Loader/NativeLibs/FromNativePaths.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<UnloadabilityIncompatible>true</UnloadabilityIncompatible>
<CLRTestPriority>1</CLRTestPriority>
<RequiresProcessIsolation>true</RequiresProcessIsolation>
<!-- Test expects a CORE_ROOT -->
<NativeAotIncompatible>true</NativeAotIncompatible>
</PropertyGroup>
<ItemGroup>
<Compile Include="FromNativePaths.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk.IL">
<PropertyGroup>
<!-- Needed for NativeAotIncompatible -->
<RequiresProcessIsolation>true</RequiresProcessIsolation>

<!-- Testing TypeLoad/MissingMethod exceptions in situations that are expensive to detect -->
<NativeAotIncompatible>true</NativeAotIncompatible>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk.IL">
<PropertyGroup>
<!-- Needed for mechanical merging of all remaining tests, this particular project may not actually need process isolation -->
<RequiresProcessIsolation>true</RequiresProcessIsolation>
<CLRTestPriority>1</CLRTestPriority>
<!-- Testing TypeLoad exceptions in situations that are expensive to detect -->
<NativeAotIncompatible>true</NativeAotIncompatible>
</PropertyGroup>
<ItemGroup>
<Compile Include="override_override1.il" />
Expand Down
2 changes: 0 additions & 2 deletions src/tests/Loader/classloader/MethodImpl/self_override1.ilproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk.IL">
<PropertyGroup>
<!-- Needed for mechanical merging of all remaining tests, this particular project may not actually need process isolation -->
<RequiresProcessIsolation>true</RequiresProcessIsolation>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
<PropertyGroup>
Expand Down
2 changes: 0 additions & 2 deletions src/tests/Loader/classloader/MethodImpl/self_override2.ilproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk.IL">
<PropertyGroup>
<!-- Needed for mechanical merging of all remaining tests, this particular project may not actually need process isolation -->
<RequiresProcessIsolation>true</RequiresProcessIsolation>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/tests/Loader/classloader/MethodImpl/self_override3.ilproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk.IL">
<PropertyGroup>
<!-- Needed for mechanical merging of all remaining tests, this particular project may not actually need process isolation -->
<RequiresProcessIsolation>true</RequiresProcessIsolation>
<CLRTestPriority>1</CLRTestPriority>
<!-- Testing TypeLoad exceptions in situations that are expensive to detect -->
<NativeAotIncompatible>true</NativeAotIncompatible>
</PropertyGroup>
<ItemGroup>
<Compile Include="self_override3.il" />
Expand Down
2 changes: 0 additions & 2 deletions src/tests/Loader/classloader/MethodImpl/self_override5.ilproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk.IL">
<PropertyGroup>
<!-- Needed for mechanical merging of all remaining tests, this particular project may not actually need process isolation -->
<RequiresProcessIsolation>true</RequiresProcessIsolation>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- Needed for mechanical merging of all remaining tests, this particular project may not actually need process isolation -->
<RequiresProcessIsolation>true</RequiresProcessIsolation>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CLRTestPriority>1</CLRTestPriority>
</PropertyGroup>
Expand Down
9 changes: 9 additions & 0 deletions src/tests/issues.targets
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,15 @@
<ExcludeList Include="$(XunitTestBinBase)/Loader/classloader/StaticVirtualMethods/DiamondShape/svm_diamondshape_r/*">
<Issue>https://github.com/dotnet/runtime/issues/72589</Issue>
</ExcludeList>
<ExcludeList Include="$(XunitTestBinBase)/Loader/classloader/MethodImpl/self_override2/*">
<Issue>https://github.com/dotnet/runtime/issues/111991</Issue>
</ExcludeList>
<ExcludeList Include="$(XunitTestBinBase)/Loader/classloader/MethodImpl/self_override5/*">
<Issue>https://github.com/dotnet/runtime/issues/111991</Issue>
</ExcludeList>
<ExcludeList Include="$(XunitTestBinBase)/Loader/classloader/methodoverriding/regressions/576621/VSW576621/*">
<Issue>https://github.com/dotnet/runtime/issues/111991</Issue>
</ExcludeList>
<ExcludeList Include="$(XunitTestBinBase)/Loader/classloader/StaticVirtualMethods/NegativeTestCases/**">
<Issue>https://github.com/dotnet/runtimelab/issues/155: Compatible TypeLoadException for invalid inputs</Issue>
</ExcludeList>
Expand Down

0 comments on commit 586e891

Please sign in to comment.