From 09d75d081aa30b07b1fdef47e0ac310706b9a066 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Strehovsk=C3=BD?= Date: Thu, 25 Mar 2021 20:36:16 +0100 Subject: [PATCH] Put failing tests behind ActiveIssue (#852) --- .../System.Private.CoreLib/src/System/Enum.CoreRT.cs | 2 +- src/libraries/System.Runtime/tests/System/AttributeTests.cs | 2 ++ .../System/Diagnostics/StackTraceHiddenAttributeTests.cs | 5 +++++ .../tests/System/PseudoCustomAttributeTests.cs | 3 +++ .../tests/System/Reflection/InvokeWithRefLikeArgs.cs | 3 +++ .../System/Runtime/CompilerServices/RuntimeHelpersTests.cs | 1 + .../Runtime/ExceptionServices/ExceptionDispatchInfoTests.cs | 2 ++ src/libraries/System.Runtime/tests/System/Type/TypeTests.cs | 1 + 8 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Enum.CoreRT.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Enum.CoreRT.cs index ef5d6a1274fd31..c268cd8acccb27 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Enum.CoreRT.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Enum.CoreRT.cs @@ -222,7 +222,7 @@ public static string[] GetNames(Type enumType) return enumType.GetEnumNames(); if (!enumType.IsEnum) - throw new ArgumentException(SR.Arg_MustBeEnum); + throw new ArgumentException(SR.Arg_MustBeEnum, nameof(enumType)); string[] ret = GetEnumInfo(enumType).Names; diff --git a/src/libraries/System.Runtime/tests/System/AttributeTests.cs b/src/libraries/System.Runtime/tests/System/AttributeTests.cs index 92cb3d7621536d..7eb2db1349ee51 100644 --- a/src/libraries/System.Runtime/tests/System/AttributeTests.cs +++ b/src/libraries/System.Runtime/tests/System/AttributeTests.cs @@ -154,6 +154,8 @@ class ChildAttributeWithField : ParentAttribute public int Field = 0; } + + [ActiveIssue("https://github.com/dotnet/runtimelab/issues/803" /* NativeAot */)] [Fact] [StringValue("\uDFFF")] public static void StringArgument_InvalidCodeUnits_FallbackUsed() diff --git a/src/libraries/System.Runtime/tests/System/Diagnostics/StackTraceHiddenAttributeTests.cs b/src/libraries/System.Runtime/tests/System/Diagnostics/StackTraceHiddenAttributeTests.cs index 5fb2f317ee6a34..e59d7a69475b8a 100644 --- a/src/libraries/System.Runtime/tests/System/Diagnostics/StackTraceHiddenAttributeTests.cs +++ b/src/libraries/System.Runtime/tests/System/Diagnostics/StackTraceHiddenAttributeTests.cs @@ -17,6 +17,7 @@ public void Ctor() [Fact] + [ActiveIssue("https://github.com/dotnet/runtimelab/issues/851" /* NativeAot */)] public void MethodHidden_ExceptionStackTrace() { string stacktrace = null; @@ -49,6 +50,7 @@ public void MethodHidden_ExceptionStackTrace() [Fact] + [ActiveIssue("https://github.com/dotnet/runtimelab/issues/851" /* NativeAot */)] public void MethodHidden_EnvironmentStackTrace() { string stacktrace = GetStackTraceMethodA(); @@ -69,6 +71,7 @@ public void MethodHidden_EnvironmentStackTrace() [Fact] + [ActiveIssue("https://github.com/dotnet/runtimelab/issues/851" /* NativeAot */)] public void ConstructorHidden_EnvironmentStackTrace() { Assert.Contains(nameof(NotHiddenConstructor), new NotHiddenConstructor().StackTrace); @@ -94,6 +97,7 @@ private class HiddenConstructor [Fact] + [ActiveIssue("https://github.com/dotnet/runtimelab/issues/851" /* NativeAot */)] public void ClassHidden_EnvironmentStackTrace() { string stacktrace = HiddenClass.GetStackTraceMethodA(); @@ -117,6 +121,7 @@ internal class HiddenClass [Fact] + [ActiveIssue("https://github.com/dotnet/runtimelab/issues/851" /* NativeAot */)] public void StructHidden_EnvironmentStackTrace() { string stacktrace = new HiddenStruct().GetStackTraceMethodA(); diff --git a/src/libraries/System.Runtime/tests/System/PseudoCustomAttributeTests.cs b/src/libraries/System.Runtime/tests/System/PseudoCustomAttributeTests.cs index 2525b7cf1d5221..23501a5bf9cfe0 100644 --- a/src/libraries/System.Runtime/tests/System/PseudoCustomAttributeTests.cs +++ b/src/libraries/System.Runtime/tests/System/PseudoCustomAttributeTests.cs @@ -13,6 +13,7 @@ namespace System.Tests { public static partial class PseudoCustomAttributeTests { + [ActiveIssue("https://github.com/dotnet/runtimelab/issues/830" /* NativeAot */)] [Theory] [MemberData(nameof(TestData_AttributeExists))] [MemberData(nameof(TestData_AttributeDoesNotExist))] @@ -38,6 +39,7 @@ public static void IsDefined(object target, Type attributeType, Attribute attrib } } + [ActiveIssue("https://github.com/dotnet/runtimelab/issues/830" /* NativeAot */)] [Theory] [MemberData(nameof(TestData_AttributeExists))] [MemberData(nameof(TestData_AttributeDoesNotExist))] @@ -63,6 +65,7 @@ public static void GetCustomAttribute(object target, Type attributeType, Attribu } } + [ActiveIssue("https://github.com/dotnet/runtimelab/issues/830" /* NativeAot */)] [Theory] [MemberData(nameof(TestData_AttributeExists))] [MemberData(nameof(TestData_AttributeDoesNotExist))] diff --git a/src/libraries/System.Runtime/tests/System/Reflection/InvokeWithRefLikeArgs.cs b/src/libraries/System.Runtime/tests/System/Reflection/InvokeWithRefLikeArgs.cs index 4f2e4d2da1b0f1..c86f29c6f6f5f1 100644 --- a/src/libraries/System.Runtime/tests/System/Reflection/InvokeWithRefLikeArgs.cs +++ b/src/libraries/System.Runtime/tests/System/Reflection/InvokeWithRefLikeArgs.cs @@ -17,6 +17,7 @@ public static void MethodReturnsRefToRefStruct_ThrowsNSE() } [Fact] + [ActiveIssue("https://github.com/dotnet/runtimelab/issues/155" /* NativeAot */)] public static void MethodTakesRefStructAsArg_DoesNotCopyValueBack() { MethodInfo mi = GetMethod(nameof(TestClass.TakesRefStructAsArg)); @@ -28,6 +29,7 @@ public static void MethodTakesRefStructAsArg_DoesNotCopyValueBack() } [Fact] + [ActiveIssue("https://github.com/dotnet/runtimelab/issues/155" /* NativeAot */)] public static void MethodTakesRefStructAsArgWithDefaultValue_DoesNotCopyValueBack() { MethodInfo mi = GetMethod(nameof(TestClass.TakesRefStructAsArgWithDefaultValue)); @@ -77,6 +79,7 @@ public static void PropertyTypedAsRefToRefStruct_AsPropInfo_ThrowsNSE() } [Fact] + [ActiveIssue("https://github.com/dotnet/runtimelab/issues/155" /* NativeAot */)] public static void PropertyIndexerWithRefStructArg_DoesNotCopyValueBack() { PropertyInfo pi = typeof(TestClassWithIndexerWithRefStructArg).GetProperty("Item"); diff --git a/src/libraries/System.Runtime/tests/System/Runtime/CompilerServices/RuntimeHelpersTests.cs b/src/libraries/System.Runtime/tests/System/Runtime/CompilerServices/RuntimeHelpersTests.cs index d9b579c56476ad..34b6e9aa6ec3aa 100644 --- a/src/libraries/System.Runtime/tests/System/Runtime/CompilerServices/RuntimeHelpersTests.cs +++ b/src/libraries/System.Runtime/tests/System/Runtime/CompilerServices/RuntimeHelpersTests.cs @@ -273,6 +273,7 @@ static ClassWithNormalCctor() } } + [ActiveIssue("https://github.com/dotnet/runtimelab/issues/155" /* NativeAot */)] [Fact] public static void GetUninitalizedObject_DoesNotRunBeforeFieldInitCctors() { diff --git a/src/libraries/System.Runtime/tests/System/Runtime/ExceptionServices/ExceptionDispatchInfoTests.cs b/src/libraries/System.Runtime/tests/System/Runtime/ExceptionServices/ExceptionDispatchInfoTests.cs index c2bb2bdc48cd14..820eceed5b3645 100644 --- a/src/libraries/System.Runtime/tests/System/Runtime/ExceptionServices/ExceptionDispatchInfoTests.cs +++ b/src/libraries/System.Runtime/tests/System/Runtime/ExceptionServices/ExceptionDispatchInfoTests.cs @@ -29,6 +29,7 @@ public static void StaticThrow_UpdatesStackTraceAppropriately() } [Fact] + [ActiveIssue("https://github.com/dotnet/runtimelab/issues/831" /* NativeAot */)] public static void SetCurrentStackTrace_Invalid_Throws() { Exception e; @@ -49,6 +50,7 @@ public static void SetCurrentStackTrace_Invalid_Throws() } [Fact] + [ActiveIssue("https://github.com/dotnet/runtimelab/issues/831" /* NativeAot */)] public static void SetCurrentStackTrace_IncludedInExceptionStackTrace() { Exception e; diff --git a/src/libraries/System.Runtime/tests/System/Type/TypeTests.cs b/src/libraries/System.Runtime/tests/System/Type/TypeTests.cs index d801b567140a28..e6c91a07d8c713 100644 --- a/src/libraries/System.Runtime/tests/System/Type/TypeTests.cs +++ b/src/libraries/System.Runtime/tests/System/Type/TypeTests.cs @@ -527,6 +527,7 @@ public void GetTypeByName_Invalid(string typeName, Type expectedException, bool } [Fact] + [ActiveIssue("https://github.com/dotnet/runtimelab/issues/155" /* NativeAot */)] public void GetTypeByName_InvokeViaReflection_Success() { MethodInfo method = typeof(Type).GetMethod("GetType", new[] { typeof(string) });