Skip to content

Commit b386290

Browse files
lewingCopilot
andauthored
Re-enable wasm runtime tests excluded against closed issues (#136548)
Housekeeping: several browser/wasm CoreCLR runtime-test exclusions point at issues that have since been fixed and closed. This removes the stale ones and turns the remaining permanent limitations into capability-gated skips. ## Re-enabled | Tracking issue | Fixed by | Tests | |---|---|---| | #131925 (open) | #133547 (GC mode across catch resumption) | `Loader/ContextualReflection` (browser CoreCLR) | | #133219 | #133547 | `JIT/opt/ThrowHelper/NonVoidThrowHelper`, `JIT/opt/Vectorization/UnrollEqualsStartsWith` | | #133307 | #133624 (removed only one of its four exclusions) | `JIT/Directed/array-il/complex3`, `JIT/Methodical/Arrays/huge/huge_b`, `JIT/Methodical/VT/port/lcs_gcref` | | #134976 | #134981 | `HardwareIntrinsics_General_r` / `_ro` (`R2RIncompatible` on wasm) | | #133303 (dup, TypeMap crossgen2 `FileNotFoundException` family) | closed | `Interop/Interop.csproj` (`R2RIncompatible` on wasm) | This also drops the `TestLibrary` references that #133463 added only to support these `ActiveIssue`s. ## Permanent limitations, now gated on their capability - `structpasstest` `TestPInvokeCallbacks` (previously an `ActiveIssue` against closed #133565) marshals managed delegates to native callbacks. CoreCLR on wasm (`FEATURE_PORTABLE_ENTRYPOINTS`) deliberately can't create native-callable entrypoints at run time; `COMDelegate::ConvertToCallback` throws `PlatformNotSupported_DynamicEntrypoint`. The test is now `[ConditionalFact(PlatformDetection.IsDynamicEntrypointSupported)]`, using a new runtime-test predicate that is false only for CoreCLR on wasm. The struct-passing tests next to it still run. ## Exposed by re-enabling Interop under wasm R2R Interop's `R2RIncompatible` made `Interop.sh` exit before launching its out-of-process tests, so two of them had never run in the browser R2R lane: - `Interop/PInvoke/Unresolved/UnresolvedPInvokeTests`: crossgen2 crashes when `--strip-il-bodies` is used in non-composite mode (#136545). Marked `R2RIncompatible` on browser until #136549 merges. That PR makes crossgen2 reject the flag without `--composite` and moves it to `CompositeCrossGen2TestExtraArguments`; whichever PR merges second drops this exclusion. - `Interop/ICustomMarshaler/ConflictingNames/MultipleALCs` loads `CustomMarshaler.dll` from the test assembly's directory. Under wasm ReadyToRun, `Assembly.Location` is empty, so it is now gated on `[ConditionalFact(Utilities.HasAssemblyFiles)]`, the same predicate `ContextualReflection` uses. ## Validation Ran locally on browser-wasm CoreCLR Checked, both normally and with `RunCrossGen2=1`. Every affected test either passes or reports the intended skip. `HardwareIntrinsics_General_r` was run only with `RunCrossGen2=1`. Not run locally: WASI (the removed `wasm` exclusions also apply there, and WASI R2R uses composite mode), `HardwareIntrinsics_General_ro`, and the Methodical `_d2`/`_do`/`_ro` copies of `lcs_gcref`. The browser and WASI R2R CI lanes cover these. > [!NOTE] > This PR description was generated with the assistance of GitHub Copilot. --------- Co-authored-by: Copilot App <[email protected]>
1 parent 8cf4609 commit b386290

16 files changed

Lines changed: 8 additions & 32 deletions

File tree

‎src/tests/Common/CoreCLRTestLibrary/PlatformDetection.cs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ public static bool IsMonoInterpreter
113113
public static bool IsWasm => IsBrowser || IsWasi;
114114
public static bool IsReadyToRunCompiled => Environment.GetEnvironmentVariable("TEST_READY_TO_RUN_MODE") == "1";
115115
public static bool IsWasmReadyToRun => IsWasm && IsReadyToRunCompiled;
116+
117+
// CoreCLR on WebAssembly (FEATURE_PORTABLE_ENTRYPOINTS) cannot create native-callable entrypoints at run time,
118+
// e.g. for Marshal.GetFunctionPointerForDelegate or a delegate passed to a P/Invoke.
119+
public static bool IsDynamicEntrypointSupported => !(IsWasm && IsCoreCLR);
116120
public static bool IsNotMultithreadingSupported => !IsMultithreadingSupported;
117121
public static bool IsMultithreadingSupported => RuntimeFeature.IsMultithreadingSupported;
118122

‎src/tests/Interop/ICustomMarshaler/ConflictingNames/RunInALC.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
[ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsCollectibleAssembliesSupported))]
1414
public class RunInALC
1515
{
16-
[Fact]
16+
[ConditionalFact(typeof(Utilities), nameof(Utilities.HasAssemblyFiles))]
1717
public static int TestEntryPoint()
1818
{
1919
try

‎src/tests/Interop/Interop.csproj‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
<CLRTestTargetUnsupported Condition="'$(RuntimeFlavor)' == 'mono' and '$(RuntimeVariant)' == 'llvmfullaot'">true</CLRTestTargetUnsupported>
55
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
66
<Configurations>Debug;Release;Checked</Configurations>
7-
<!-- ActiveIssue https://github.com/dotnet/runtime/issues/133303 -->
8-
<R2RIncompatible Condition="'$(TargetArchitecture)' == 'wasm' and '$(RuntimeFlavor)' == 'coreclr'">true</R2RIncompatible>
97
<!-- Tracking issue: https://github.com/dotnet/runtime/issues/90427 -->
108
<CLRTestTargetUnsupported Condition="'$(RuntimeFlavor)' == 'mono' and '$(RuntimeVariant)' == 'minifullaot'">true</CLRTestTargetUnsupported>
119
<HasMergedInTests>true</HasMergedInTests>

‎src/tests/Interop/PInvoke/Unresolved/UnresolvedPInvokeTests.csproj‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<PropertyGroup>
33
<RequiresProcessIsolation>true</RequiresProcessIsolation>
44
<CrossGen2TestExtraArguments Condition="'$(TargetArchitecture)' == 'wasm'">$(CrossGen2TestExtraArguments) --strip-il-bodies --directpinvoke:libSystem.Native</CrossGen2TestExtraArguments>
5+
<!-- ActiveIssue https://github.com/dotnet/runtime/issues/136545 -->
6+
<R2RIncompatible Condition="'$(TargetOS)' == 'browser' and '$(RuntimeFlavor)' == 'coreclr'">true</R2RIncompatible>
57
</PropertyGroup>
68
<ItemGroup>
79
<Compile Include="UnresolvedPInvokeTests.cs" />

‎src/tests/JIT/Directed/array-il/_Arrayscomplex3.ilproj‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,4 @@
66
<ItemGroup>
77
<Compile Include="complex3.il" />
88
</ItemGroup>
9-
<ItemGroup>
10-
<ProjectReference Include="$(TestLibraryProjectPath)" />
11-
</ItemGroup>
129
</Project>

‎src/tests/JIT/Directed/array-il/complex3.il‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@
66
.publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A )
77
.ver 4:0:0:0
88
}
9-
.assembly extern Microsoft.DotNet.XUnitExtensions
10-
{
11-
.publickeytoken = (31 BF 38 56 AD 36 4E 35 )
12-
}
13-
.assembly extern TestLibrary { .ver 0:0:0:0 }
149
.assembly extern xunit.core {}
1510

