Commit 24c5e6f
[mobile] Add MacCatalyst to Console OpenStandardHandle test exclusions (#127274)
Fixes System.Console.Tests failures on MacCatalyst discovered in
runtime-extra-platforms build
[#1388505](https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1388505).
## Failure
**Build**:
[#1388505](https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1388505)
(2026-04-21)
**Job**: `maccatalyst-arm64 Release AllSubsets_Mono`
**Helix job**: `f4caa84e-1526-4c12-a872-6f24ac6f3ba1`
**Work item**: System.Console.Tests
**Platform**: MacCatalyst arm64 (also affects maccatalyst-x64)
### Failed tests
Four tests failed with `PlatformNotSupportedException`:
1. `OpenStandardInputHandle_ReturnsValidHandle`
2. `OpenStandardOutputHandle_ReturnsValidHandle`
3. `OpenStandardErrorHandle_ReturnsValidHandle`
4. `OpenStandardHandles_DoNotOwnHandle`
````text
[FAIL] System.Tests.ConsoleTests.OpenStandardInputHandle_ReturnsValidHandle
System.PlatformNotSupportedException : Operation is not supported on this platform.
at System.ConsolePal.OpenStandardInputHandle()
at System.Console.OpenStandardInputHandle()
````
### Root cause
The `Console.OpenStandardXXXHandle()` methods throw
`PlatformNotSupportedException` on 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.MacCatalyst` to 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:
- Skip on: iOS, tvOS, MacCatalyst, Android, Browser (where applicable)
- Run on: Windows, Linux, macOS desktop
## Testing
After this fix, the four failing tests will be skipped on MacCatalyst in
the `runtime-extra-platforms` pipeline, 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]
> <details>
> <summary>🔒 Integrity filter blocked 1 item</summary>
>
> The following item were blocked because they don't meet the GitHub
integrity level.
>
> - [#126805](#126805)
`search_pull_requests`: has lower integrity than agent requires. The
agent cannot read data with integrity below "approved".
>
> To allow these resources, lower `min-integrity` in your GitHub
frontmatter:
>
> ```yaml
> tools:
> github:
> min-integrity: approved # merged | approved | unapproved | none
> ```
>
> </details>
> Generated by [Mobile Platform Failure
Scanner](https://github.com/dotnet/runtime/actions/runs/24774805343/agentic_workflow)
· ● 2.2M ·
[◷](https://github.com/search?q=repo%3Adotnet%2Fruntime+%22gh-aw-workflow-id%3A+mobile-scan%22&type=pullrequests)
<!-- gh-aw-agentic-workflow: Mobile Platform Failure Scanner, engine:
copilot, model: claude-sonnet-4.5, id: 24774805343, workflow_id:
mobile-scan, run:
https://github.com/dotnet/runtime/actions/runs/24774805343 -->
<!-- gh-aw-workflow-id: mobile-scan -->
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>1 parent 0f91c41 commit 24c5e6f
1 file changed
Lines changed: 8 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
| 152 | + | |
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
| 159 | + | |
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
| 166 | + | |
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| |||
0 commit comments