From f71076d17b29bf0a01705ee6135e63459bfcc959 Mon Sep 17 00:00:00 2001 From: Steve Pfister Date: Wed, 10 Jul 2024 13:08:28 -0400 Subject: [PATCH 1/3] Set GCStressIncompatible on GenericContext tests As suggested in https://github.com/dotnet/runtime/issues/104633, this may help in reducing test timeouts. --- .../GenericContext/GenericContextCommonCs.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/GenericContextCommonCs.csproj b/src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/GenericContextCommonCs.csproj index 88c0d86a674f47..3a2258e3eb601d 100644 --- a/src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/GenericContextCommonCs.csproj +++ b/src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/GenericContextCommonCs.csproj @@ -1,6 +1,7 @@ Library + true From fb6c6ab9911e76e5e84090a650815edda2853244 Mon Sep 17 00:00:00 2001 From: Steve Pfister Date: Wed, 10 Jul 2024 14:32:31 -0400 Subject: [PATCH 2/3] Update src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/GenericContextCommonCs.csproj Co-authored-by: Vladimir Sadov --- .../GenericContext/GenericContextCommonCs.csproj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/GenericContextCommonCs.csproj b/src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/GenericContextCommonCs.csproj index 3a2258e3eb601d..0877bf8bf39eb6 100644 --- a/src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/GenericContextCommonCs.csproj +++ b/src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/GenericContextCommonCs.csproj @@ -1,6 +1,8 @@ Library + + true true From c27e8cb83156c60ab4f6119b484db29d798b3e3a Mon Sep 17 00:00:00 2001 From: Steve Pfister Date: Fri, 19 Jul 2024 17:55:18 -0400 Subject: [PATCH 3/3] Add SkipOnCoreClr attributes --- .../StaticVirtualMethods/GenericContext/Generator/Program.cs | 5 +++++ .../GenericContext/GenericContextCommonCs.csproj | 3 --- .../GenericContext/GenericContextTest/GenericContextTest.il | 5 +++++ .../GenericContextTestDICallDI/GenericContextTestDICallDI.il | 5 +++++ .../GenericContextTestDefaultImp.il | 5 +++++ 5 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/Generator/Program.cs b/src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/Generator/Program.cs index 88d718a3432b4e..2e99997b9f4715 100644 --- a/src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/Generator/Program.cs +++ b/src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/Generator/Program.cs @@ -801,6 +801,11 @@ void EmitConstrainedPrefix() twOutputTest.WriteLine(" .custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = ("); twOutputTest.WriteLine(" 01 00 00 00"); twOutputTest.WriteLine(" )"); + twOutputTest.WriteLine(" // [SkipOnCoreClr(\"GC Stress Incompatible\", RuntimeTestModes.AnyGCStress)]"); + twOutputTest.WriteLine(" .custom instance void [Microsoft.DotNet.XUnitExtensions]Xunit.SkipOnCoreClrAttribute::.ctor(string, valuetype [Microsoft.DotNet.XUnitExtensions]Xunit.RuntimeTestModes) = ("); + twOutputTest.WriteLine(" 01 00 16 47 43 20 53 74 72 65 73 73 20 49 6e 63"); + twOutputTest.WriteLine(" 6f 6d 70 61 74 69 62 6c 65 c0 00 00 00 00 00"); + twOutputTest.WriteLine(" )"); twOutputTest.WriteLine(" .entrypoint"); twOutputTest.WriteLine(" .locals init (class [System.Runtime]System.Exception V_0)"); twOutputTest.Write(swMainMethodBody.ToString()); diff --git a/src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/GenericContextCommonCs.csproj b/src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/GenericContextCommonCs.csproj index 0877bf8bf39eb6..88c0d86a674f47 100644 --- a/src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/GenericContextCommonCs.csproj +++ b/src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/GenericContextCommonCs.csproj @@ -1,9 +1,6 @@ Library - - true - true diff --git a/src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/GenericContextTest/GenericContextTest.il b/src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/GenericContextTest/GenericContextTest.il index 4deeb6fd9a0985..ec33ac4344a03f 100644 --- a/src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/GenericContextTest/GenericContextTest.il +++ b/src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/GenericContextTest/GenericContextTest.il @@ -19969,6 +19969,11 @@ .custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = ( 01 00 00 00 ) + // [SkipOnCoreClr("GC Stress Incompatible", RuntimeTestModes.AnyGCStress)] + .custom instance void [Microsoft.DotNet.XUnitExtensions]Xunit.SkipOnCoreClrAttribute::.ctor(string, valuetype [Microsoft.DotNet.XUnitExtensions]Xunit.RuntimeTestModes) = ( + 01 00 16 47 43 20 53 74 72 65 73 73 20 49 6e 63 + 6f 6d 70 61 74 69 62 6c 65 c0 00 00 00 00 00 + ) .entrypoint .locals init (class [System.Runtime]System.Exception V_0) .try { diff --git a/src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/GenericContextTestDICallDI/GenericContextTestDICallDI.il b/src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/GenericContextTestDICallDI/GenericContextTestDICallDI.il index f96ebcdf8106be..08b8e2413575af 100644 --- a/src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/GenericContextTestDICallDI/GenericContextTestDICallDI.il +++ b/src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/GenericContextTestDICallDI/GenericContextTestDICallDI.il @@ -19969,6 +19969,11 @@ .custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = ( 01 00 00 00 ) + // [SkipOnCoreClr("GC Stress Incompatible", RuntimeTestModes.AnyGCStress)] + .custom instance void [Microsoft.DotNet.XUnitExtensions]Xunit.SkipOnCoreClrAttribute::.ctor(string, valuetype [Microsoft.DotNet.XUnitExtensions]Xunit.RuntimeTestModes) = ( + 01 00 16 47 43 20 53 74 72 65 73 73 20 49 6e 63 + 6f 6d 70 61 74 69 62 6c 65 c0 00 00 00 00 00 + ) .entrypoint .locals init (class [System.Runtime]System.Exception V_0) .try { diff --git a/src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/GenericContextTestDefaultImp/GenericContextTestDefaultImp.il b/src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/GenericContextTestDefaultImp/GenericContextTestDefaultImp.il index 302a79d8e980dc..a2e04bb18d958a 100644 --- a/src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/GenericContextTestDefaultImp/GenericContextTestDefaultImp.il +++ b/src/tests/Loader/classloader/StaticVirtualMethods/GenericContext/GenericContextTestDefaultImp/GenericContextTestDefaultImp.il @@ -19969,6 +19969,11 @@ .custom instance void [xunit.core]Xunit.FactAttribute::.ctor() = ( 01 00 00 00 ) + // [SkipOnCoreClr("GC Stress Incompatible", RuntimeTestModes.AnyGCStress)] + .custom instance void [Microsoft.DotNet.XUnitExtensions]Xunit.SkipOnCoreClrAttribute::.ctor(string, valuetype [Microsoft.DotNet.XUnitExtensions]Xunit.RuntimeTestModes) = ( + 01 00 16 47 43 20 53 74 72 65 73 73 20 49 6e 63 + 6f 6d 70 61 74 69 62 6c 65 c0 00 00 00 00 00 + ) .entrypoint .locals init (class [System.Runtime]System.Exception V_0) .try {