From a62621bfdf797acde65b730945b91060aafb559f Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Mon, 27 Apr 2026 19:24:53 +0200 Subject: [PATCH 1/6] Refine iOS/tvOS/MacCatalyst CoreCLR test exclusions - 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 #124344 referenced on-device failures only. System.Runtime.Serialization.Xml.Tests stays excluded under #124344; the underlying StackOverflowException in DCS_DeeplyLinkedData is tracked separately. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/libraries/tests.proj | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj index d6c4aed495b680..a5c37d951c17a9 100644 --- a/src/libraries/tests.proj +++ b/src/libraries/tests.proj @@ -655,10 +655,8 @@ - - @@ -669,6 +667,7 @@ + From cba3d79327d6f739686d89df3552ed171c9c8388 Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Mon, 27 Apr 2026 19:32:06 +0200 Subject: [PATCH 2/6] Reference #127463 for System.Runtime.Serialization.Xml.Tests exclusion Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/libraries/tests.proj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj index a5c37d951c17a9..1ea913a706326e 100644 --- a/src/libraries/tests.proj +++ b/src/libraries/tests.proj @@ -658,7 +658,7 @@ - + From 6e57d7b04576e0eb74dd06ea5df49562e0262464 Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Tue, 28 Apr 2026 11:19:18 +0200 Subject: [PATCH 3/6] Add ActiveIssue attribute for DCS_DeeplyLinkedData and remove exclusion for System.Runtime.Serialization.Xml.Tests --- .../tests/DataContractSerializer.cs | 1 + src/libraries/tests.proj | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/libraries/System.Runtime.Serialization.Xml/tests/DataContractSerializer.cs b/src/libraries/System.Runtime.Serialization.Xml/tests/DataContractSerializer.cs index ef58dd59207ced..c78e842212dbdb 100644 --- a/src/libraries/System.Runtime.Serialization.Xml/tests/DataContractSerializer.cs +++ b/src/libraries/System.Runtime.Serialization.Xml/tests/DataContractSerializer.cs @@ -4568,6 +4568,7 @@ public static void DCS_TypeWithPrimitiveKnownTypes() private static bool IsNotWindowsRandomOSR => !PlatformDetection.IsWindows || (Environment.GetEnvironmentVariable("DOTNET_JitRandomOnStackReplacement") == null); [SkipOnPlatform(TestPlatforms.Browser, "Causes a stack overflow")] + [ActiveIssue("https://github.com/dotnet/runtime/issues/127463", typeof(PlatformDetection), nameof(PlatformDetection.IsAppleMobile), nameof(PlatformDetection.IsCoreCLR))] [ConditionalFact(typeof(DataContractSerializerTests), nameof(IsNotWindowsRandomOSR))] public static void DCS_DeeplyLinkedData() { diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj index 1ea913a706326e..2615d5146aac5b 100644 --- a/src/libraries/tests.proj +++ b/src/libraries/tests.proj @@ -658,9 +658,6 @@ - - - From d144feb0188d11ddba0b14df66ff166d29093dcb Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Tue, 28 Apr 2026 16:11:49 +0200 Subject: [PATCH 4/6] Disable XSLT absolute-URI tests on Apple mobile CoreCLR 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 https://github.com/dotnet/runtime/issues/124344. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Xslt/XslCompiledTransformApi/XslCompiledTransform.cs | 2 ++ .../tests/Xslt/XslCompiledTransformApi/XsltApiV2.cs | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XslCompiledTransform.cs b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XslCompiledTransform.cs index 00511a00ec6f19..7f9707004c9bdf 100644 --- a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XslCompiledTransform.cs +++ b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XslCompiledTransform.cs @@ -600,6 +600,7 @@ public void XmlResolver3(object param, XslInputType xslInputType, ReaderType rea [InlineData(XslInputType.Navigator, ReaderType.XmlValidatingReader, OutputType.Writer, NavType.XPathDocument)] [InlineData(XslInputType.Navigator, ReaderType.XmlValidatingReader, OutputType.TextWriter, NavType.XPathDocument)] [Theory] + [ActiveIssue("https://github.com/dotnet/runtime/issues/124344", typeof(PlatformDetection), nameof(PlatformDetection.IsAppleMobile), nameof(PlatformDetection.IsCoreCLR))] public void XmlResolver7(XslInputType xslInputType, ReaderType readerType, OutputType outputType, NavType navType) { using (new AllowDefaultResolverContext()) @@ -2548,6 +2549,7 @@ public void XmlResolver3(object param, XslInputType xslInputType, ReaderType rea [InlineData(XslInputType.Navigator, ReaderType.XmlValidatingReader, OutputType.Writer, NavType.XPathDocument)] [InlineData(XslInputType.Navigator, ReaderType.XmlValidatingReader, OutputType.TextWriter, NavType.XPathDocument)] [Theory] + [ActiveIssue("https://github.com/dotnet/runtime/issues/124344", typeof(PlatformDetection), nameof(PlatformDetection.IsAppleMobile), nameof(PlatformDetection.IsCoreCLR))] public void XmlResolver5(XslInputType xslInputType, ReaderType readerType, OutputType outputType, NavType navType) { using (new AllowDefaultResolverContext()) diff --git a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltApiV2.cs b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltApiV2.cs index a4cee46f961fe2..c0b9002dab13ef 100644 --- a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltApiV2.cs +++ b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltApiV2.cs @@ -76,6 +76,11 @@ public XsltApiTestCaseBase2(ITestOutputHelper output) static XsltApiTestCaseBase2() { + // The XSL file lives in the app bundle which is read-only on Apple mobile CoreCLR. + // https://github.com/dotnet/runtime/issues/124344 + if (PlatformDetection.IsAppleMobile && PlatformDetection.IsCoreCLR) + return; + // Replace absolute URI in xmlResolver_document_function.xml based on the environment string targetFile = Path.Combine(Path.GetTempPath(), typeof(XsltApiTestCaseBase2) + "_" + Path.GetRandomFileName()); string xslFile = Path.Combine("TestFiles", FilePathUtil.GetTestDataPath(), "XsltApiV2", "xmlResolver_document_function_absolute_uri.xsl"); From 49f4338708daa4f81515e04353964db932ced251 Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Tue, 28 Apr 2026 17:58:28 +0200 Subject: [PATCH 5/6] Use class-level [ActiveIssue] for XsltApiTestCaseBase2 on Apple mobile CoreCLR MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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> --- .../tests/Xslt/XslCompiledTransformApi/XsltApiV2.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltApiV2.cs b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltApiV2.cs index c0b9002dab13ef..7dc7693a689ead 100644 --- a/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltApiV2.cs +++ b/src/libraries/System.Private.Xml/tests/Xslt/XslCompiledTransformApi/XsltApiV2.cs @@ -38,6 +38,7 @@ public enum NavType // //////////////////////////////////////////////////////////////// [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/124344", typeof(PlatformDetection), nameof(PlatformDetection.IsAppleMobile), nameof(PlatformDetection.IsCoreCLR))] public class XsltApiTestCaseBase2 { // Generic data for all derived test cases @@ -76,11 +77,6 @@ public XsltApiTestCaseBase2(ITestOutputHelper output) static XsltApiTestCaseBase2() { - // The XSL file lives in the app bundle which is read-only on Apple mobile CoreCLR. - // https://github.com/dotnet/runtime/issues/124344 - if (PlatformDetection.IsAppleMobile && PlatformDetection.IsCoreCLR) - return; - // Replace absolute URI in xmlResolver_document_function.xml based on the environment string targetFile = Path.Combine(Path.GetTempPath(), typeof(XsltApiTestCaseBase2) + "_" + Path.GetRandomFileName()); string xslFile = Path.Combine("TestFiles", FilePathUtil.GetTestDataPath(), "XsltApiV2", "xmlResolver_document_function_absolute_uri.xsl"); From e35fa13d5644b5d1a9baee59a51831f1b02b0678 Mon Sep 17 00:00:00 2001 From: Milos Kotlar Date: Tue, 28 Apr 2026 18:47:58 +0200 Subject: [PATCH 6/6] Drop redundant System.Composition.Tests.csproj exclusion 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> --- src/libraries/tests.proj | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj index 2615d5146aac5b..bed1eb545cbc6b 100644 --- a/src/libraries/tests.proj +++ b/src/libraries/tests.proj @@ -664,7 +664,6 @@ -