From f4d448cda84f619650498b80e69d39f2dc02414e Mon Sep 17 00:00:00 2001 From: Maxim Lipnin Date: Wed, 30 Jun 2021 19:37:44 +0300 Subject: [PATCH 01/14] Make LambdaCompiler prefer interpretation to compilation on iOS --- .../src/System.Linq.Expressions.csproj | 5 +++-- .../src/System/Linq/Expressions/LambdaExpression.cs | 2 +- src/tests/FunctionalTests/iOS/Simulator/AOT/Program.cs | 8 +++++++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/libraries/System.Linq.Expressions/src/System.Linq.Expressions.csproj b/src/libraries/System.Linq.Expressions/src/System.Linq.Expressions.csproj index 7972cdb54f1fa7..36ba5177d0afda 100644 --- a/src/libraries/System.Linq.Expressions/src/System.Linq.Expressions.csproj +++ b/src/libraries/System.Linq.Expressions/src/System.Linq.Expressions.csproj @@ -1,9 +1,10 @@ true - $(NetCoreAppCurrent) + $(NetCoreAppCurrent);$(NetCoreAppCurrent)-iOS enable - false + false + true $(DefineConstants);FEATURE_DLG_INVOKE;FEATURE_FAST_CREATE $(DefineConstants);FEATURE_COMPILE $(DefineConstants);FEATURE_INTERPRET diff --git a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/LambdaExpression.cs b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/LambdaExpression.cs index a615e89056abda..0c591d6f3ae058 100644 --- a/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/LambdaExpression.cs +++ b/src/libraries/System.Linq.Expressions/src/System/Linq/Expressions/LambdaExpression.cs @@ -327,7 +327,7 @@ internal static Expression Create(Expression body, string? name, bool #if !FEATURE_COMPILE // Separate expression creation class to hide the CreateExpressionFunc function from users reflecting on Expression - public class ExpressionCreator + internal static class ExpressionCreator { public static Expression CreateExpressionFunc(Expression body, string? name, bool tailCall, ReadOnlyCollection parameters) { diff --git a/src/tests/FunctionalTests/iOS/Simulator/AOT/Program.cs b/src/tests/FunctionalTests/iOS/Simulator/AOT/Program.cs index 437f6843a36fc7..df03d367acb374 100644 --- a/src/tests/FunctionalTests/iOS/Simulator/AOT/Program.cs +++ b/src/tests/FunctionalTests/iOS/Simulator/AOT/Program.cs @@ -2,9 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; +using System.Linq; +using System.Runtime.InteropServices; using System.Threading; using System.Threading.Tasks; -using System.Runtime.InteropServices; public static class Program { @@ -14,6 +15,11 @@ public static class Program public static async Task Main(string[] args) { mono_ios_set_summary($"Starting functional test"); + + // https://github.com/dotnet/runtime/issues/47112 + var foos = new string [] { "hi", "bye" }; + string f = foos.AsQueryable ().First (); + Console.WriteLine("Done!"); await Task.Delay(5000); From c05dfd58e92faa43fa6e5ab12236162c24a2b78e Mon Sep 17 00:00:00 2001 From: Maxim Lipnin Date: Wed, 30 Jun 2021 20:34:35 +0300 Subject: [PATCH 02/14] Simplify the condition Co-authored-by: Stephen Toub --- .../System.Linq.Expressions/src/System.Linq.Expressions.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/System.Linq.Expressions/src/System.Linq.Expressions.csproj b/src/libraries/System.Linq.Expressions/src/System.Linq.Expressions.csproj index 36ba5177d0afda..8e108dc9eccfab 100644 --- a/src/libraries/System.Linq.Expressions/src/System.Linq.Expressions.csproj +++ b/src/libraries/System.Linq.Expressions/src/System.Linq.Expressions.csproj @@ -3,7 +3,7 @@ true $(NetCoreAppCurrent);$(NetCoreAppCurrent)-iOS enable - false + false true $(DefineConstants);FEATURE_DLG_INVOKE;FEATURE_FAST_CREATE $(DefineConstants);FEATURE_COMPILE From c6ebcfd4dff493510947cc8177ccafe5d35e5524 Mon Sep 17 00:00:00 2001 From: Maxim Lipnin Date: Thu, 1 Jul 2021 11:02:27 +0300 Subject: [PATCH 03/14] Extend the IsInterpreting condition to the other apple mobile platforms --- .../src/System.Linq.Expressions.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libraries/System.Linq.Expressions/src/System.Linq.Expressions.csproj b/src/libraries/System.Linq.Expressions/src/System.Linq.Expressions.csproj index 8e108dc9eccfab..0a9d7eba08b66c 100644 --- a/src/libraries/System.Linq.Expressions/src/System.Linq.Expressions.csproj +++ b/src/libraries/System.Linq.Expressions/src/System.Linq.Expressions.csproj @@ -1,10 +1,10 @@ true - $(NetCoreAppCurrent);$(NetCoreAppCurrent)-iOS + $(NetCoreAppCurrent);$(NetCoreAppCurrent)-iOS;$(NetCoreAppCurrent)-tvOS;$(NetCoreAppCurrent)-MacCatalyst enable false - true + true $(DefineConstants);FEATURE_DLG_INVOKE;FEATURE_FAST_CREATE $(DefineConstants);FEATURE_COMPILE $(DefineConstants);FEATURE_INTERPRET From dac905ef71ec631871fb2f61256396188158ab55 Mon Sep 17 00:00:00 2001 From: Maxim Lipnin Date: Thu, 1 Jul 2021 11:59:06 +0300 Subject: [PATCH 04/14] Extract a separate functional test --- .../iOS/Simulator/AOT/Program.cs | 5 ---- .../Simulator/LambdaCompilerAOT/Program.cs | 28 +++++++++++++++++++ ...OS.Simulator.LambdaCompilerAot.Test.csproj | 19 +++++++++++++ 3 files changed, 47 insertions(+), 5 deletions(-) create mode 100644 src/tests/FunctionalTests/iOS/Simulator/LambdaCompilerAOT/Program.cs create mode 100644 src/tests/FunctionalTests/iOS/Simulator/LambdaCompilerAOT/iOS.Simulator.LambdaCompilerAot.Test.csproj diff --git a/src/tests/FunctionalTests/iOS/Simulator/AOT/Program.cs b/src/tests/FunctionalTests/iOS/Simulator/AOT/Program.cs index df03d367acb374..b82804305a1f31 100644 --- a/src/tests/FunctionalTests/iOS/Simulator/AOT/Program.cs +++ b/src/tests/FunctionalTests/iOS/Simulator/AOT/Program.cs @@ -2,7 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. using System; -using System.Linq; using System.Runtime.InteropServices; using System.Threading; using System.Threading.Tasks; @@ -16,10 +15,6 @@ public static async Task Main(string[] args) { mono_ios_set_summary($"Starting functional test"); - // https://github.com/dotnet/runtime/issues/47112 - var foos = new string [] { "hi", "bye" }; - string f = foos.AsQueryable ().First (); - Console.WriteLine("Done!"); await Task.Delay(5000); diff --git a/src/tests/FunctionalTests/iOS/Simulator/LambdaCompilerAOT/Program.cs b/src/tests/FunctionalTests/iOS/Simulator/LambdaCompilerAOT/Program.cs new file mode 100644 index 00000000000000..df03d367acb374 --- /dev/null +++ b/src/tests/FunctionalTests/iOS/Simulator/LambdaCompilerAOT/Program.cs @@ -0,0 +1,28 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Linq; +using System.Runtime.InteropServices; +using System.Threading; +using System.Threading.Tasks; + +public static class Program +{ + [DllImport("__Internal")] + public static extern void mono_ios_set_summary (string value); + + public static async Task Main(string[] args) + { + mono_ios_set_summary($"Starting functional test"); + + // https://github.com/dotnet/runtime/issues/47112 + var foos = new string [] { "hi", "bye" }; + string f = foos.AsQueryable ().First (); + + Console.WriteLine("Done!"); + await Task.Delay(5000); + + return 42; + } +} diff --git a/src/tests/FunctionalTests/iOS/Simulator/LambdaCompilerAOT/iOS.Simulator.LambdaCompilerAot.Test.csproj b/src/tests/FunctionalTests/iOS/Simulator/LambdaCompilerAOT/iOS.Simulator.LambdaCompilerAot.Test.csproj new file mode 100644 index 00000000000000..b2dc64908e2d0b --- /dev/null +++ b/src/tests/FunctionalTests/iOS/Simulator/LambdaCompilerAOT/iOS.Simulator.LambdaCompilerAot.Test.csproj @@ -0,0 +1,19 @@ + + + + Exe + false + true + true + $(NetCoreAppCurrent) + iOSSimulator + iOS.Simulator.LambdaCompilerAot.Test.dll + false + 42 + true + + + + + + From 0987d1fc021f1a54ab0df447023ac339e5c08262 Mon Sep 17 00:00:00 2001 From: Maxim Lipnin Date: Fri, 2 Jul 2021 10:35:29 +0300 Subject: [PATCH 05/14] Set the right condition for IsInterpreting property in the test csproj file --- .../tests/System.Linq.Expressions.Tests.csproj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libraries/System.Linq.Expressions/tests/System.Linq.Expressions.Tests.csproj b/src/libraries/System.Linq.Expressions/tests/System.Linq.Expressions.Tests.csproj index b0a74eabbce8fa..c2efe998ee96ab 100644 --- a/src/libraries/System.Linq.Expressions/tests/System.Linq.Expressions.Tests.csproj +++ b/src/libraries/System.Linq.Expressions/tests/System.Linq.Expressions.Tests.csproj @@ -2,9 +2,10 @@ true false + true $(DefineConstants);FEATURE_COMPILE $(DefineConstants);FEATURE_INTERPRET - $(NetCoreAppCurrent) + $(NetCoreAppCurrent);$(NetCoreAppCurrent)-iOS;$(NetCoreAppCurrent)-tvOS;$(NetCoreAppCurrent)-MacCatalyst From 79e2afdd05a4d9d440d09e2cb4a56c7420af84c7 Mon Sep 17 00:00:00 2001 From: Maxim Lipnin Date: Fri, 2 Jul 2021 13:48:44 +0300 Subject: [PATCH 06/14] Disable a couple of tests --- .../tests/Dynamic/InvokeMemberBindingTests.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libraries/System.Linq.Expressions/tests/Dynamic/InvokeMemberBindingTests.cs b/src/libraries/System.Linq.Expressions/tests/Dynamic/InvokeMemberBindingTests.cs index f5abaf81ae129a..adca5a03d15467 100644 --- a/src/libraries/System.Linq.Expressions/tests/Dynamic/InvokeMemberBindingTests.cs +++ b/src/libraries/System.Linq.Expressions/tests/Dynamic/InvokeMemberBindingTests.cs @@ -54,6 +54,7 @@ public static IEnumerable ObjectArguments() yield return new[] {new object()}; } + [ActiveIssue("https://github.com/dotnet/runtime/issues/55070", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)] [Theory, MemberData(nameof(ObjectArguments))] public void InvokeVirtualMethod(object value) { @@ -411,6 +412,7 @@ public Func Delegate public OutAction OutDelegate; } + [ActiveIssue("https://github.com/dotnet/runtime/issues/55071", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)] [Fact] public void InvokeFuncMember() { From 4f9424029093ce6a389b01542b4a1efc1abf1e91 Mon Sep 17 00:00:00 2001 From: Maxim Lipnin Date: Fri, 2 Jul 2021 18:38:48 +0300 Subject: [PATCH 07/14] Use PlatformDetection to check that System.Linq.Expressions was compiled as IsInterpreting only --- .../TestUtilities/System/PlatformDetection.cs | 16 ++++++++++++++++ .../tests/Dynamic/InvokeMemberBindingTests.cs | 4 ++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs index aa44cfe53f1b02..eb0861b2749b82 100644 --- a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs +++ b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs @@ -3,6 +3,7 @@ using System.Diagnostics; using System.IO; +using System.Linq.Expressions; using System.Security; using System.Security.Authentication; using System.Reflection; @@ -66,6 +67,21 @@ public static partial class PlatformDetection public static bool IsUsingLimitedCultures => !IsNotMobile; public static bool IsNotUsingLimitedCultures => IsNotMobile; + public static bool IsLinqExpressionsBuiltWithIsInterpretingOnly => s_LinqExpressionsBuiltWithIsInterpretingOnly.Value; + private static readonly Lazy s_LinqExpressionsBuiltWithIsInterpretingOnly = new Lazy(GetLinqExpressionsBuiltWithIsInterpretingOnly); + private static bool GetLinqExpressionsBuiltWithIsInterpretingOnly() + { + Type type = typeof(LambdaExpression); + if (type != null) + { + // The "Accept" method is under FEATURE_COMPILE conditional so it should not exist + MethodInfo methodInfo = type.GetMethod("Accept", BindingFlags.NonPublic | BindingFlags.Static); + return methodInfo == null; + } + + return false; + } + // Please make sure that you have the libgdiplus dependency installed. // For details, see https://docs.microsoft.com/dotnet/core/install/dependencies?pivots=os-macos&tabs=netcore31#libgdiplus public static bool IsDrawingSupported diff --git a/src/libraries/System.Linq.Expressions/tests/Dynamic/InvokeMemberBindingTests.cs b/src/libraries/System.Linq.Expressions/tests/Dynamic/InvokeMemberBindingTests.cs index adca5a03d15467..ee4962af5ff1c8 100644 --- a/src/libraries/System.Linq.Expressions/tests/Dynamic/InvokeMemberBindingTests.cs +++ b/src/libraries/System.Linq.Expressions/tests/Dynamic/InvokeMemberBindingTests.cs @@ -54,7 +54,7 @@ public static IEnumerable ObjectArguments() yield return new[] {new object()}; } - [ActiveIssue("https://github.com/dotnet/runtime/issues/55070", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/55070", typeof(PlatformDetection), nameof(PlatformDetection.IsLinqExpressionsBuiltWithIsInterpretingOnly))] [Theory, MemberData(nameof(ObjectArguments))] public void InvokeVirtualMethod(object value) { @@ -412,7 +412,7 @@ public Func Delegate public OutAction OutDelegate; } - [ActiveIssue("https://github.com/dotnet/runtime/issues/55071", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/55071", typeof(PlatformDetection), nameof(PlatformDetection.IsLinqExpressionsBuiltWithIsInterpretingOnly))] [Fact] public void InvokeFuncMember() { From 01068ddaca5c6dd2c48753e8aa306094c8542db9 Mon Sep 17 00:00:00 2001 From: Maxim Lipnin Date: Sat, 3 Jul 2021 09:34:01 +0300 Subject: [PATCH 08/14] Disable failing System.Dynamic.Runtime library tests --- ...rmance.dynamic.context.indexer.genclass.cs | 1 + ...dynamic.context.operator.compound.basic.cs | 2 ++ ...ic.declarations.formalParameter.Methods.cs | 36 +++++++++++++++++++ ...eclarations.localVariable.blockVariable.cs | 3 ++ ...ormance.dynamic.dynamicType.conversions.cs | 3 ++ ...loadResolution.Indexers.1class2indexers.cs | 3 ++ ...erloadResolution.Methods.1class2methods.cs | 3 ++ .../Conformance.dynamic.Variance.assign.cs | 3 ++ .../tests/System.Dynamic.Runtime.Tests.csproj | 2 +- 9 files changed, 55 insertions(+), 1 deletion(-) diff --git a/src/libraries/System.Dynamic.Runtime/tests/Dynamic.Context/Conformance.dynamic.context.indexer.genclass.cs b/src/libraries/System.Dynamic.Runtime/tests/Dynamic.Context/Conformance.dynamic.context.indexer.genclass.cs index a31ab30422ee3a..79d677b3c2abf3 100644 --- a/src/libraries/System.Dynamic.Runtime/tests/Dynamic.Context/Conformance.dynamic.context.indexer.genclass.cs +++ b/src/libraries/System.Dynamic.Runtime/tests/Dynamic.Context/Conformance.dynamic.context.indexer.genclass.cs @@ -774,6 +774,7 @@ namespace ManagedTests.DynamicCSharp.Conformance.dynamic.context.indexer.genclas public class Test { [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/55118", typeof(PlatformDetection), nameof(PlatformDetection.IsLinqExpressionsBuiltWithIsInterpretingOnly))] public static void TryCatchFinally() { dynamic dy = new MemberClass(); diff --git a/src/libraries/System.Dynamic.Runtime/tests/Dynamic.Context/Conformance.dynamic.context.operator.compound.basic.cs b/src/libraries/System.Dynamic.Runtime/tests/Dynamic.Context/Conformance.dynamic.context.operator.compound.basic.cs index 0c49adf396b6ce..381b89b819864a 100644 --- a/src/libraries/System.Dynamic.Runtime/tests/Dynamic.Context/Conformance.dynamic.context.operator.compound.basic.cs +++ b/src/libraries/System.Dynamic.Runtime/tests/Dynamic.Context/Conformance.dynamic.context.operator.compound.basic.cs @@ -239,10 +239,12 @@ namespace ManagedTests.DynamicCSharp.Conformance.dynamic.context.operate.compoun // // // + using System; public class Test { [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/55117", typeof(PlatformDetection), nameof(PlatformDetection.IsLinqExpressionsBuiltWithIsInterpretingOnly))] public static void DynamicCSharpRunTest() { Assert.Equal(0, MainMethod(null)); diff --git a/src/libraries/System.Dynamic.Runtime/tests/Dynamic.Declarations/Conformance.dynamic.declarations.formalParameter.Methods.cs b/src/libraries/System.Dynamic.Runtime/tests/Dynamic.Declarations/Conformance.dynamic.declarations.formalParameter.Methods.cs index f6ceeddfa49eea..6306863d44ea3b 100644 --- a/src/libraries/System.Dynamic.Runtime/tests/Dynamic.Declarations/Conformance.dynamic.declarations.formalParameter.Methods.cs +++ b/src/libraries/System.Dynamic.Runtime/tests/Dynamic.Declarations/Conformance.dynamic.declarations.formalParameter.Methods.cs @@ -98,6 +98,8 @@ public static int MainMethod(string[] args) namespace ManagedTests.DynamicCSharp.Conformance.dynamic.declarations.formalParameter.Methods.extensionmethod006.extensionmethod006 { + using System; + static // Extension method that extends dynamic // // @@ -115,6 +117,7 @@ public static string Foo(this object x, dynamic d) public class Test { [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/55117", typeof(PlatformDetection), nameof(PlatformDetection.IsLinqExpressionsBuiltWithIsInterpretingOnly))] public static void DynamicCSharpRunTest() { Assert.Equal(0, MainMethod(null)); @@ -189,6 +192,8 @@ public static int Method(this Test t, int value) namespace ManagedTests.DynamicCSharp.Conformance.dynamic.declarations.formalParameter.Methods.method001.method001 { + using System; + public class Test { private static bool s_ok = false; @@ -203,6 +208,7 @@ public void Foo(dynamic d) } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/55117", typeof(PlatformDetection), nameof(PlatformDetection.IsLinqExpressionsBuiltWithIsInterpretingOnly))] public static void DynamicCSharpRunTest() { Assert.Equal(0, MainMethod(null)); @@ -260,6 +266,8 @@ public static int MainMethod(string[] args) namespace ManagedTests.DynamicCSharp.Conformance.dynamic.declarations.formalParameter.Methods.method003.method003 { + using System; + public class Test { private static bool s_ok = false; @@ -273,6 +281,7 @@ public void Foo(dynamic d) } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/55117", typeof(PlatformDetection), nameof(PlatformDetection.IsLinqExpressionsBuiltWithIsInterpretingOnly))] public static void DynamicCSharpRunTest() { Assert.Equal(0, MainMethod(null)); @@ -294,6 +303,8 @@ public static int MainMethod(string[] args) namespace ManagedTests.DynamicCSharp.Conformance.dynamic.declarations.formalParameter.Methods.method004.method004 { + using System; + public class Test { private static bool s_ok = false; @@ -306,6 +317,7 @@ public void Foo(ref dynamic d) } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/55117", typeof(PlatformDetection), nameof(PlatformDetection.IsLinqExpressionsBuiltWithIsInterpretingOnly))] public static void DynamicCSharpRunTest() { Assert.Equal(0, MainMethod(null)); @@ -330,6 +342,8 @@ public static int MainMethod(string[] args) namespace ManagedTests.DynamicCSharp.Conformance.dynamic.declarations.formalParameter.Methods.method005.method005 { + using System; + public class Test { private static bool s_ok = false; @@ -345,6 +359,7 @@ public void Foo(params dynamic[] d) } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/55117", typeof(PlatformDetection), nameof(PlatformDetection.IsLinqExpressionsBuiltWithIsInterpretingOnly))] public static void DynamicCSharpRunTest() { Assert.Equal(0, MainMethod(null)); @@ -367,6 +382,8 @@ public static int MainMethod(string[] args) namespace ManagedTests.DynamicCSharp.Conformance.dynamic.declarations.formalParameter.Methods.method007.method007 { + using System; + public class Test { private static bool s_ok = false; @@ -380,6 +397,7 @@ public void Foo(dynamic d, dynamic d2) } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/55117", typeof(PlatformDetection), nameof(PlatformDetection.IsLinqExpressionsBuiltWithIsInterpretingOnly))] public static void DynamicCSharpRunTest() { Assert.Equal(0, MainMethod(null)); @@ -403,6 +421,8 @@ public static int MainMethod(string[] args) namespace ManagedTests.DynamicCSharp.Conformance.dynamic.declarations.formalParameter.Methods.method008.method008 { + using System; + public class Test { private static bool s_ok = false; @@ -416,6 +436,7 @@ public void Foo(dynamic d, int d2) } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/55117", typeof(PlatformDetection), nameof(PlatformDetection.IsLinqExpressionsBuiltWithIsInterpretingOnly))] public static void DynamicCSharpRunTest() { Assert.Equal(0, MainMethod(null)); @@ -438,6 +459,8 @@ public static int MainMethod(string[] args) namespace ManagedTests.DynamicCSharp.Conformance.dynamic.declarations.formalParameter.Methods.method009.method009 { + using System; + public class Test { private static bool s_ok = false; @@ -451,6 +474,7 @@ public void Foo(dynamic d, dynamic d2, dynamic d3) } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/55117", typeof(PlatformDetection), nameof(PlatformDetection.IsLinqExpressionsBuiltWithIsInterpretingOnly))] public static void DynamicCSharpRunTest() { Assert.Equal(0, MainMethod(null)); @@ -473,6 +497,8 @@ public static int MainMethod(string[] args) namespace ManagedTests.DynamicCSharp.Conformance.dynamic.declarations.formalParameter.Methods.method010.method010 { + using System; + public class Test { private static bool s_ok = false; @@ -488,6 +514,7 @@ public MyClass(params dynamic[] d) } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/55117", typeof(PlatformDetection), nameof(PlatformDetection.IsLinqExpressionsBuiltWithIsInterpretingOnly))] public static void DynamicCSharpRunTest() { Assert.Equal(0, MainMethod(null)); @@ -509,6 +536,8 @@ public static int MainMethod(string[] args) namespace ManagedTests.DynamicCSharp.Conformance.dynamic.declarations.formalParameter.Methods.method011.method011 { + using System; + public class Test { private static bool s_ok = false; @@ -523,6 +552,7 @@ public static void Foo(dynamic d) } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/55117", typeof(PlatformDetection), nameof(PlatformDetection.IsLinqExpressionsBuiltWithIsInterpretingOnly))] public static void DynamicCSharpRunTest() { Assert.Equal(0, MainMethod(null)); @@ -543,6 +573,8 @@ public static int MainMethod(string[] args) namespace ManagedTests.DynamicCSharp.Conformance.dynamic.declarations.formalParameter.Methods.method012.method012 { + using System; + public class Test { private static bool s_ok = false; @@ -555,6 +587,7 @@ public void Foo(ref dynamic d) } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/55117", typeof(PlatformDetection), nameof(PlatformDetection.IsLinqExpressionsBuiltWithIsInterpretingOnly))] public static void DynamicCSharpRunTest() { Assert.Equal(0, MainMethod(null)); @@ -579,6 +612,8 @@ public static int MainMethod(string[] args) namespace ManagedTests.DynamicCSharp.Conformance.dynamic.declarations.formalParameter.Methods.method013.method013 { + using System; + public class Test { private static bool s_ok = false; @@ -591,6 +626,7 @@ public void Foo(T d) } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/55117", typeof(PlatformDetection), nameof(PlatformDetection.IsLinqExpressionsBuiltWithIsInterpretingOnly))] public static void DynamicCSharpRunTest() { Assert.Equal(0, MainMethod(null)); diff --git a/src/libraries/System.Dynamic.Runtime/tests/Dynamic.Declarations/Conformance.dynamic.declarations.localVariable.blockVariable.cs b/src/libraries/System.Dynamic.Runtime/tests/Dynamic.Declarations/Conformance.dynamic.declarations.localVariable.blockVariable.cs index 1aa3f5b55af1ed..46c8372b14a318 100644 --- a/src/libraries/System.Dynamic.Runtime/tests/Dynamic.Declarations/Conformance.dynamic.declarations.localVariable.blockVariable.cs +++ b/src/libraries/System.Dynamic.Runtime/tests/Dynamic.Declarations/Conformance.dynamic.declarations.localVariable.blockVariable.cs @@ -1189,9 +1189,12 @@ from d in numbers namespace ManagedTests.DynamicCSharp.Conformance.dynamic.declarations.localVariable.blockVariable.trycatch002.trycatch002 { + using System; + public class Test { [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/55117", typeof(PlatformDetection), nameof(PlatformDetection.IsLinqExpressionsBuiltWithIsInterpretingOnly))] public static void DynamicCSharpRunTest() { Assert.Equal(0, MainMethod(null)); diff --git a/src/libraries/System.Dynamic.Runtime/tests/Dynamic.DynamicType/Conformance.dynamic.dynamicType.conversions.cs b/src/libraries/System.Dynamic.Runtime/tests/Dynamic.DynamicType/Conformance.dynamic.dynamicType.conversions.cs index d27e05bff2864a..cb63fac7995399 100644 --- a/src/libraries/System.Dynamic.Runtime/tests/Dynamic.DynamicType/Conformance.dynamic.dynamicType.conversions.cs +++ b/src/libraries/System.Dynamic.Runtime/tests/Dynamic.DynamicType/Conformance.dynamic.dynamicType.conversions.cs @@ -4356,6 +4356,8 @@ public static int MainMethod() namespace ManagedTests.DynamicCSharp.Conformance.dynamic.dynamicType.conversions.dlgate003.dlgate003 { + using System; + // Delegate conversions // // Tests to figure out if the right conversion from method groups to delegates are applied @@ -4375,6 +4377,7 @@ public static object Foo() } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/55117", typeof(PlatformDetection), nameof(PlatformDetection.IsLinqExpressionsBuiltWithIsInterpretingOnly))] public static void DynamicCSharpRunTest() { Assert.Equal(0, MainMethod()); diff --git a/src/libraries/System.Dynamic.Runtime/tests/Dynamic.OverloadResolution/Conformance.dynamic.overloadResolution.Indexers.1class2indexers.cs b/src/libraries/System.Dynamic.Runtime/tests/Dynamic.OverloadResolution/Conformance.dynamic.overloadResolution.Indexers.1class2indexers.cs index 4a3ef8ebc82ebc..5b08d4e447ed67 100644 --- a/src/libraries/System.Dynamic.Runtime/tests/Dynamic.OverloadResolution/Conformance.dynamic.overloadResolution.Indexers.1class2indexers.cs +++ b/src/libraries/System.Dynamic.Runtime/tests/Dynamic.OverloadResolution/Conformance.dynamic.overloadResolution.Indexers.1class2indexers.cs @@ -665,6 +665,8 @@ public static int MainMethod(string[] args) namespace ManagedTests.DynamicCSharp.Conformance.dynamic.overloadResolution.Indexers.Oneclass2indexers.onedynamicparam004.onedynamicparam004 { + using System; + // Tests overload resolution for 1 class and 2 methods // // @@ -720,6 +722,7 @@ public object this[object x] public class Test { [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/55117", typeof(PlatformDetection), nameof(PlatformDetection.IsLinqExpressionsBuiltWithIsInterpretingOnly))] public static void DynamicCSharpRunTest() { Assert.Equal(0, MainMethod(null)); diff --git a/src/libraries/System.Dynamic.Runtime/tests/Dynamic.OverloadResolution/Conformance.dynamic.overloadResolution.Methods.1class2methods.cs b/src/libraries/System.Dynamic.Runtime/tests/Dynamic.OverloadResolution/Conformance.dynamic.overloadResolution.Methods.1class2methods.cs index 5cf0a1ffe9dfdf..72f5998f65690c 100644 --- a/src/libraries/System.Dynamic.Runtime/tests/Dynamic.OverloadResolution/Conformance.dynamic.overloadResolution.Methods.1class2methods.cs +++ b/src/libraries/System.Dynamic.Runtime/tests/Dynamic.OverloadResolution/Conformance.dynamic.overloadResolution.Methods.1class2methods.cs @@ -501,6 +501,8 @@ public static int MainMethod(string[] args) namespace ManagedTests.DynamicCSharp.Conformance.dynamic.overloadResolution.Methods.Oneclass2methods.onedynamicparam004.onedynamicparam004 { + using System; + // Tests overload resolution for 1 class and 2 methods // // @@ -530,6 +532,7 @@ public void Method(object x) public class Test { [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/55117", typeof(PlatformDetection), nameof(PlatformDetection.IsLinqExpressionsBuiltWithIsInterpretingOnly))] public static void DynamicCSharpRunTest() { Assert.Equal(0, MainMethod(null)); diff --git a/src/libraries/System.Dynamic.Runtime/tests/Dynamic.Variance/Conformance.dynamic.Variance.assign.cs b/src/libraries/System.Dynamic.Runtime/tests/Dynamic.Variance/Conformance.dynamic.Variance.assign.cs index 7e277d276d4c37..d9dd1adb35618c 100644 --- a/src/libraries/System.Dynamic.Runtime/tests/Dynamic.Variance/Conformance.dynamic.Variance.assign.cs +++ b/src/libraries/System.Dynamic.Runtime/tests/Dynamic.Variance/Conformance.dynamic.Variance.assign.cs @@ -476,6 +476,8 @@ public static int MainMethod() namespace ManagedTests.DynamicCSharp.Conformance.dynamic.Variance.assign.assignment07.assignment07 { + using System; + // variance // assignment Contravariant delegates // contravariance on delegates assigned to arrays @@ -499,6 +501,7 @@ public class C private static dynamic s_array3; [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/55119", typeof(PlatformDetection), nameof(PlatformDetection.IsLinqExpressionsBuiltWithIsInterpretingOnly))] public static void DynamicCSharpRunTest() { Assert.Equal(0, MainMethod()); diff --git a/src/libraries/System.Dynamic.Runtime/tests/System.Dynamic.Runtime.Tests.csproj b/src/libraries/System.Dynamic.Runtime/tests/System.Dynamic.Runtime.Tests.csproj index 9b70ef3b077cf4..57195bfe5aad1c 100644 --- a/src/libraries/System.Dynamic.Runtime/tests/System.Dynamic.Runtime.Tests.csproj +++ b/src/libraries/System.Dynamic.Runtime/tests/System.Dynamic.Runtime.Tests.csproj @@ -2,7 +2,7 @@ true 67,168,219,414,162,184,458,464,78,169,114,693,108,1981,649,109,1066,3021,3026,3002,3014,3022,660,661,429;xUnit1013 - $(NetCoreAppCurrent) + $(NetCoreAppCurrent);$(NetCoreAppCurrent)-iOS;$(NetCoreAppCurrent)-tvOS;$(NetCoreAppCurrent)-MacCatalyst From 2520971621bb4ab48741b2b7f7247685ae224297 Mon Sep 17 00:00:00 2001 From: Maxim Lipnin Date: Mon, 5 Jul 2021 12:43:54 +0300 Subject: [PATCH 09/14] Address issue with Microsoft.VisualBasic.CompilerServices.Tests --- .../TestUtilities/System/PlatformDetection.cs | 1 + .../tests/NewLateBindingTests.cs | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs index 6e312b1edd7b59..5038c4f01977ef 100644 --- a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs +++ b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs @@ -68,6 +68,7 @@ public static partial class PlatformDetection public static bool IsNotUsingLimitedCultures => IsNotMobile; public static bool IsLinqExpressionsBuiltWithIsInterpretingOnly => s_LinqExpressionsBuiltWithIsInterpretingOnly.Value; + public static bool IsNotLinqExpressionsBuiltWithIsInterpretingOnly => !IsLinqExpressionsBuiltWithIsInterpretingOnly; private static readonly Lazy s_LinqExpressionsBuiltWithIsInterpretingOnly = new Lazy(GetLinqExpressionsBuiltWithIsInterpretingOnly); private static bool GetLinqExpressionsBuiltWithIsInterpretingOnly() { diff --git a/src/libraries/Microsoft.VisualBasic.Core/tests/NewLateBindingTests.cs b/src/libraries/Microsoft.VisualBasic.Core/tests/NewLateBindingTests.cs index 5437590241a625..da9c45a154dff6 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/tests/NewLateBindingTests.cs +++ b/src/libraries/Microsoft.VisualBasic.Core/tests/NewLateBindingTests.cs @@ -94,7 +94,7 @@ public static IEnumerable LateCall_OptionalValues_Data() static object[] CreateData(string memberName, object[] arguments, Type[] typeArguments, string expectedValue) => new object[] { memberName, arguments, typeArguments, expectedValue }; } - [Theory] + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotLinqExpressionsBuiltWithIsInterpretingOnly))] [ActiveIssue("https://github.com/dotnet/runtime/issues/51834", typeof(PlatformDetection), nameof(PlatformDetection.IsBuiltWithAggressiveTrimming), nameof(PlatformDetection.IsBrowser))] [MemberData(nameof(LateCall_OptionalValues_Data))] public void LateCall_OptionalValues(string memberName, object[] arguments, Type[] typeArguments, string expectedValue) @@ -113,5 +113,22 @@ public void LateCall_OptionalValues(string memberName, object[] arguments, Type[ IgnoreReturn: true); Assert.Equal(expectedValue, actualValue); } + + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsLinqExpressionsBuiltWithIsInterpretingOnly))] + [InlineData("F8", new object[] { 1, 2, 3, 4, 5, 6, 7, -1 }, null, "System.Int32, 7, -1")] + [InlineData("F8", new object[] { 1, 2, 3, 4, 5, 6, 7, Type.Missing }, null, "System.Int32, 7, 8")] + [InlineData("F8", new object[] { 1, 2, 3, 4, 5, 6, Type.Missing, Type.Missing }, null, "System.Reflection.Missing, null, 8")] + public void LateCall_OptionalValues_WithInterpretingOnly(string memberName, object[] arguments, Type[] typeArguments, string expectedValue) + { + Assert.Throws(() => NewLateBinding.LateCall( + Instance: new OptionalValuesType(), + Type: null, + MemberName: memberName, + Arguments: arguments, + ArgumentNames: null, + TypeArguments: typeArguments, + CopyBack: null, + IgnoreReturn: true)); + } } } From 9fa02a6cd7d4b3b2aa0211cbd19df63f77bc79ea Mon Sep 17 00:00:00 2001 From: Maxim Lipnin Date: Mon, 5 Jul 2021 14:29:46 +0300 Subject: [PATCH 10/14] Fix build issue --- .../tests/NewLateBindingTests.cs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/libraries/Microsoft.VisualBasic.Core/tests/NewLateBindingTests.cs b/src/libraries/Microsoft.VisualBasic.Core/tests/NewLateBindingTests.cs index da9c45a154dff6..c5b1ac5194e3e0 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/tests/NewLateBindingTests.cs +++ b/src/libraries/Microsoft.VisualBasic.Core/tests/NewLateBindingTests.cs @@ -114,11 +114,21 @@ public void LateCall_OptionalValues(string memberName, object[] arguments, Type[ Assert.Equal(expectedValue, actualValue); } + public static IEnumerable LateCall_OptionalValues_WithInterpretingOnly_Data() + { + // If System.Type.Missing is used for a parameter with type parameter type, + // System.Reflection.Missing is used in type inference. This matches .NET Framework behavior. + + yield return CreateData("F8", new object[] { 1, 2, 3, 4, 5, 6, 7, -1 }, null); + yield return CreateData("F8", new object[] { 1, 2, 3, 4, 5, 6, 7, Type.Missing }, null); + yield return CreateData("F8", new object[] { 1, 2, 3, 4, 5, 6, Type.Missing, Type.Missing }, null); + + static object[] CreateData(string memberName, object[] arguments, Type[] typeArguments) => new object[] { memberName, arguments, typeArguments }; + } + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsLinqExpressionsBuiltWithIsInterpretingOnly))] - [InlineData("F8", new object[] { 1, 2, 3, 4, 5, 6, 7, -1 }, null, "System.Int32, 7, -1")] - [InlineData("F8", new object[] { 1, 2, 3, 4, 5, 6, 7, Type.Missing }, null, "System.Int32, 7, 8")] - [InlineData("F8", new object[] { 1, 2, 3, 4, 5, 6, Type.Missing, Type.Missing }, null, "System.Reflection.Missing, null, 8")] - public void LateCall_OptionalValues_WithInterpretingOnly(string memberName, object[] arguments, Type[] typeArguments, string expectedValue) + [MemberData(nameof(LateCall_OptionalValues_WithInterpretingOnly_Data))] + public void LateCall_OptionalValues_WithInterpretingOnly_Throws_PNSE(string memberName, object[] arguments, Type[] typeArguments) { Assert.Throws(() => NewLateBinding.LateCall( Instance: new OptionalValuesType(), From a4813f9e3d69d3cd475ecb4dcaec3049520f96be Mon Sep 17 00:00:00 2001 From: Maxim Lipnin Date: Mon, 5 Jul 2021 17:01:18 +0300 Subject: [PATCH 11/14] Revert the test --- .../tests/NewLateBindingTests.cs | 27 ------------------- 1 file changed, 27 deletions(-) diff --git a/src/libraries/Microsoft.VisualBasic.Core/tests/NewLateBindingTests.cs b/src/libraries/Microsoft.VisualBasic.Core/tests/NewLateBindingTests.cs index c5b1ac5194e3e0..38b21a9eb11cc5 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/tests/NewLateBindingTests.cs +++ b/src/libraries/Microsoft.VisualBasic.Core/tests/NewLateBindingTests.cs @@ -113,32 +113,5 @@ public void LateCall_OptionalValues(string memberName, object[] arguments, Type[ IgnoreReturn: true); Assert.Equal(expectedValue, actualValue); } - - public static IEnumerable LateCall_OptionalValues_WithInterpretingOnly_Data() - { - // If System.Type.Missing is used for a parameter with type parameter type, - // System.Reflection.Missing is used in type inference. This matches .NET Framework behavior. - - yield return CreateData("F8", new object[] { 1, 2, 3, 4, 5, 6, 7, -1 }, null); - yield return CreateData("F8", new object[] { 1, 2, 3, 4, 5, 6, 7, Type.Missing }, null); - yield return CreateData("F8", new object[] { 1, 2, 3, 4, 5, 6, Type.Missing, Type.Missing }, null); - - static object[] CreateData(string memberName, object[] arguments, Type[] typeArguments) => new object[] { memberName, arguments, typeArguments }; - } - - [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsLinqExpressionsBuiltWithIsInterpretingOnly))] - [MemberData(nameof(LateCall_OptionalValues_WithInterpretingOnly_Data))] - public void LateCall_OptionalValues_WithInterpretingOnly_Throws_PNSE(string memberName, object[] arguments, Type[] typeArguments) - { - Assert.Throws(() => NewLateBinding.LateCall( - Instance: new OptionalValuesType(), - Type: null, - MemberName: memberName, - Arguments: arguments, - ArgumentNames: null, - TypeArguments: typeArguments, - CopyBack: null, - IgnoreReturn: true)); - } } } From c3a3530d2ccbc21e17f840d47704de1c1266f713 Mon Sep 17 00:00:00 2001 From: Maxim Lipnin Date: Tue, 6 Jul 2021 10:58:37 +0300 Subject: [PATCH 12/14] Update the invariant functional test for ios simulator --- .../Simulator/InvariantCultureOnlyMode/Program.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/tests/FunctionalTests/iOS/Simulator/InvariantCultureOnlyMode/Program.cs b/src/tests/FunctionalTests/iOS/Simulator/InvariantCultureOnlyMode/Program.cs index c5221ce4bc3dba..93dd7fc3c731f0 100644 --- a/src/tests/FunctionalTests/iOS/Simulator/InvariantCultureOnlyMode/Program.cs +++ b/src/tests/FunctionalTests/iOS/Simulator/InvariantCultureOnlyMode/Program.cs @@ -15,10 +15,18 @@ public static class Program public static async Task Main(string[] args) { mono_ios_set_summary($"Starting functional test"); + CultureInfo culture; + try + { + culture = new CultureInfo("es-ES", false); + } + catch + { + culture = new CultureInfo("", false); + } - var culture = new CultureInfo("es-ES", false); // https://github.com/dotnet/runtime/blob/main/docs/design/features/globalization-invariant-mode.md#cultures-and-culture-data - int result = culture.LCID == 0x1000 && culture.NativeName == "Invariant Language (Invariant Country)" ? 42 : 1; + int result = culture.LCID == CultureInfo.InvariantCulture.LCID && culture.NativeName == "Invariant Language (Invariant Country)" ? 42 : 1; Console.WriteLine("Done!"); await Task.Delay(5000); From ab030324de7814aef8b1efb4c3118b666f81e2ce Mon Sep 17 00:00:00 2001 From: Maxim Lipnin Date: Tue, 6 Jul 2021 12:34:15 +0300 Subject: [PATCH 13/14] Re-enable some SLE tests on tvOS --- .../System.Linq.Expressions/tests/Array/ArrayArrayIndexTests.cs | 1 - .../System.Linq.Expressions/tests/Array/ArrayIndexTests.cs | 1 - .../tests/Array/NullableArrayIndexTests.cs | 1 - .../tests/BinaryOperators/Arithmetic/BinaryModuloTests.cs | 1 - .../System.Linq.Expressions/tests/Block/NoParameterBlockTests.cs | 1 - src/libraries/System.Linq.Expressions/tests/Cast/CastTests.cs | 1 - .../System.Linq.Expressions/tests/Member/MemberAccessTests.cs | 1 - .../System.Linq.Expressions/tests/SequenceTests/SequenceTests.cs | 1 - src/libraries/System.Linq.Expressions/tests/TypeBinary/TypeIs.cs | 1 - .../System.Linq.Expressions/tests/Unary/UnaryConvertTests.cs | 1 - .../System.Linq.Expressions/tests/Unary/UnaryUnboxTests.cs | 1 - 11 files changed, 11 deletions(-) diff --git a/src/libraries/System.Linq.Expressions/tests/Array/ArrayArrayIndexTests.cs b/src/libraries/System.Linq.Expressions/tests/Array/ArrayArrayIndexTests.cs index 9430253687acb5..1bd056bba9af38 100644 --- a/src/libraries/System.Linq.Expressions/tests/Array/ArrayArrayIndexTests.cs +++ b/src/libraries/System.Linq.Expressions/tests/Array/ArrayArrayIndexTests.cs @@ -5,7 +5,6 @@ namespace System.Linq.Expressions.Tests { - [ActiveIssue("https://github.com/dotnet/runtime/issues/51952", TestPlatforms.tvOS)] public static class ArrayArrayIndexTests { #region Boolean tests diff --git a/src/libraries/System.Linq.Expressions/tests/Array/ArrayIndexTests.cs b/src/libraries/System.Linq.Expressions/tests/Array/ArrayIndexTests.cs index 6eed3897f93d2a..47079261232635 100644 --- a/src/libraries/System.Linq.Expressions/tests/Array/ArrayIndexTests.cs +++ b/src/libraries/System.Linq.Expressions/tests/Array/ArrayIndexTests.cs @@ -5,7 +5,6 @@ namespace System.Linq.Expressions.Tests { - [ActiveIssue("https://github.com/dotnet/runtime/issues/51952", TestPlatforms.tvOS)] public static class ArrayIndexTests { #region Boolean tests diff --git a/src/libraries/System.Linq.Expressions/tests/Array/NullableArrayIndexTests.cs b/src/libraries/System.Linq.Expressions/tests/Array/NullableArrayIndexTests.cs index e0932eef784ee2..91754a96bc27e8 100644 --- a/src/libraries/System.Linq.Expressions/tests/Array/NullableArrayIndexTests.cs +++ b/src/libraries/System.Linq.Expressions/tests/Array/NullableArrayIndexTests.cs @@ -5,7 +5,6 @@ namespace System.Linq.Expressions.Tests { - [ActiveIssue("https://github.com/dotnet/runtime/issues/51952", TestPlatforms.tvOS)] public static class NullableArrayIndexTests { #region NullableBool tests diff --git a/src/libraries/System.Linq.Expressions/tests/BinaryOperators/Arithmetic/BinaryModuloTests.cs b/src/libraries/System.Linq.Expressions/tests/BinaryOperators/Arithmetic/BinaryModuloTests.cs index 4873b7769c3778..c1a41f30861c20 100644 --- a/src/libraries/System.Linq.Expressions/tests/BinaryOperators/Arithmetic/BinaryModuloTests.cs +++ b/src/libraries/System.Linq.Expressions/tests/BinaryOperators/Arithmetic/BinaryModuloTests.cs @@ -107,7 +107,6 @@ public static void CheckULongModuloTest(bool useInterpreter) [Theory] [ClassData(typeof(CompilationTypes))] - [ActiveIssue("https://github.com/dotnet/runtime/issues/51952", TestPlatforms.tvOS)] public static void CheckLongModuloTest(bool useInterpreter) { long[] array = new long[] { 0, 1, -1, long.MinValue, long.MaxValue }; diff --git a/src/libraries/System.Linq.Expressions/tests/Block/NoParameterBlockTests.cs b/src/libraries/System.Linq.Expressions/tests/Block/NoParameterBlockTests.cs index 9848e3a86f9185..4891d348c29bbd 100644 --- a/src/libraries/System.Linq.Expressions/tests/Block/NoParameterBlockTests.cs +++ b/src/libraries/System.Linq.Expressions/tests/Block/NoParameterBlockTests.cs @@ -292,7 +292,6 @@ public void ResultPropertyFromParams(object value, int blockSize) [Theory] [MemberData(nameof(ConstantValuesAndSizes))] - [ActiveIssue("https://github.com/dotnet/runtime/issues/51952", TestPlatforms.tvOS)] public void ResultPropertyFromEnumerable(object value, int blockSize) { ConstantExpression constant = Expression.Constant(value, value.GetType()); diff --git a/src/libraries/System.Linq.Expressions/tests/Cast/CastTests.cs b/src/libraries/System.Linq.Expressions/tests/Cast/CastTests.cs index bb83b061ec64c6..090878f8fee7ec 100644 --- a/src/libraries/System.Linq.Expressions/tests/Cast/CastTests.cs +++ b/src/libraries/System.Linq.Expressions/tests/Cast/CastTests.cs @@ -7,7 +7,6 @@ namespace System.Linq.Expressions.Tests { - [ActiveIssue("https://github.com/dotnet/runtime/issues/51952", TestPlatforms.tvOS)] public static class CastTests { #region Test methods diff --git a/src/libraries/System.Linq.Expressions/tests/Member/MemberAccessTests.cs b/src/libraries/System.Linq.Expressions/tests/Member/MemberAccessTests.cs index 497416457ed07e..cca9a0e08c85b8 100644 --- a/src/libraries/System.Linq.Expressions/tests/Member/MemberAccessTests.cs +++ b/src/libraries/System.Linq.Expressions/tests/Member/MemberAccessTests.cs @@ -8,7 +8,6 @@ namespace System.Linq.Expressions.Tests { - [ActiveIssue("https://github.com/dotnet/runtime/issues/51952", TestPlatforms.tvOS)] public static class MemberAccessTests { private class UnreadableIndexableClass diff --git a/src/libraries/System.Linq.Expressions/tests/SequenceTests/SequenceTests.cs b/src/libraries/System.Linq.Expressions/tests/SequenceTests/SequenceTests.cs index 44f50b5bdf894b..871721f81f4d23 100644 --- a/src/libraries/System.Linq.Expressions/tests/SequenceTests/SequenceTests.cs +++ b/src/libraries/System.Linq.Expressions/tests/SequenceTests/SequenceTests.cs @@ -1486,7 +1486,6 @@ private static S TestConvertChecked(T value, bool useInterpreter) [Theory] [ClassData(typeof(CompilationTypes))] - [ActiveIssue("https://github.com/dotnet/runtime/issues/51952", TestPlatforms.tvOS)] public static void ConvertNullToInt(bool useInterpreter) { Assert.Throws(() => diff --git a/src/libraries/System.Linq.Expressions/tests/TypeBinary/TypeIs.cs b/src/libraries/System.Linq.Expressions/tests/TypeBinary/TypeIs.cs index f789d71f3b0f40..26edcd31eff7e6 100644 --- a/src/libraries/System.Linq.Expressions/tests/TypeBinary/TypeIs.cs +++ b/src/libraries/System.Linq.Expressions/tests/TypeBinary/TypeIs.cs @@ -57,7 +57,6 @@ public void CannotReduce() [Theory] [MemberData(nameof(ExpressionAndTypeCombinations))] - [ActiveIssue("https://github.com/dotnet/runtime/issues/51952", TestPlatforms.tvOS)] public void TypePropertyMatches(Expression expression, Type type) { Assert.Equal(type, Expression.TypeIs(expression, type).TypeOperand); diff --git a/src/libraries/System.Linq.Expressions/tests/Unary/UnaryConvertTests.cs b/src/libraries/System.Linq.Expressions/tests/Unary/UnaryConvertTests.cs index 4cf5c45f2df9a3..d0b82224e6734e 100644 --- a/src/libraries/System.Linq.Expressions/tests/Unary/UnaryConvertTests.cs +++ b/src/libraries/System.Linq.Expressions/tests/Unary/UnaryConvertTests.cs @@ -57,7 +57,6 @@ public static void CheckUnaryConvertBooleanToNumericTest(bool useInterpreter) } [Theory, ClassData(typeof(CompilationTypes))] - [ActiveIssue("https://github.com/dotnet/runtime/issues/51952", TestPlatforms.tvOS)] public static void ConvertNullToNonNullableValueTest(bool useInterpreter) { foreach (var e in ConvertNullToNonNullableValue()) diff --git a/src/libraries/System.Linq.Expressions/tests/Unary/UnaryUnboxTests.cs b/src/libraries/System.Linq.Expressions/tests/Unary/UnaryUnboxTests.cs index 184828d0ff46b5..2ec61247eab7fd 100644 --- a/src/libraries/System.Linq.Expressions/tests/Unary/UnaryUnboxTests.cs +++ b/src/libraries/System.Linq.Expressions/tests/Unary/UnaryUnboxTests.cs @@ -10,7 +10,6 @@ public static class UnaryUnboxTests #region Test methods [Theory, ClassData(typeof(CompilationTypes))] - [ActiveIssue("https://github.com/dotnet/runtime/issues/51952", TestPlatforms.tvOS)] public static void CheckUnaryUnboxTest(bool useInterpreter) { VerifyUnbox(42, typeof(int), false, useInterpreter); From 038b4d5718b8b2751c9f2a2057162f5da88a7869 Mon Sep 17 00:00:00 2001 From: Maxim Lipnin Date: Tue, 6 Jul 2021 17:19:33 +0300 Subject: [PATCH 14/14] Disable Microsoft.CSharp library test suite due to app crash in CI --- src/libraries/tests.proj | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj index 1460b3be14140f..b1f20442aac7ec 100644 --- a/src/libraries/tests.proj +++ b/src/libraries/tests.proj @@ -205,6 +205,9 @@ + + +