From 341d4665655f3a1b2920b33162122d53c58dd747 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 24 Mar 2026 02:12:51 +0000 Subject: [PATCH 1/7] Initial plan From 6686d28f5e4a72b9c26d6026816830a25555fbd4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 24 Mar 2026 02:18:56 +0000 Subject: [PATCH 2/7] Fix CanReadArrayOfAnySize timeout on checked coreclr by adding IsReleaseRuntime condition Co-authored-by: danmoseley <6385855+danmoseley@users.noreply.github.com> Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/185c955f-9d8a-4286-94bf-f0af9fc6b65f --- src/libraries/System.Formats.Nrbf/tests/EdgeCaseTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/System.Formats.Nrbf/tests/EdgeCaseTests.cs b/src/libraries/System.Formats.Nrbf/tests/EdgeCaseTests.cs index 1d14993a0890c3..f17f83dc20cdcf 100644 --- a/src/libraries/System.Formats.Nrbf/tests/EdgeCaseTests.cs +++ b/src/libraries/System.Formats.Nrbf/tests/EdgeCaseTests.cs @@ -61,7 +61,7 @@ public void ArraysOfStringsCanContainMemberReferences(FormatterTypeStyle typeFor } } - [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.Is64BitProcess))] + [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.Is64BitProcess), nameof(PlatformDetection.IsReleaseRuntime))] [InlineData(100)] [InlineData(64_001)] [InlineData(127_000)] From 6a4f5715ef48d6578c74722586e6e5fc81dd7042 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 25 Mar 2026 14:19:46 +0000 Subject: [PATCH 3/7] Apply @adamsitnik suggestion: use runtime check inside test instead of ConditionalTheory Co-authored-by: adamsitnik <6011991+adamsitnik@users.noreply.github.com> Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/127eb19e-8537-496a-aeb8-6a23a106f8cd --- src/libraries/System.Formats.Nrbf/tests/EdgeCaseTests.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/libraries/System.Formats.Nrbf/tests/EdgeCaseTests.cs b/src/libraries/System.Formats.Nrbf/tests/EdgeCaseTests.cs index f17f83dc20cdcf..8483b0260d6427 100644 --- a/src/libraries/System.Formats.Nrbf/tests/EdgeCaseTests.cs +++ b/src/libraries/System.Formats.Nrbf/tests/EdgeCaseTests.cs @@ -61,15 +61,18 @@ public void ArraysOfStringsCanContainMemberReferences(FormatterTypeStyle typeFor } } - [ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.Is64BitProcess), nameof(PlatformDetection.IsReleaseRuntime))] + [Theory] [InlineData(100)] [InlineData(64_001)] [InlineData(127_000)] -#if RELEASE && NET // it takes a lot of time to execute [InlineData(2147483591)] // Array.MaxLength -#endif public void CanReadArrayOfAnySize(int length) { + if (length == 2147483591 && (!PlatformDetection.Is64BitProcess || !PlatformDetection.IsReleaseRuntime || PlatformDetection.IsMonoRuntime)) + { + throw new SkipTestException("It would take too much time to execute."); + } + try { byte[] input = new byte[length]; From 002fa9d03bea51621c3e9a460ae07205bb16713c Mon Sep 17 00:00:00 2001 From: Dan Moseley Date: Wed, 25 Mar 2026 20:57:40 -0600 Subject: [PATCH 4/7] Use ConditionalTheory to enable SkipTestException handling [Theory] does not handle SkipTestException - it treats the throw as a test failure. [ConditionalTheory] wires up a custom test invoker that catches SkipTestException and reports the test as skipped. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/libraries/System.Formats.Nrbf/tests/EdgeCaseTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/System.Formats.Nrbf/tests/EdgeCaseTests.cs b/src/libraries/System.Formats.Nrbf/tests/EdgeCaseTests.cs index 8483b0260d6427..4d44b330f45aad 100644 --- a/src/libraries/System.Formats.Nrbf/tests/EdgeCaseTests.cs +++ b/src/libraries/System.Formats.Nrbf/tests/EdgeCaseTests.cs @@ -61,7 +61,7 @@ public void ArraysOfStringsCanContainMemberReferences(FormatterTypeStyle typeFor } } - [Theory] + [ConditionalTheory] [InlineData(100)] [InlineData(64_001)] [InlineData(127_000)] From bae6537cc1ad4ce830dfc37184c0d6a5f3a5aef6 Mon Sep 17 00:00:00 2001 From: Adam Sitnik Date: Thu, 26 Mar 2026 08:50:52 +0100 Subject: [PATCH 5/7] Apply suggestion from @adamsitnik --- src/libraries/System.Formats.Nrbf/tests/EdgeCaseTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/System.Formats.Nrbf/tests/EdgeCaseTests.cs b/src/libraries/System.Formats.Nrbf/tests/EdgeCaseTests.cs index 4d44b330f45aad..72f3b9aad9ad8a 100644 --- a/src/libraries/System.Formats.Nrbf/tests/EdgeCaseTests.cs +++ b/src/libraries/System.Formats.Nrbf/tests/EdgeCaseTests.cs @@ -68,7 +68,7 @@ public void ArraysOfStringsCanContainMemberReferences(FormatterTypeStyle typeFor [InlineData(2147483591)] // Array.MaxLength public void CanReadArrayOfAnySize(int length) { - if (length == 2147483591 && (!PlatformDetection.Is64BitProcess || !PlatformDetection.IsReleaseRuntime || PlatformDetection.IsMonoRuntime)) + if (length == 2147483591 && (!PlatformDetection.Is64BitProcess || !PlatformDetection.IsReleaseRuntime || !PlatformDetection.IsNetCore)) { throw new SkipTestException("It would take too much time to execute."); } From 8675b14214107d4f70466d4efb90392644e94a6f Mon Sep 17 00:00:00 2001 From: Adam Sitnik Date: Thu, 26 Mar 2026 14:00:20 +0100 Subject: [PATCH 6/7] Apply suggestion from @adamsitnik --- src/libraries/System.Formats.Nrbf/tests/EdgeCaseTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/System.Formats.Nrbf/tests/EdgeCaseTests.cs b/src/libraries/System.Formats.Nrbf/tests/EdgeCaseTests.cs index 72f3b9aad9ad8a..e9befd6b73369f 100644 --- a/src/libraries/System.Formats.Nrbf/tests/EdgeCaseTests.cs +++ b/src/libraries/System.Formats.Nrbf/tests/EdgeCaseTests.cs @@ -68,7 +68,7 @@ public void ArraysOfStringsCanContainMemberReferences(FormatterTypeStyle typeFor [InlineData(2147483591)] // Array.MaxLength public void CanReadArrayOfAnySize(int length) { - if (length == 2147483591 && (!PlatformDetection.Is64BitProcess || !PlatformDetection.IsReleaseRuntime || !PlatformDetection.IsNetCore)) + if (length == 2147483591 && (!PlatformDetection.Is64BitProcess || PlatformDetection.SlowRuntimeTimeoutModifier != 1 || !PlatformDetection.IsNetCore)) { throw new SkipTestException("It would take too much time to execute."); } From ff355fb5dc4c306d5563ec7b404e967b459ccf4b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 26 Mar 2026 15:37:26 +0000 Subject: [PATCH 7/7] Fix skip condition to use !IsReleaseRuntime to catch checked runtimes of any bitness Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/558ab2d2-fd9c-4914-a0aa-7032325fc90c Co-authored-by: danmoseley <6385855+danmoseley@users.noreply.github.com> --- src/libraries/System.Formats.Nrbf/tests/EdgeCaseTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/System.Formats.Nrbf/tests/EdgeCaseTests.cs b/src/libraries/System.Formats.Nrbf/tests/EdgeCaseTests.cs index e9befd6b73369f..72f3b9aad9ad8a 100644 --- a/src/libraries/System.Formats.Nrbf/tests/EdgeCaseTests.cs +++ b/src/libraries/System.Formats.Nrbf/tests/EdgeCaseTests.cs @@ -68,7 +68,7 @@ public void ArraysOfStringsCanContainMemberReferences(FormatterTypeStyle typeFor [InlineData(2147483591)] // Array.MaxLength public void CanReadArrayOfAnySize(int length) { - if (length == 2147483591 && (!PlatformDetection.Is64BitProcess || PlatformDetection.SlowRuntimeTimeoutModifier != 1 || !PlatformDetection.IsNetCore)) + if (length == 2147483591 && (!PlatformDetection.Is64BitProcess || !PlatformDetection.IsReleaseRuntime || !PlatformDetection.IsNetCore)) { throw new SkipTestException("It would take too much time to execute."); }