diff --git a/src/tests/Common/CoreCLRTestLibrary/CoreClrConfigurationDetection.cs b/src/tests/Common/CoreCLRTestLibrary/CoreClrConfigurationDetection.cs index 8b6d893f8d9714..0f068499a60a08 100644 --- a/src/tests/Common/CoreCLRTestLibrary/CoreClrConfigurationDetection.cs +++ b/src/tests/Common/CoreCLRTestLibrary/CoreClrConfigurationDetection.cs @@ -23,8 +23,20 @@ public static class CoreClrConfigurationDetection public static bool IsTieredCompilation => string.Equals(GetEnvironmentVariableValue("TieredCompilation", "1"), "1", StringComparison.InvariantCulture); public static bool IsHeapVerify => string.Equals(GetEnvironmentVariableValue("HeapVerify"), "1", StringComparison.InvariantCulture); + public static bool IsCoreClrInterpreter + { + get + { + if (!string.IsNullOrWhiteSpace(GetEnvironmentVariableValue("Interpreter", ""))) + return true; + if (int.TryParse(GetEnvironmentVariableValue("InterpMode", "0"), out int mode) && (mode > 0)) + return true; + return false; + } + } + public static bool IsGCStress => !string.Equals(GetEnvironmentVariableValue("GCStress"), "0", StringComparison.InvariantCulture); - + public static bool IsAnyJitStress => IsJitStress || IsJitStressRegs || IsJitMinOpts || IsTailCallStress; public static bool IsAnyJitOptimizationStress => IsAnyJitStress || IsTieredCompilation; @@ -58,4 +70,4 @@ private static bool CompareGCStressModeAsLower(string value, string first, strin string.Equals(value, "0xf", StringComparison.InvariantCulture) || string.Equals(value, "f", StringComparison.InvariantCulture); } -} \ No newline at end of file +} diff --git a/src/tests/Common/CoreCLRTestLibrary/Utilities.cs b/src/tests/Common/CoreCLRTestLibrary/Utilities.cs index 302f00c565d0e1..35827663d66bd5 100644 --- a/src/tests/Common/CoreCLRTestLibrary/Utilities.cs +++ b/src/tests/Common/CoreCLRTestLibrary/Utilities.cs @@ -99,6 +99,18 @@ public static bool IsWindowsIoTCore public static bool IsNativeAot => IsNotMonoRuntime && !IsReflectionEmitSupported; public static bool IsNotNativeAot => !IsNativeAot; + public static bool IsCoreClrInterpreter + { + get + { + if (!string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("DOTNET_Interpreter"))) + return true; + if (int.TryParse(Environment.GetEnvironmentVariable("DOTNET_InterpMode") ?? "", out int mode) && (mode > 0)) + return true; + return false; + } + } + public static bool HasAssemblyFiles => !string.IsNullOrEmpty(typeof(Utilities).Assembly.Location); public static bool IsSingleFile => !HasAssemblyFiles; diff --git a/src/tests/Common/XUnitWrapperGenerator/RuntimeTestModes.cs b/src/tests/Common/XUnitWrapperGenerator/RuntimeTestModes.cs index f4d60288ca6e77..d2c3edc20e17e6 100644 --- a/src/tests/Common/XUnitWrapperGenerator/RuntimeTestModes.cs +++ b/src/tests/Common/XUnitWrapperGenerator/RuntimeTestModes.cs @@ -43,5 +43,7 @@ public enum RuntimeTestModes AnyJitOptimizationStress = AnyJitStress | TieredCompilation, // Disable when any JIT non-full optimization stress mode is exercised. HeapVerify = 1 << 9, // DOTNET_HeapVerify (or COMPlus_HeapVerify) is set. + + InterpreterActive = 1 << 10, // DOTNET_Interpreter != "" or DOTNET_InterpMode != 0 } } diff --git a/src/tests/Common/XUnitWrapperGenerator/XUnitWrapperGenerator.cs b/src/tests/Common/XUnitWrapperGenerator/XUnitWrapperGenerator.cs index 6f0e669dda18a3..9ab1ab1ae83dda 100644 --- a/src/tests/Common/XUnitWrapperGenerator/XUnitWrapperGenerator.cs +++ b/src/tests/Common/XUnitWrapperGenerator/XUnitWrapperGenerator.cs @@ -936,6 +936,10 @@ private static ImmutableArray DecorateWithSkipOnCoreClrConfiguration( { conditions.Add($"!{ConditionClass}.IsHeapVerify"); } + if (skippedTestModes.HasFlag(Xunit.RuntimeTestModes.InterpreterActive)) + { + conditions.Add($"!{ConditionClass}.IsCoreClrInterpreter"); + } if (skippedTestModes.HasFlag(Xunit.RuntimeTestModes.AnyGCStress)) { diff --git a/src/tests/Interop/COM/ComWrappers/API/Program.cs b/src/tests/Interop/COM/ComWrappers/API/Program.cs index 2751f427838e91..62709f52d03998 100644 --- a/src/tests/Interop/COM/ComWrappers/API/Program.cs +++ b/src/tests/Interop/COM/ComWrappers/API/Program.cs @@ -1125,6 +1125,7 @@ protected override void ReleaseObjects(IEnumerable objects) [Fact] [PlatformSpecific(TestPlatforms.Windows)] // COM apartments are Windows-specific + [Xunit.SkipOnCoreClrAttribute("Depends on marshalled calli", RuntimeTestModes.InterpreterActive)] public unsafe void CrossApartmentQueryInterface_NoDeadlock() { Console.WriteLine($"Running {nameof(CrossApartmentQueryInterface_NoDeadlock)}..."); diff --git a/src/tests/Interop/COM/ComWrappers/GlobalInstance/GlobalInstance.Marshalling.cs b/src/tests/Interop/COM/ComWrappers/GlobalInstance/GlobalInstance.Marshalling.cs index eeb20b061e06a7..de8e094101edd9 100644 --- a/src/tests/Interop/COM/ComWrappers/GlobalInstance/GlobalInstance.Marshalling.cs +++ b/src/tests/Interop/COM/ComWrappers/GlobalInstance/GlobalInstance.Marshalling.cs @@ -21,6 +21,7 @@ private static void ValidateNotRegisteredForTrackerSupport() } [Fact] + [Xunit.SkipOnCoreClrAttribute("Depends on windows-only COM->CLR transitions flowing hidden parameter", RuntimeTestModes.InterpreterActive)] public static int TestEntryPoint() { try diff --git a/src/tests/Interop/COM/ComWrappers/GlobalInstance/GlobalInstance.TrackerSupport.cs b/src/tests/Interop/COM/ComWrappers/GlobalInstance/GlobalInstance.TrackerSupport.cs index 3346bb9237115b..d8b767cd1ebd7d 100644 --- a/src/tests/Interop/COM/ComWrappers/GlobalInstance/GlobalInstance.TrackerSupport.cs +++ b/src/tests/Interop/COM/ComWrappers/GlobalInstance/GlobalInstance.TrackerSupport.cs @@ -27,6 +27,7 @@ private static void ValidateNotRegisteredForMarshalling() } [Fact] + [Xunit.SkipOnCoreClrAttribute("Depends on windows-only COM->CLR transitions flowing hidden parameter", RuntimeTestModes.InterpreterActive)] public static int TestEntryPoint() { try diff --git a/src/tests/Interop/COM/Dynamic/Program.cs b/src/tests/Interop/COM/Dynamic/Program.cs index 9259a067dd083c..6922a9b872be7c 100644 --- a/src/tests/Interop/COM/Dynamic/Program.cs +++ b/src/tests/Interop/COM/Dynamic/Program.cs @@ -11,6 +11,7 @@ namespace Dynamic public class Program { [Fact] + [Xunit.SkipOnCoreClrAttribute("Depends on COM behavior that is not correct in interpreter", RuntimeTestModes.InterpreterActive)] public static int TestEntryPoint() { // RegFree COM is not supported on Windows Nano diff --git a/src/tests/Interop/COM/ExtensionPoints/ExtensionPoints.cs b/src/tests/Interop/COM/ExtensionPoints/ExtensionPoints.cs index bf353e472aa9b3..33f27f520d342a 100644 --- a/src/tests/Interop/COM/ExtensionPoints/ExtensionPoints.cs +++ b/src/tests/Interop/COM/ExtensionPoints/ExtensionPoints.cs @@ -41,6 +41,7 @@ public virtual void PostHeapMinimize() { } } [Fact] + [Xunit.SkipOnCoreClrAttribute("Depends on marshalled calli", RuntimeTestModes.InterpreterActive)] public static unsafe void Validate_Managed_IMallocSpy() { Console.WriteLine($"Running {nameof(Validate_Managed_IMallocSpy)}..."); @@ -79,4 +80,4 @@ static int ArrayLen(char** ptr) return (int)(ptr - begin); } } -} \ No newline at end of file +} diff --git a/src/tests/Interop/COM/NETClients/IDispatch/Program.cs b/src/tests/Interop/COM/NETClients/IDispatch/Program.cs index 4324913a5a1fb6..ecc453883cf68f 100644 --- a/src/tests/Interop/COM/NETClients/IDispatch/Program.cs +++ b/src/tests/Interop/COM/NETClients/IDispatch/Program.cs @@ -350,7 +350,7 @@ static void Validate_ValueCoerce_ReturnToManaged() public static int TestEntryPoint() { // RegFree COM is not supported on Windows Nano - if (Utilities.IsWindowsNanoServer) + if (Utilities.IsWindowsNanoServer || Utilities.IsCoreClrInterpreter) { return 100; } diff --git a/src/tests/Interop/ExecInDefAppDom/ExecInDefAppDom.cs b/src/tests/Interop/ExecInDefAppDom/ExecInDefAppDom.cs index e98605c1a0ebf1..698eebc22596a7 100644 --- a/src/tests/Interop/ExecInDefAppDom/ExecInDefAppDom.cs +++ b/src/tests/Interop/ExecInDefAppDom/ExecInDefAppDom.cs @@ -81,10 +81,17 @@ public static int TestEntryPoint() result += TestExecuteInAppDomain(myPath, "FakeInjectedCode", "WrongReturnType", "None", COR_E_MISSINGMETHOD, 0); result += TestExecuteInAppDomain(myPath, "FakeInjectedCode", "Return0", "None", S_OK, 0); result += TestExecuteInAppDomain(myPath, "FakeInjectedCode", "Return1", "None", S_OK, 1); - result += TestExecuteInAppDomain(myPath, "FakeInjectedCode", "ThrowAnything", "None", COR_E_EXCEPTION, 0); + // This requires EH interop which is not currently supported by the interpreter. See https://github.com/dotnet/runtime/issues/118965 + if (!TestLibrary.Utilities.IsCoreClrInterpreter) + { + result += TestExecuteInAppDomain(myPath, "FakeInjectedCode", "ThrowAnything", "None", COR_E_EXCEPTION, 0); + } result += TestExecuteInAppDomain(myPath, "FakeInjectedCode", "ParseArgument", "0", S_OK, 0); result += TestExecuteInAppDomain(myPath, "FakeInjectedCode", "ParseArgument", "200", S_OK, 200); - result += TestExecuteInAppDomain(myPath, "FakeInjectedCode", "ParseArgument", "None", COR_E_FORMAT, 0); + if (!TestLibrary.Utilities.IsCoreClrInterpreter) + { + result += TestExecuteInAppDomain(myPath, "FakeInjectedCode", "ParseArgument", "None", COR_E_FORMAT, 0); + } result += TestExecuteInAppDomain(injectedPath, "InjectedCode", "ParseArgument", "300", S_OK, 300); return result; diff --git a/src/tests/Interop/MarshalAPI/FunctionPointer/GenericFunctionPointer.cs b/src/tests/Interop/MarshalAPI/FunctionPointer/GenericFunctionPointer.cs index 9bc6d4b05fd6ef..6568ee3cc8783f 100644 --- a/src/tests/Interop/MarshalAPI/FunctionPointer/GenericFunctionPointer.cs +++ b/src/tests/Interop/MarshalAPI/FunctionPointer/GenericFunctionPointer.cs @@ -15,7 +15,7 @@ static int UnmanagedExportedFunction(float arg) { return Convert.ToInt32(arg); } - + [UnmanagedCallersOnly] static BlittableGeneric UnmanagedExportedFunctionBlittableGenericInt(float arg) { @@ -68,6 +68,7 @@ struct BlittableGeneric [InlineData(-1f)] [InlineData(42f)] [InlineData(60f)] + [Xunit.SkipOnCoreClrAttribute("Depends on marshalled calli", RuntimeTestModes.InterpreterActive)] public static void RunGenericFunctionPointerTest(float inVal) { Console.WriteLine($"Running {nameof(RunGenericFunctionPointerTest)}..."); @@ -80,7 +81,7 @@ public static void RunGenericFunctionPointerTest(float inVal) outVar = GenericCaller.GenericCalli((delegate* unmanaged)&UnmanagedExportedFunction, inVal); } Assert.Equal(expectedValue, outVar); - + outVar = 0; Console.WriteLine("Testing GenericCalli with BlittableGeneric as the return type"); unsafe @@ -113,6 +114,7 @@ public static void RunGenericFunctionPointerTest(float inVal) } [ConditionalFact(nameof(CanRunInvalidGenericFunctionPointerTest))] + [Xunit.SkipOnCoreClrAttribute("Depends on marshalled calli", RuntimeTestModes.InterpreterActive)] public static void RunInvalidGenericFunctionPointerTest() { Console.WriteLine($"Running {nameof(RunInvalidGenericFunctionPointerTest)}..."); diff --git a/src/tests/Interop/NativeLibrary/Callback/CallbackStressTest.cs b/src/tests/Interop/NativeLibrary/Callback/CallbackStressTest.cs index b0cf5c59fb78e9..650d0ee27d3875 100644 --- a/src/tests/Interop/NativeLibrary/Callback/CallbackStressTest.cs +++ b/src/tests/Interop/NativeLibrary/Callback/CallbackStressTest.cs @@ -107,7 +107,7 @@ public static void DoCallTryFinally() public static void ManualRaiseException() { #if WINDOWS - if (!TestLibrary.Utilities.IsMonoRuntime) + if (!TestLibrary.Utilities.IsMonoRuntime && !TestLibrary.Utilities.IsCoreClrInterpreter) { try { diff --git a/src/tests/Interop/PInvoke/IEnumerator/IEnumeratorTest.cs b/src/tests/Interop/PInvoke/IEnumerator/IEnumeratorTest.cs index 9ed65bd5f2771e..9ca1f50ee5e8ac 100644 --- a/src/tests/Interop/PInvoke/IEnumerator/IEnumeratorTest.cs +++ b/src/tests/Interop/PInvoke/IEnumerator/IEnumeratorTest.cs @@ -74,6 +74,7 @@ public static void TestManagedRoundTrip() } [Fact] + [Xunit.SkipOnCoreClrAttribute("Depends on COM behavior that is not correct in interpreter", RuntimeTestModes.InterpreterActive)] public static void TestSupportForICustomAdapter() { { diff --git a/src/tests/Interop/PInvoke/Int128/Int128Test.cs b/src/tests/Interop/PInvoke/Int128/Int128Test.cs index 56bed4f2bfe0ec..22e70843355e16 100644 --- a/src/tests/Interop/PInvoke/Int128/Int128Test.cs +++ b/src/tests/Interop/PInvoke/Int128/Int128Test.cs @@ -10,6 +10,8 @@ public struct StructJustInt128 { public StructJustInt128(Int128 val) { value = val; } public Int128 value; + + public override string ToString() => $"StructJustInt128(value={value:X32})"; } public struct StructWithInt128 @@ -17,6 +19,8 @@ public struct StructWithInt128 public StructWithInt128(Int128 val) { value = val; messUpPadding = 0x10; } public byte messUpPadding; public Int128 value; + + public override string ToString() => $"StructWithInt128(messUpPadding={messUpPadding}, value={value:X32})"; } unsafe partial class Int128Native @@ -111,6 +115,7 @@ public static void TestInt128FieldLayout() StructWithInt128 rhs = new StructWithInt128(new Int128(13, 14)); Int128Native.AddStructWithInt128_ByRef(ref lhs, ref rhs); + // Interpreter-FIXME: Incorrect result. Tracked by https://github.com/dotnet/runtime/issues/118618 Assert.Equal(new StructWithInt128(new Int128(24, 26)), lhs); Int128 value2; diff --git a/src/tests/Interop/PInvoke/Miscellaneous/CopyCtor/CopyCtorTest.cs b/src/tests/Interop/PInvoke/Miscellaneous/CopyCtor/CopyCtorTest.cs index 9601a835bb79ac..f58d45154616e5 100644 --- a/src/tests/Interop/PInvoke/Miscellaneous/CopyCtor/CopyCtorTest.cs +++ b/src/tests/Interop/PInvoke/Miscellaneous/CopyCtor/CopyCtorTest.cs @@ -45,6 +45,7 @@ public static unsafe int StructWithCtorTest(StructWithCtor* ptrStruct, ref Struc [SkipOnMono("Not supported on Mono")] [ActiveIssue("https://github.com/dotnet/runtimelab/issues/155", typeof(TestLibrary.Utilities), nameof(TestLibrary.Utilities.IsNativeAot))] [SkipOnCoreClr("JitStress can introduce extra copies", RuntimeTestModes.JitStress)] + [Xunit.SkipOnCoreClrAttribute("Depends on marshalled calli", RuntimeTestModes.InterpreterActive)] public static unsafe void ValidateCopyConstructorAndDestructorCalled() { CopyCtorUtil.TestDelegate del = (CopyCtorUtil.TestDelegate)Delegate.CreateDelegate(typeof(CopyCtorUtil.TestDelegate), typeof(CopyCtor).GetMethod("StructWithCtorTest")); diff --git a/src/tests/Interop/PInvoke/NativeCallManagedComVisible/AssemblyTrue/AssemblyTrueTest.cs b/src/tests/Interop/PInvoke/NativeCallManagedComVisible/AssemblyTrue/AssemblyTrueTest.cs index 5b91576b75749e..5809830ec0522b 100644 --- a/src/tests/Interop/PInvoke/NativeCallManagedComVisible/AssemblyTrue/AssemblyTrueTest.cs +++ b/src/tests/Interop/PInvoke/NativeCallManagedComVisible/AssemblyTrue/AssemblyTrueTest.cs @@ -643,6 +643,7 @@ public sealed class NestedClassGenericServer : INestedInterfaceVisibleTrue, I [ConditionalFact(typeof(TestLibrary.Utilities), nameof(TestLibrary.Utilities.IsNotNativeAot))] [PlatformSpecific(TestPlatforms.Windows)] [SkipOnMono("Requires COM support")] + [Xunit.SkipOnCoreClrAttribute("Depends on marshalled calli", RuntimeTestModes.InterpreterActive)] public static void RunComVisibleTests() { int fooSuccessVal = 0; diff --git a/src/tests/Interop/PInvoke/NativeCallManagedComVisible/AssemblyWithoutComVisible/AssemblyWithoutComVisibleTest.cs b/src/tests/Interop/PInvoke/NativeCallManagedComVisible/AssemblyWithoutComVisible/AssemblyWithoutComVisibleTest.cs index 081a44e0ccf1f8..d7709383fc1152 100644 --- a/src/tests/Interop/PInvoke/NativeCallManagedComVisible/AssemblyWithoutComVisible/AssemblyWithoutComVisibleTest.cs +++ b/src/tests/Interop/PInvoke/NativeCallManagedComVisible/AssemblyWithoutComVisible/AssemblyWithoutComVisibleTest.cs @@ -643,6 +643,7 @@ public sealed class NestedClassGenericServer : INestedInterfaceVisibleTrue, I [ConditionalFact(typeof(TestLibrary.Utilities), nameof(TestLibrary.Utilities.IsNotNativeAot))] [PlatformSpecific(TestPlatforms.Windows)] [SkipOnMono("Requires COM support")] + [Xunit.SkipOnCoreClrAttribute("Depends on marshalled calli", RuntimeTestModes.InterpreterActive)] public static void RunComVisibleTests() { int fooSuccessVal = 0; diff --git a/src/tests/Interop/PInvoke/NativeCallManagedComVisible/Default/DefaultTest.cs b/src/tests/Interop/PInvoke/NativeCallManagedComVisible/Default/DefaultTest.cs index 02252520217246..6aa743b51e90ec 100644 --- a/src/tests/Interop/PInvoke/NativeCallManagedComVisible/Default/DefaultTest.cs +++ b/src/tests/Interop/PInvoke/NativeCallManagedComVisible/Default/DefaultTest.cs @@ -705,6 +705,7 @@ public sealed class NestedClassGenericServer : INestedInterfaceVisibleTrue, I /// /// [Fact] + [Xunit.SkipOnCoreClrAttribute("Depends on marshalled calli", RuntimeTestModes.InterpreterActive)] public static void RunComVisibleTests() { int fooSuccessVal = 0; @@ -1003,6 +1004,7 @@ public static void RunComVisibleTests() } [Fact] + [Xunit.SkipOnCoreClrAttribute("Depends on marshalled calli", RuntimeTestModes.InterpreterActive)] public static void RunTestsInALC() { TestLibrary.Utilities.ExecuteAndUnload(typeof(ComVisibleServer).Assembly.Location, nameof(ComVisibleServer), nameof(RunComVisibleTests)); diff --git a/src/tests/Interop/PInvoke/Varargs/VarargsTest.cs b/src/tests/Interop/PInvoke/Varargs/VarargsTest.cs index e36cfc158066ba..da6e54e22a1cc8 100644 --- a/src/tests/Interop/PInvoke/Varargs/VarargsTest.cs +++ b/src/tests/Interop/PInvoke/Varargs/VarargsTest.cs @@ -39,6 +39,7 @@ private static bool AssertEqual(string lhs, string rhs) [SkipOnMono("PInvoke Varargs/ArgIterator marshalling not supported on Mono")] [ActiveIssue("https://github.com/dotnet/runtimelab/issues/155", typeof(TestLibrary.Utilities), nameof(TestLibrary.Utilities.IsNativeAot))] [ActiveIssue("https://github.com/dotnet/runtime/issues/91388", typeof(TestLibrary.PlatformDetection), nameof(TestLibrary.PlatformDetection.PlatformDoesNotSupportNativeTestAssets))] + [Xunit.SkipOnCoreClrAttribute("Depends on varargs", RuntimeTestModes.InterpreterActive)] public static int TestEntryPoint() { var passed = true; diff --git a/src/tests/Interop/PInvoke/Variant/VariantTest.BuiltInCom.cs b/src/tests/Interop/PInvoke/Variant/VariantTest.BuiltInCom.cs index 6e2f062f8412df..5e3eea6e0a4df5 100644 --- a/src/tests/Interop/PInvoke/Variant/VariantTest.BuiltInCom.cs +++ b/src/tests/Interop/PInvoke/Variant/VariantTest.BuiltInCom.cs @@ -12,6 +12,7 @@ public partial class Test_VariantTest [Fact] [PlatformSpecific(TestPlatforms.Windows)] [ActiveIssue("https://github.com/dotnet/runtimelab/issues/155", typeof(TestLibrary.Utilities), nameof(TestLibrary.Utilities.IsNativeAot))] + [Xunit.SkipOnCoreClrAttribute("Depends on marshalled calli", RuntimeTestModes.InterpreterActive)] public static int TestEntryPoint() { bool builtInComDisabled=false; diff --git a/src/tests/Interop/PInvoke/Variant/VariantTest.ComWrappers.cs b/src/tests/Interop/PInvoke/Variant/VariantTest.ComWrappers.cs index 6300227887921c..156463443a8881 100644 --- a/src/tests/Interop/PInvoke/Variant/VariantTest.ComWrappers.cs +++ b/src/tests/Interop/PInvoke/Variant/VariantTest.ComWrappers.cs @@ -15,6 +15,7 @@ public partial class Test_VariantTest [Fact] [PlatformSpecific(TestPlatforms.Windows)] [ActiveIssue("https://github.com/dotnet/runtimelab/issues/155", typeof(TestLibrary.Utilities), nameof(TestLibrary.Utilities.IsNativeAot))] + [Xunit.SkipOnCoreClrAttribute("Depends on marshalled calli", RuntimeTestModes.InterpreterActive)] public static int TestEntryPoint() { bool testComMarshal=true; diff --git a/src/tests/Interop/SuppressGCTransition/SuppressGCTransitionTest.cs b/src/tests/Interop/SuppressGCTransition/SuppressGCTransitionTest.cs index 8a040460f1d89c..9c4131e2120faf 100644 --- a/src/tests/Interop/SuppressGCTransition/SuppressGCTransitionTest.cs +++ b/src/tests/Interop/SuppressGCTransition/SuppressGCTransitionTest.cs @@ -288,6 +288,7 @@ private static int ILStubCache_NoGCTransition_GCTransition(int expected) [Fact] [ActiveIssue("https://github.com/dotnet/runtime/issues/91388", typeof(TestLibrary.PlatformDetection), nameof(TestLibrary.PlatformDetection.PlatformDoesNotSupportNativeTestAssets))] + [Xunit.SkipOnCoreClrAttribute("Depends on marshalled pinvoke calli", RuntimeTestModes.InterpreterActive)] public static void TestEntryPoint() { CheckGCMode.Initialize(&SuppressGCTransitionNative.SetIsInCooperativeModeFunction); diff --git a/src/tests/Interop/UnmanagedCallersOnly/UnmanagedCallersOnlyTest.cs b/src/tests/Interop/UnmanagedCallersOnly/UnmanagedCallersOnlyTest.cs index 8f8baa7e226f9e..7d4d3c57d4d85a 100644 --- a/src/tests/Interop/UnmanagedCallersOnly/UnmanagedCallersOnlyTest.cs +++ b/src/tests/Interop/UnmanagedCallersOnly/UnmanagedCallersOnlyTest.cs @@ -41,8 +41,8 @@ public static int TestEntryPoint() TestPInvokeMarkedWithUnmanagedCallersOnly(); TestUnmanagedCallersOnlyWithGeneric(); - // Exception handling is only supported on CoreCLR Windows. - if (TestLibrary.Utilities.IsWindows && !TestLibrary.Utilities.IsMonoRuntime) + // Exception handling interop is only supported on CoreCLR Windows. + if (TestLibrary.Utilities.IsWindows && !TestLibrary.Utilities.IsMonoRuntime && !TestLibrary.Utilities.IsCoreClrInterpreter) { TestUnmanagedCallersOnlyValid_ThrowException(); TestUnmanagedCallersOnlyViaUnmanagedCalli_ThrowException(); diff --git a/src/tests/baseservices/invalid_operations/ManagedPointers.cs b/src/tests/baseservices/invalid_operations/ManagedPointers.cs index c5357cf03541e6..de45719fb73807 100644 --- a/src/tests/baseservices/invalid_operations/ManagedPointers.cs +++ b/src/tests/baseservices/invalid_operations/ManagedPointers.cs @@ -29,6 +29,7 @@ public static void Validate_BoxingHelpers_NullByRef() } [Fact] + [Xunit.SkipOnCoreClrAttribute("Depends on marshalled calli", RuntimeTestModes.InterpreterActive)] public static void Validate_GeneratedILStubs_NullByRef() { Console.WriteLine($"Running {nameof(Validate_GeneratedILStubs_NullByRef)}..."); @@ -81,4 +82,4 @@ public static void Validate_IntrinsicMethodsWithByRef_NullByRef() Assert.Throws(() => Interlocked.CompareExchange(ref Unsafe.NullRef(), new object(), new object())); Assert.Throws(() => Interlocked.CompareExchange(ref Unsafe.NullRef(), new object(), new object())); } -} \ No newline at end of file +}