[mobile] Add MacCatalyst to Console OpenStandardHandle test exclusions#127274
Open
github-actions[bot] wants to merge 2 commits intomainfrom
Open
[mobile] Add MacCatalyst to Console OpenStandardHandle test exclusions#127274github-actions[bot] wants to merge 2 commits intomainfrom
github-actions[bot] wants to merge 2 commits intomainfrom
Conversation
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>
Contributor
|
Tagging subscribers to this area: @dotnet/area-system-console |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes System.Console.Tests failures on MacCatalyst by aligning the PlatformSpecific test filters with other mobile platforms where Console.OpenStandard*Handle() is not supported.
Changes:
- Exclude
TestPlatforms.MacCatalystfrom tests that expect standard handles to be available/usable. - Include
TestPlatforms.MacCatalystin tests that validatePlatformNotSupportedExceptionis thrown on unsupported platforms.
adamsitnik
approved these changes
Apr 22, 2026
Member
adamsitnik
left a comment
There was a problem hiding this comment.
LGTM, we need to update the code review skill to require the tests to be annotated when testing APIs that are not available on every platform
This was referenced Apr 22, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes System.Console.Tests failures on MacCatalyst discovered in runtime-extra-platforms build #1388505.
Failure
Build: #1388505 (2026-04-21)
Job:
maccatalyst-arm64 Release AllSubsets_MonoHelix job:
f4caa84e-1526-4c12-a872-6f24ac6f3ba1Work item: System.Console.Tests
Platform: MacCatalyst arm64 (also affects maccatalyst-x64)
Failed tests
Four tests failed with
PlatformNotSupportedException:OpenStandardInputHandle_ReturnsValidHandleOpenStandardOutputHandle_ReturnsValidHandleOpenStandardErrorHandle_ReturnsValidHandleOpenStandardHandles_DoNotOwnHandleRoot cause
The
Console.OpenStandardXXXHandle()methods throwPlatformNotSupportedExceptionon mobile platforms (iOS, tvOS, Android, MacCatalyst) because these platforms do not expose the underlying file handles for standard streams.The existing tests already had
[PlatformSpecific]attributes excluding iOS, tvOS, and Android, but MacCatalyst was missing from the exclusion list. This is an oversight because MacCatalyst has the same limitation as other Apple mobile platforms.Fix
Add
TestPlatforms.MacCatalystto the exclusion list (using& ~TestPlatforms.MacCatalyst) on all five tests that attempt to use these APIs, and add it to the inclusion list on the three "ThrowsOnUnsupportedPlatforms" tests that validate the exception is thrown.This makes the skip coverage consistent across all mobile platforms:
Testing
After this fix, the four failing tests will be skipped on MacCatalyst in the
runtime-extra-platformspipeline, matching the behavior on iOS, tvOS, and Android.Note
This PR was created by GitHub Copilot after analyzing mobile platform CI failures in the runtime-extra-platforms pipeline (build 1388505).
Note
🔒 Integrity filter blocked 1 item
The following item were blocked because they don't meet the GitHub integrity level.
search_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".To allow these resources, lower
min-integrityin your GitHub frontmatter: