Skip to content

[clr-ios] Fix mobile CoreCLR test failures across libraries#128409

Draft
kotlarmilos wants to merge 2 commits into
dotnet:mainfrom
kotlarmilos:kotlarmilos/fix-mobile-clr-test-failures
Draft

[clr-ios] Fix mobile CoreCLR test failures across libraries#128409
kotlarmilos wants to merge 2 commits into
dotnet:mainfrom
kotlarmilos:kotlarmilos/fix-mobile-clr-test-failures

Conversation

@kotlarmilos
Copy link
Copy Markdown
Member

Summary

Restores green on the runtime-extra-platforms mobile pipelines. All failures here were uncovered by recently enabling CoreCLR on Apple mobile (iossimulator, maccatalyst, tvos). Each test exercised a code path that conflicts with the new target's constraints (aggressive trimming, xUnit MemberData lookup for inherited statics).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 20, 2026 15:33
@kotlarmilos kotlarmilos marked this pull request as draft May 20, 2026 15:33
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/area-meta
See info in area-owners.md if you want to be subscribed.

@kotlarmilos
Copy link
Copy Markdown
Member Author

/azp run runtime-extra-platforms

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts a handful of library test cases to run (or skip) correctly on newly-enabled CoreCLR Apple mobile test legs by updating xUnit data discovery patterns and adding platform/trimming-related guards.

Changes:

  • Add/adjust theory data sourcing to avoid xUnit MemberData resolution problems in derived/overridden conformance tests.
  • Skip or expand existing platform exclusions for tests that rely on desktop-only behaviors (e.g., TPA/fusion log details, reflection emit under aggressive trimming).
  • Expand an existing ActiveIssue to include MacCatalyst and gate a debugger-proxy test away from NativeAOT.
Show a summary per file
File Description
src/libraries/System.Security.Cryptography/tests/CryptoStream.cs Adds an override using explicit MemberType for MemberData to stabilize conformance theory data discovery.
src/libraries/System.Runtime.Loader/tests/TpaLoadFailureTest.cs Skips path/fusion-log validation tests on Apple mobile where the assumptions don’t hold.
src/libraries/System.Reflection.Metadata/tests/Metadata/Decoding/CustomAttributeDecoderTests.cs Expands an ActiveIssue platform mask to include MacCatalyst.
src/libraries/System.Net.Sockets/tests/FunctionalTests/NetworkStreamTest.cs Adds an override to supply MemberType for MemberData on a conformance theory.
src/libraries/System.Linq.Expressions/tests/DebuggerTypeProxy/ExpressionDebuggerTypeProxyTests.cs Gates a reflection-heavy theory away from NativeAOT via ConditionalTheory.
src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Internal/HostTests.cs Further gates Moq/RefEmit-based tests away from aggressively-trimmed/AOT-like environments.

Copilot's findings

  • Files reviewed: 6/6 changed files
  • Comments generated: 1

Comment on lines +46 to +50
[Theory]
[MemberData(nameof(CopyToAsync_AllDataCopied_MemberData), MemberType = typeof(ConnectedStreamConformanceTests))]
public override Task CopyToAsync_AllDataCopied(int byteCount, bool useAsync) =>
base.CopyToAsync_AllDataCopied(byteCount, useAsync);

This was referenced May 21, 2026
…pported gate

The previous override of CopyToAsync_AllDataCopied / ReadWrite_Success used
MemberData(MemberType = typeof(ConnectedStreamConformanceTests)) but the
referenced static factory methods are not strongly referenced from anywhere,
so the trimmer on maccatalyst-arm64 CoreCLR stripped them and xUnit reported
"Could not find public static member named 'ReadWrite_Success_MemberData' /
'CopyToAsync_AllDataCopied_MemberData' on ConnectedStreamConformanceTests".

Add [DynamicDependency] on the override to keep those statics rooted.

Also restore the [ConditionalTheory(IsMultithreadingSupported)] gate on
CopyToAsync_AllDataCopied that the override had silently dropped, per the
copilot-pr-reviewer comment.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@kotlarmilos
Copy link
Copy Markdown
Member Author

/azp run runtime-extra-platforms

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants