Skip to content

[clr-ios] Enable System.Private.Xml tests on CoreCLR#127464

Open
kotlarmilos wants to merge 6 commits intodotnet:mainfrom
kotlarmilos:ios-coreclr-test-exclusions
Open

[clr-ios] Enable System.Private.Xml tests on CoreCLR#127464
kotlarmilos wants to merge 6 commits intodotnet:mainfrom
kotlarmilos:ios-coreclr-test-exclusions

Conversation

@kotlarmilos
Copy link
Copy Markdown
Member

@kotlarmilos kotlarmilos commented Apr 27, 2026

Description

This PR enables System.Private.Xml tests on Apple mobile CoreCLR. The local tests succeeded without failures.

- Move System.Composition.Tests to the 'Not supported on Apple mobile'
  group. Failures observed on iossimulator-CoreCLR with aggressive
  trimming are reflection/metadata-stripping issues consistent with
  the existing line-381 aggressive-trimming and line-505 NativeAOT
  exclusions, not iOS-CoreCLR-specific bugs.
- Re-enable System.Private.Xml.Tests on Apple mobile CoreCLR. The
  full suite (46452 / 46453) passes on iossimulator-arm64 Release
  with EnableAggressiveTrimming=true. The original exclusion under
  dotnet#124344 referenced on-device failures only.

System.Runtime.Serialization.Xml.Tests stays excluded under dotnet#124344;
the underlying StackOverflowException in DCS_DeeplyLinkedData is
tracked separately.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 27, 2026 17:26
@kotlarmilos kotlarmilos changed the title Refine iOS/tvOS/MacCatalyst CoreCLR test exclusions [clr-ios] Enable System.Private.Xml tests on CoreCLR Apr 27, 2026
@kotlarmilos kotlarmilos added this to the 11.0.0 milestone Apr 27, 2026
@kotlarmilos kotlarmilos marked this pull request as ready for review April 27, 2026 17:28
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

Enables running System.Private.Xml library tests for Apple mobile CoreCLR by removing the test project exclusion in the libraries test orchestration project.

Changes:

  • Removed the Apple mobile CoreCLR exclusion for System.Private.Xml.Tests.csproj, allowing the test suite to run.
  • Reclassified System.Composition.Tests.csproj as “Not supported on Apple mobile” within the same Apple mobile CoreCLR exclusions block (no functional behavior change vs. remaining excluded state).
Show a summary per file
File Description
src/libraries/tests.proj Updates Apple mobile CoreCLR test exclusions to allow System.Private.Xml tests to run while keeping unsupported/failing suites excluded.

Copilot's findings

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

@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @BrzVlad, @janvorli, @kg
See info in area-owners.md if you want to be subscribed.

…clusion

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comment thread src/libraries/tests.proj Outdated
…on for System.Runtime.Serialization.Xml.Tests
Copilot AI review requested due to automatic review settings April 28, 2026 09:19
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.

Copilot's findings

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

Comment thread src/libraries/tests.proj
@kotlarmilos
Copy link
Copy Markdown
Member Author

/azp run runtime-ioslike

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

The static ctor of XsltApiTestCaseBase2 writes back to an .xsl file inside
the app bundle, which is read-only on Apple mobile, causing
TypeInitializationException to propagate to all derived tests (~1615
failures). Skip the cctor body on Apple mobile CoreCLR and mark the two
tests that actually consume the modified file (XmlResolver5/XmlResolver7)
with ActiveIssue.

Tracked under dotnet#124344.

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

/azp run runtime-ioslike

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Comment thread src/libraries/tests.proj Outdated
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Text.Json\tests\System.Text.Json.Tests\System.Text.Json.Tests.csproj" />

<!-- Not supported on Apple mobile -->
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Composition\tests\System.Composition.Tests.csproj" />
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this currently unsupported on Mono as well?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, it's already excluded on Mono device and maccatalyst

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is it this condition

<ItemGroup Condition="('$(TargetOS)' != 'browser' and '$(RunAOTCompilation)' == 'true' and '$(MonoForceInterpreter)' != 'true') or ('$(TargetOS)' == 'browser' and '$(BuildAOTTestsOnHelix)' == 'true' and '$(RunDisabledWasmTests)' != 'true') or (('$(TargetOS)' == 'ios' or '$(TargetOS)' == 'tvos' or '$(TargetOS)' == 'maccatalyst') and '$(BuildTestsOnHelix)' == 'true')">
?

Is BuildTestsOnHelix always true when the tests run on Mono, and is it false when the tests run on CoreCLR?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes this is the condition. It is redundant so I dropped it from the initial ItemGroup

Comment thread src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltApiV2.cs Outdated
…e CoreCLR

The previous early-return inside the static ctor left static fields
default-initialized, which would make any non-skipped derived test
fail in confusing ways. A class-level [ActiveIssue] gates xunit
discovery for the entire class on (IsAppleMobile && IsCoreCLR), so
the static ctor never runs and tests are properly reported as
skipped — symmetric with how the existing
ConditionalClass(IsReflectionEmitSupported) skips the same class on
Mono Apple mobile FullAOT.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 28, 2026 15:58
It is already excluded on every Apple-mobile Helix leg (Mono and
CoreCLR) by the Aggressive Trimming ItemGroup at tests.proj:381 via
the (TargetOS in (ios, tvos, maccatalyst)) and BuildTestsOnHelix
clause.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants