Skip to content

Commit 0c4851b

Browse files
CopilotAndyAyersMS
andauthored
Fix FileNotFoundException in NativeAOT test (#132173)
- [x] Diagnose: `Runtime_101046.csproj` and `Runtime_101046.ilproj` shared the same project name, so they shared `OutputPath`/`IntermediateOutputPath` and the generated `.cmd`/`.sh` wrapper and overwrote each other's outputs. After #131110 added a `TestLibrary` `ProjectReference` + `[ActiveIssue(typeof(PlatformDetection), ...)]` to the C# variant only, NativeAOT builds could ILC-compile the C# assembly without `TestLibrary` in its reference set, so `__GeneratedMainWrapper.Main()` became a throwing body (`FileNotFoundException: Could not find file 'TestLibrary'`). - [x] Rename the C# variant to `Runtime_101046_1` (project, source file, test class) so the two tests no longer share output/intermediate directories - [x] Replace the `TestLibrary`-based `ActiveIssue` gate with the `CLRTestTargetUnsupported` project gate used by sibling native-asset tests - [x] Apply the same native-test-asset gate to the IL variant, which now actually runs - [x] Gate the IL variant off x64 Unix: once it really runs it fails there (JIT passes the un-normalized `uint16`, the clang-built callee assumes normalization) — needs a JIT-team decision, noted for follow-up - [x] Validate: built `clr+libs` and the test tree, ran both wrappers on linux-x64 (`Runtime_101046_1` passes; IL variant excluded on x64 Unix) <!-- START COPILOT CODING AGENT SUFFIX --> - Fixes #131997 --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: AndyAyersMS <[email protected]>
1 parent 1b245d5 commit 0c4851b

3 files changed

Lines changed: 9 additions & 5 deletions

File tree

‎src/tests/JIT/Regression/JitBlue/Runtime_101046/Runtime_101046.ilproj‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
<RequiresProcessIsolation>true</RequiresProcessIsolation>
55
<DebugType>None</DebugType>
66
<Optimize>True</Optimize>
7+
<!-- These platforms do not support native test assets: https://github.com/dotnet/runtime/issues/123946 -->
8+
<CLRTestTargetUnsupported Condition="'$(TargetsWasm)' == 'true' or '$(TargetsMobile)' == 'true'">true</CLRTestTargetUnsupported>
9+
<!-- Excluded on x64 Unix due to LLVM non-standard ABI handling for small integer upper bits:
10+
https://github.com/llvm/llvm-project/issues/43573 -->
11+
<CLRTestTargetUnsupported Condition="'$(TargetArchitecture)' == 'x64' and '$(TargetsUnix)' == 'true'">true</CLRTestTargetUnsupported>
712
</PropertyGroup>
813
<ItemGroup>
914
<CMakeProjectReference Include="CMakeLists.txt" />

src/tests/JIT/Regression/JitBlue/Runtime_101046/Runtime_101046.cs renamed to src/tests/JIT/Regression/JitBlue/Runtime_101046/Runtime_101046_1.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,12 @@
66
using System;
77
using System.Runtime.CompilerServices;
88
using System.Runtime.InteropServices;
9-
using TestLibrary;
109
using Xunit;
1110

12-
public unsafe class Runtime_101046
11+
public unsafe class Runtime_101046_1
1312
{
1413
[Fact]
1514
[ActiveIssue("https://github.com/dotnet/runtime/issues/106393", TestRuntimes.Mono)]
16-
[ActiveIssue("https://github.com/dotnet/runtime/issues/123946", typeof(PlatformDetection), nameof(PlatformDetection.PlatformDoesNotSupportNativeTestAssets))]
1715
public static int TestEntryPoint()
1816
{
1917
ushort value = unchecked((ushort)-123);

src/tests/JIT/Regression/JitBlue/Runtime_101046/Runtime_101046.csproj renamed to src/tests/JIT/Regression/JitBlue/Runtime_101046/Runtime_101046_1.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44
<RequiresProcessIsolation>true</RequiresProcessIsolation>
55
<Optimize>True</Optimize>
66
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
7+
<!-- These platforms do not support native test assets: https://github.com/dotnet/runtime/issues/123946 -->
8+
<CLRTestTargetUnsupported Condition="'$(TargetsWasm)' == 'true' or '$(TargetsMobile)' == 'true'">true</CLRTestTargetUnsupported>
79
</PropertyGroup>
810
<ItemGroup>
911
<CMakeProjectReference Include="CMakeLists.txt" />
1012
<Compile Include="$(MSBuildProjectName).cs" />
11-
<ProjectReference Include="$(TestLibraryProjectPath)" />
1213
</ItemGroup>
13-
</Project>
14+
</Project>

0 commit comments

Comments
 (0)