From 126c3613846c5403c759466510add21c2019adff Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 22 Apr 2026 11:12:29 +0000 Subject: [PATCH 1/2] Add MacCatalyst to Console OpenStandardHandle test exclusions Fixes System.Console.Tests failures on MacCatalyst discovered in build #1388505. The tests for Console.OpenStandardInputHandle(), OpenStandardOutputHandle(), and OpenStandardErrorHandle() were already excluding iOS, tvOS, and Android (where these APIs throw PlatformNotSupportedException), but were missing MacCatalyst from the exclusion list. This caused 4 test failures on maccatalyst-arm64: - OpenStandardInputHandle_ReturnsValidHandle - OpenStandardOutputHandle_ReturnsValidHandle - OpenStandardErrorHandle_ReturnsValidHandle - OpenStandardHandles_DoNotOwnHandle The fix adds TestPlatforms.MacCatalyst to the exclusion list on all affected tests, and adds it to the inclusion list on the corresponding "ThrowsOnUnsupportedPlatforms" tests. Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1388505 Job: maccatalyst-arm64 Release AllSubsets_Mono Work item: System.Console.Tests Helix job: f4caa84e-1526-4c12-a872-6f24ac6f3ba1 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../System.Console/tests/ConsoleHandles.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/libraries/System.Console/tests/ConsoleHandles.cs b/src/libraries/System.Console/tests/ConsoleHandles.cs index 3930c6c6875dd5..702d9378da6a3a 100644 --- a/src/libraries/System.Console/tests/ConsoleHandles.cs +++ b/src/libraries/System.Console/tests/ConsoleHandles.cs @@ -13,7 +13,7 @@ namespace System.Tests public partial class ConsoleTests { [Fact] - [PlatformSpecific(TestPlatforms.Any & ~TestPlatforms.Browser & ~TestPlatforms.iOS & ~TestPlatforms.tvOS & ~TestPlatforms.Android)] + [PlatformSpecific(TestPlatforms.Any & ~TestPlatforms.Browser & ~TestPlatforms.iOS & ~TestPlatforms.tvOS & ~TestPlatforms.MacCatalyst & ~TestPlatforms.Android)] public void OpenStandardInputHandle_ReturnsValidHandle() { using SafeFileHandle inputHandle = Console.OpenStandardInputHandle(); @@ -23,7 +23,7 @@ public void OpenStandardInputHandle_ReturnsValidHandle() } [Fact] - [PlatformSpecific(TestPlatforms.Any & ~TestPlatforms.iOS & ~TestPlatforms.tvOS & ~TestPlatforms.Android)] + [PlatformSpecific(TestPlatforms.Any & ~TestPlatforms.iOS & ~TestPlatforms.tvOS & ~TestPlatforms.MacCatalyst & ~TestPlatforms.Android)] public void OpenStandardOutputHandle_ReturnsValidHandle() { using SafeFileHandle outputHandle = Console.OpenStandardOutputHandle(); @@ -33,7 +33,7 @@ public void OpenStandardOutputHandle_ReturnsValidHandle() } [Fact] - [PlatformSpecific(TestPlatforms.Any & ~TestPlatforms.iOS & ~TestPlatforms.tvOS & ~TestPlatforms.Android)] + [PlatformSpecific(TestPlatforms.Any & ~TestPlatforms.iOS & ~TestPlatforms.tvOS & ~TestPlatforms.MacCatalyst & ~TestPlatforms.Android)] public void OpenStandardErrorHandle_ReturnsValidHandle() { using SafeFileHandle errorHandle = Console.OpenStandardErrorHandle(); @@ -43,7 +43,7 @@ public void OpenStandardErrorHandle_ReturnsValidHandle() } [Fact] - [PlatformSpecific(TestPlatforms.Any & ~TestPlatforms.Browser & ~TestPlatforms.iOS & ~TestPlatforms.tvOS & ~TestPlatforms.Android)] + [PlatformSpecific(TestPlatforms.Any & ~TestPlatforms.Browser & ~TestPlatforms.iOS & ~TestPlatforms.tvOS & ~TestPlatforms.MacCatalyst & ~TestPlatforms.Android)] public void OpenStandardHandles_DoNotOwnHandle() { SafeFileHandle inputHandle = Console.OpenStandardInputHandle(); @@ -69,7 +69,7 @@ public void OpenStandardHandles_DoNotOwnHandle() } [ConditionalFact(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))] - [PlatformSpecific(TestPlatforms.Any & ~TestPlatforms.Browser & ~TestPlatforms.iOS & ~TestPlatforms.tvOS & ~TestPlatforms.Android)] + [PlatformSpecific(TestPlatforms.Any & ~TestPlatforms.Browser & ~TestPlatforms.iOS & ~TestPlatforms.tvOS & ~TestPlatforms.MacCatalyst & ~TestPlatforms.Android)] public void OpenStandardHandles_CanBeUsedWithStream() { using RemoteInvokeHandle child = RemoteExecutor.Invoke(() => @@ -149,21 +149,21 @@ public void UnixConsoleStream_SeekableStdoutRedirection_WritesAllContent() } [Fact] - [PlatformSpecific(TestPlatforms.Android | TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.Browser)] + [PlatformSpecific(TestPlatforms.Android | TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst | TestPlatforms.Browser)] public void OpenStandardInputHandle_ThrowsOnUnsupportedPlatforms() { Assert.Throws(() => Console.OpenStandardInputHandle()); } [Fact] - [PlatformSpecific(TestPlatforms.Android | TestPlatforms.iOS | TestPlatforms.tvOS)] + [PlatformSpecific(TestPlatforms.Android | TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)] public void OpenStandardOutputHandle_ThrowsOnUnsupportedPlatforms() { Assert.Throws(() => Console.OpenStandardOutputHandle()); } [Fact] - [PlatformSpecific(TestPlatforms.Android | TestPlatforms.iOS | TestPlatforms.tvOS)] + [PlatformSpecific(TestPlatforms.Android | TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)] public void OpenStandardErrorHandle_ThrowsOnUnsupportedPlatforms() { Assert.Throws(() => Console.OpenStandardErrorHandle()); From d8e8ecf3225cf6cd07756ef8b18f2ba323a2805a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 22 Apr 2026 11:12:36 +0000 Subject: [PATCH 2/2] ci: trigger checks