Skip to content

[clr-ios] Preserve inherited MemberData statics on maccatalyst CoreCLR#128409

Merged
kotlarmilos merged 13 commits into
dotnet:mainfrom
kotlarmilos:kotlarmilos/fix-mobile-clr-test-failures
Jun 16, 2026
Merged

[clr-ios] Preserve inherited MemberData statics on maccatalyst CoreCLR#128409
kotlarmilos merged 13 commits into
dotnet:mainfrom
kotlarmilos:kotlarmilos/fix-mobile-clr-test-failures

Conversation

@kotlarmilos

@kotlarmilos kotlarmilos commented May 20, 2026

Copy link
Copy Markdown
Member

Description

On maccatalyst-arm64 AllSubsets_CoreCLR, ILLink strips the inherited ReadWrite_Success_MemberData and CopyToAsync_AllDataCopied_MemberData statics on ConnectedStreamConformanceTests, so xUnit's [MemberData] lookup fails for CryptoStreamTests.ReadWrite_Success and NetworkStreamTest.CopyToAsync_AllDataCopied. Adds a [DynamicDependency] on each derived override to root the base statics, and restores the IsMultithreadingSupported guard on CopyToAsync_AllDataCopied.

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
@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).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 thread src/libraries/System.Net.Sockets/tests/FunctionalTests/NetworkStreamTest.cs Outdated
This was referenced May 21, 2026
@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).

@kotlarmilos kotlarmilos requested a review from BrzVlad June 12, 2026 07:32
Comment thread src/libraries/System.Security.Cryptography/tests/CryptoStream.cs Outdated
… per-override DynamicDependency

Address review feedback: rather than adding [MemberData]/[DynamicDependency]
overrides on each derived test to root the inherited statics, root the
StreamConformanceTests assembly in an ILLink.Descriptors.xml, mirroring
System.IO.FileSystem.Tests. Reverts the CryptoStream and NetworkStreamTest
overrides.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 14, 2026 14:59
@dotnet-policy-service dotnet-policy-service Bot added the linkable-framework Issues associated with delivering a linker friendly framework label Jun 14, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot's findings

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

@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).

Copilot AI review requested due to automatic review settings June 15, 2026 13:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot's findings

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

@kotlarmilos kotlarmilos enabled auto-merge (squash) June 15, 2026 13:52
@kotlarmilos

Copy link
Copy Markdown
Member Author

/ba-g dotnet/dnceng#1883

@kotlarmilos kotlarmilos merged commit e57af36 into dotnet:main Jun 16, 2026
93 of 95 checks passed
@dotnet-milestone-bot dotnet-milestone-bot Bot modified the milestones: 11.0.0, 11.0-preview6 Jun 17, 2026
@github-actions github-actions Bot mentioned this pull request Jun 22, 2026
github-actions Bot added a commit that referenced this pull request Jul 2, 2026
TestCustomAttributeDecoderGenericUsingReflection resolves nested enum types
by name via Type.GetType in GetUnderlyingEnumType. Under aggressive trimming
on maccatalyst (AllSubsets_CoreCLR) those names are stripped, so Type.GetType
returns null, no branch matches, and the provider throws
ArgumentOutOfRangeException. Add an ILLink trimmer root descriptor that
preserves the containing type (and its nested enums) on Apple mobile, mirroring
the approach used for StreamConformanceTests in #128409.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-Infrastructure-coreclr Only use for closed issues linkable-framework Issues associated with delivering a linker friendly framework os-ios Apple iOS

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants