[clr-ios] Propagate XSLT ActiveIssue from base to derived test classes#127788
Conversation
PR dotnet#127464 attempted to disable the XslCompiledTransform tests on Apple mobile by adding [ActiveIssue] to the XsltApiTestCaseBase2 base class, but [ActiveIssue] is a Trait attribute and does not propagate through the class hierarchy in xUnit (only [ConditionalClass] does). All 469 derived test cases continued to run and threw TypeInitializationException when the static ctor tried to write into the read-only iOS/tvOS app bundle. This PR moves the [ActiveIssue] from the (test-method-less) base class to each of the 34 test classes that derive from XsltApiTestCaseBase2 (or ReflectionTestCaseBase), and removes the now-redundant attribute from the base. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR fixes Apple mobile CoreCLR XSLT test failures by ensuring the [ActiveIssue(IsAppleMobile, IsCoreCLR)] suppression is applied to the concrete xUnit test classes (since [ActiveIssue] is a trait and does not propagate from base classes), and removes the ineffective attribute from the common base.
Changes:
- Remove
[ActiveIssue]fromXsltApiTestCaseBase2(where it was ineffective for derived tests). - Add
[ActiveIssue(".../124344", IsAppleMobile, IsCoreCLR)]to the concrete derived XSLT test classes so they are correctly skipped on affected legs.
Show a summary per file
| File | Description |
|---|---|
| src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltSettings.cs | Adds class-level [ActiveIssue] to ensure the test class is skipped on AppleMobile CoreCLR. |
| src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XslTransformMultith.cs | Adds class-level [ActiveIssue] to skip the multithreaded test class on AppleMobile CoreCLR. |
| src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltArgumentListMultith.cs | Adds class-level [ActiveIssue] to skip the multithreaded test class on AppleMobile CoreCLR. |
| src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltArgumentList.cs | Adds [ActiveIssue] to multiple concrete test classes in this file so they are skipped on AppleMobile CoreCLR. |
| src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltApiV2.cs | Removes the non-propagating [ActiveIssue] from XsltApiTestCaseBase2. |
| src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XslCompiledTransform.cs | Adds [ActiveIssue] to concrete test classes to skip on AppleMobile CoreCLR. |
| src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/TempFiles.cs | Adds class-level [ActiveIssue] to skip on AppleMobile CoreCLR. |
| src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/OutputSettings.cs | Adds class-level [ActiveIssue] to skip on AppleMobile CoreCLR. |
| src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/Errata4.cs | Adds class-level [ActiveIssue] to skip on AppleMobile CoreCLR. |
Copilot's findings
- Files reviewed: 9/9 changed files
- Comments generated: 2
|
Tagging subscribers to 'os-ios': @vitek-karas, @kotlarmilos, @steveisok, @akoeplinger |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Per Copilot review on PR dotnet#127788: - Remove redundant ActiveIssue from ReflectionTestCaseBase (no test methods). - Remove ActiveIssue from ExObj (helper class, not a test class). - Move ActiveIssue from SameInstanceXslTransformTestCase to its concrete derived test classes (SameInstanceXslTransformReader, SameInstanceXslTransformWriter). - Move ActiveIssue from CSameInstanceXsltArgTestCase2 to its concrete derived test classes (CSameInstanceXsltArgumentListGetParam, CSameInstanceXsltArgumentListGetExtnObject, CSameInstanceXsltArgumentListTransform).
|
/azp run runtime-ioslike |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run runtime-ioslike |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
This broke native AOT outerloops and various runtime-extra-platform legs because placing an ActiveIssue on something makes xUnit stop looking at ConditionalClass in the base. So everything that was relying on the ConditionalClass is now broken. |
|
Sorry for that, reverting the PR. I will try to find a better approach here. |
I think we'll just need to also propagate ConditionalClass. I don't know if this is a xUnit deficiency or something we do wrong in our ActiveIssueAttribute handling. The change that was done in this PR should not have the effect that it had. |
Description
The
[ActiveIssue(IsAppleMobile, IsCoreCLR)]added by #127464 was on theXsltApiTestCaseBase2base class, but xUnit[ActiveIssue]does not propagate to derived classes, so all 469 XSLT tests still ran and threwTypeInitializationExceptionfrom the base static ctor writing into the read-only iOS/tvOS bundle (build 1406826).