1611
.assembly extern legacy library mscorlib {}
@@ -46,11 +41,6 @@
4641

4742
.class public auto ansi Complex2_Array_Test
4843
{
49-
.custom instance void [Microsoft.DotNet.XUnitExtensions]Xunit.ActiveIssueAttribute::.ctor(string, class [mscorlib]System.Type, string[]) = {
50-
string('https://github.com/dotnet/runtime/issues/133307')
51-
type([TestLibrary]TestLibrary.PlatformDetection)
52-
string[1] ('IsWasmReadyToRun')
53-
}
5444
.method public static int32 TestRank(value class Yak[,,,,,,] Odd_Variable) il managed
5545
{
5646
.maxstack 3

‎src/tests/JIT/HardwareIntrinsics/HardwareIntrinsics_General_r.csproj‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
<GCStressIncompatible Condition="'$(TargetArchitecture)' == 'arm64' and '$(TargetOS)' == 'osx'">true</GCStressIncompatible>
66
<GCStressIncompatible Condition="'$(TargetArchitecture)' == 'arm'">true</GCStressIncompatible>
7-
<!-- ActiveIssue https://github.com/dotnet/runtime/issues/134976 -->
8-
<R2RIncompatible Condition="'$(TargetArchitecture)' == 'wasm' and '$(RuntimeFlavor)' == 'coreclr'">true</R2RIncompatible>
97
</PropertyGroup>
108

119
<ItemGroup>

‎src/tests/JIT/HardwareIntrinsics/HardwareIntrinsics_General_ro.csproj‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
<GCStressIncompatible Condition="'$(TargetArchitecture)' == 'arm64' and '$(TargetOS)' == 'osx'">true</GCStressIncompatible>
66
<GCStressIncompatible Condition="'$(TargetArchitecture)' == 'arm'">true</GCStressIncompatible>
7-
<!-- ActiveIssue https://github.com/dotnet/runtime/issues/134976 -->
8-
<R2RIncompatible Condition="'$(TargetArchitecture)' == 'wasm' and '$(RuntimeFlavor)' == 'coreclr'">true</R2RIncompatible>
97
</PropertyGroup>
108

119
<ItemGroup>

‎src/tests/JIT/Methodical/Arrays/huge/huge_b.il‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
extends [mscorlib]System.Object
3737
{
3838
.custom instance void [Microsoft.DotNet.XUnitExtensions]Xunit.ActiveIssueAttribute::.ctor(string, class [mscorlib]System.Type, string[]) = {string('https://github.com/dotnet/runtimelab/issues/155: Arrays with non-zero lower bounds') type([TestLibrary]TestLibrary.PlatformDetection) string[1] ('IsNonZeroLowerBoundArrayNotSupported') }
39-
.custom instance void [Microsoft.DotNet.XUnitExtensions]Xunit.ActiveIssueAttribute::.ctor(string, class [mscorlib]System.Type, string[]) = {string('https://github.com/dotnet/runtime/issues/133307') type([TestLibrary]TestLibrary.PlatformDetection) string[1] ('IsWasmReadyToRun') }
4039
.method public hidebysig static int32
4140
Main() il managed
4241
{

‎src/tests/JIT/Methodical/VT/port/lcs_gcref.cs‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ private static void findLCS(LCSV[,,,] c, LCSV[,,,] b, char[][] seq, LCSV[] len)
100100
}
101101

102102
[Fact]
103-
[ActiveIssue("https://github.com/dotnet/runtime/issues/133307", typeof(TestLibrary.PlatformDetection), nameof(TestLibrary.PlatformDetection.IsWasmReadyToRun))]
104103
[SkipOnCoreClr("This test is not compatible with GCStress.", RuntimeTestModes.AnyGCStress)]
105104
public static int TestEntryPoint()
106105
{

0 commit comments

Comments
 (0)