From ebd5cb686e1463cb927f4e969f9b5ff05adbbcc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20K=C3=B6plinger?= Date: Mon, 22 Jan 2024 13:53:50 +0100 Subject: [PATCH] Disable failing System.Numerics.Tensors tests (#97301) https://github.com/dotnet/runtime/issues/97297 https://github.com/dotnet/runtime/issues/97295 https://github.com/dotnet/runtime/issues/97296 Caused by https://github.com/dotnet/runtime/pull/97192 --- .../Common/tests/TestUtilities/System/PlatformDetection.cs | 1 + .../System.Numerics.Tensors/tests/TensorPrimitives.Generic.cs | 4 ++++ .../System.Numerics.Tensors/tests/TensorPrimitivesTests.cs | 1 + src/libraries/tests.proj | 4 ++++ 4 files changed, 10 insertions(+) diff --git a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs index 68ec070f3b1d5..054a868c25f85 100644 --- a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs +++ b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs @@ -30,6 +30,7 @@ public static partial class PlatformDetection public static bool IsMonoRuntime => Type.GetType("Mono.RuntimeStructs") != null; public static bool IsNotMonoRuntime => !IsMonoRuntime; public static bool IsMonoInterpreter => GetIsRunningOnMonoInterpreter(); + public static bool IsNotMonoInterpreter => !IsMonoInterpreter; public static bool IsMonoAOT => Environment.GetEnvironmentVariable("MONO_AOT_MODE") == "aot"; public static bool IsNotMonoAOT => Environment.GetEnvironmentVariable("MONO_AOT_MODE") != "aot"; public static bool IsNativeAot => IsNotMonoRuntime && !IsReflectionEmitSupported; diff --git a/src/libraries/System.Numerics.Tensors/tests/TensorPrimitives.Generic.cs b/src/libraries/System.Numerics.Tensors/tests/TensorPrimitives.Generic.cs index 65c45de4c4255..e626337624e5f 100644 --- a/src/libraries/System.Numerics.Tensors/tests/TensorPrimitives.Generic.cs +++ b/src/libraries/System.Numerics.Tensors/tests/TensorPrimitives.Generic.cs @@ -174,6 +174,7 @@ public static IEnumerable SpanDestinationFunctionsToTest() [Theory] [MemberData(nameof(SpanDestinationFunctionsToTest))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/97297")] public void SpanDestinationFunctions_AllLengths(SpanDestinationDelegate tensorPrimitivesMethod, Func expectedMethod) { Assert.All(Helpers.TensorLengthsIncluding0, tensorLength => @@ -192,6 +193,7 @@ public void SpanDestinationFunctions_AllLengths(SpanDestinationDelegate tensorPr [Theory] [MemberData(nameof(SpanDestinationFunctionsToTest))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/97297")] public void SpanDestinationFunctions_InPlace(SpanDestinationDelegate tensorPrimitivesMethod, Func expectedMethod) { Assert.All(Helpers.TensorLengthsIncluding0, tensorLength => @@ -210,6 +212,7 @@ public void SpanDestinationFunctions_InPlace(SpanDestinationDelegate tensorPrimi [Theory] [MemberData(nameof(SpanDestinationFunctionsToTest))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/97297")] public void SpanDestinationFunctions_SpecialValues(SpanDestinationDelegate tensorPrimitivesMethod, Func expectedMethod) { Assert.All(Helpers.TensorLengths, tensorLength => @@ -230,6 +233,7 @@ public void SpanDestinationFunctions_SpecialValues(SpanDestinationDelegate tenso [Theory] [MemberData(nameof(SpanDestinationFunctionsToTest))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/97297")] public void SpanDestinationFunctions_ValueRange(SpanDestinationDelegate tensorPrimitivesMethod, Func expectedMethod) { Assert.All(VectorLengthAndIteratedRange(ConvertFromSingle(-100f), ConvertFromSingle(100f), ConvertFromSingle(3f)), arg => diff --git a/src/libraries/System.Numerics.Tensors/tests/TensorPrimitivesTests.cs b/src/libraries/System.Numerics.Tensors/tests/TensorPrimitivesTests.cs index 8a9f9ff6b4de2..def5b5cc8f1dc 100644 --- a/src/libraries/System.Numerics.Tensors/tests/TensorPrimitivesTests.cs +++ b/src/libraries/System.Numerics.Tensors/tests/TensorPrimitivesTests.cs @@ -11,6 +11,7 @@ namespace System.Numerics.Tensors.Tests { + [ActiveIssue("https://github.com/dotnet/runtime/issues/97295", typeof(PlatformDetection), nameof(PlatformDetection.IsMonoRuntime), nameof(PlatformDetection.IsNotMonoInterpreter))] public abstract class TensorPrimitivesTests where T : unmanaged, IEquatable { #region Abstract Methods Under Test diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj index 2595b93e91b4b..2d3d56e60caef 100644 --- a/src/libraries/tests.proj +++ b/src/libraries/tests.proj @@ -148,6 +148,10 @@ + + + +