Uh oh!
There was an error while loading. Please reload this page.
[mobile] Disable NativeAOT-specific test failures on Apple mobile - #130168
Conversation
Gate tests that fail only under the NativeAOT runtime on Apple mobile platforms (iOS, tvOS, MacCatalyst). These pass on CoreCLR and Mono but fail on NativeAOT due to keychain entitlement handling in AOT app bundles (Pkcs), reflection/AOT differences (Microsoft.Extensions.Hosting configuration-from-file and EventSourceLogger), and other NativeAOT-only behavior. Conditioned on IsAppleMobile + IsNativeAot so coverage is retained on CoreCLR/Mono and non-Apple platforms. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…-nativeaot-apple-mobile-tests # Conflicts: # src/libraries/Microsoft.Extensions.Caching.Memory/tests/MemoryCacheSetAndRemoveTests.cs
There was a problem hiding this comment.
Pull request overview
This PR disables a set of library tests specifically for Apple mobile + NativeAOT by adding [ActiveIssue] gates to the affected test classes/methods, intending to keep coverage unchanged on CoreCLR/Mono and on non-Apple platforms.
Changes:
- Add class-level
[ActiveIssue]skips to multipleSystem.Security.Cryptography.Pkcstest classes when running onPlatformDetection.IsAppleMobile && PlatformDetection.IsNativeAot. - Add method-level
[ActiveIssue]skips to failing tests inMicrosoft.Extensions.Hosting,System.Net.HttpListener,System.Diagnostics.FileVersionInfo, andMicrosoft.Extensions.Caching.Memoryunder the same Apple-mobile NativeAOT condition. - Centralize the suppression rationale via issue links in the new
[ActiveIssue]attributes.
Show a summary per file
| File | Description |
|---|---|
| src/libraries/System.Security.Cryptography.Pkcs/tests/SignedCms/SignerInfoTests.cs | Adds class-level [ActiveIssue] for Apple mobile NativeAOT. |
| src/libraries/System.Security.Cryptography.Pkcs/tests/SignedCms/SignedCmsTests.cs | Adds class-level [ActiveIssue] for Apple mobile NativeAOT. |
| src/libraries/System.Security.Cryptography.Pkcs/tests/SignedCms/CounterSigningDerOrder.cs | Adds class-level [ActiveIssue] for Apple mobile NativeAOT. |
| src/libraries/System.Security.Cryptography.Pkcs/tests/Rfc3161/TimestampTokenTests.cs | Adds class-level [ActiveIssue] for Apple mobile NativeAOT. |
| src/libraries/System.Security.Cryptography.Pkcs/tests/Rfc3161/TimestampRequestTests.cs | Adds class-level [ActiveIssue] for Apple mobile NativeAOT. |
| src/libraries/System.Security.Cryptography.Pkcs/tests/EnvelopedCms/DecryptTestsUsingExplicitPrivateKey.cs | Adds class-level [ActiveIssue] for Apple mobile NativeAOT. |
| src/libraries/System.Security.Cryptography.Pkcs/tests/EnvelopedCms/DecryptTestsUsingCertWithPrivateKey.cs | Adds class-level [ActiveIssue] for Apple mobile NativeAOT. |
| src/libraries/System.Security.Cryptography.Pkcs/tests/EnvelopedCms/DecryptTestsRsaPaddingModeTests.cs | Adds class-level [ActiveIssue] for Apple mobile NativeAOT. |
| src/libraries/System.Net.HttpListener/tests/HttpResponseStreamTests.cs | Adds method-level [ActiveIssue] for Apple mobile NativeAOT closed-connection scenarios. |
| src/libraries/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/FileVersionInfoTest.cs | Adds method-level [ActiveIssue] for Apple mobile NativeAOT. |
| src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/HostTests.cs | Adds method-level [ActiveIssue] for Apple mobile NativeAOT. |
| src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/HostBuilderTests.cs | Adds method-level [ActiveIssue] for Apple mobile NativeAOT config-from-file scenario. |
| src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/HostApplicationBuilderTests.cs | Adds method-level [ActiveIssue] for Apple mobile NativeAOT config-from-file scenario. |
| src/libraries/Microsoft.Extensions.Caching.Memory/tests/MemoryCacheSetAndRemoveTests.cs | Adds method-level [ActiveIssue] for Apple mobile NativeAOT. |
Copilot's findings
- Files reviewed: 13/13 changed files
- Comments generated: 14
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Use dotnet#126697 (test failures in .NET Apple mobile apps on NativeAOT) instead of dotnet#127786, which is scoped to System.Runtime.Tests single-file/static-link bundle failures and does not track these library test failures. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
kotlarmilos
commented
Jul 3, 2026
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
The Apple mobile NativeAOT tracking issue (dotnet#126697) lists FileVersionInfo_EmptyFVI as the failing FileVersionInfo test (it loads Assembly1.cs via a relative path that is not bundled into the .app). The gate was only applied to FileVersionInfo_CustomManagedAssembly, so add the same NativeAOT ActiveIssue gate to FileVersionInfo_EmptyFVI. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
kotlarmilos
commented
Jul 3, 2026
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Uh oh!
There was an error while loading. Please reload this page.
kotlarmilos
commented
Jul 9, 2026
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b83f3804-8c74-4dcb-a966-f80032c96f9a
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b83f3804-8c74-4dcb-a966-f80032c96f9a
There was a problem hiding this comment.
Copilot's findings
Comments suppressed due to low confidence (1)
src/libraries/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/FileVersionInfoTest.cs:27
- WriteEmbeddedResourceToFile assumes GetManifestResourceStream(resourceName) succeeds. If the embedded resource name ever changes (e.g., LogicalName mismatch), this will fail with a NullReferenceException at source.CopyTo, which is hard to diagnose in CI. Consider throwing a clear exception when the resource stream is null.
{
string path = GetTestFilePath();
using (Stream source = typeof(FileVersionInfoTest).Assembly.GetManifestResourceStream(resourceName))
using (FileStream destination = File.Create(path))
{
source.CopyTo(destination);
}
- Files reviewed: 14/14 changed files
- Comments generated: 0 new
There was a problem hiding this comment.
Copilot's findings
Comments suppressed due to low confidence (1)
src/libraries/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/FileVersionInfoTest.cs:26
- WriteEmbeddedResourceToFile will currently throw a NullReferenceException if the embedded resource name is wrong (GetManifestResourceStream returns null). Since this method is now used with multiple resource names (including "Assembly1.cs"), it’s worth failing with a clear exception message to make CI failures actionable.
private string WriteEmbeddedResourceToFile(string resourceName)
{
string path = GetTestFilePath();
using (Stream source = typeof(FileVersionInfoTest).Assembly.GetManifestResourceStream(resourceName))
using (FileStream destination = File.Create(path))
{
source.CopyTo(destination);
}
- Files reviewed: 14/14 changed files
- Comments generated: 0 new
Uh oh!
There was an error while loading. Please reload this page.
…30168) ## Description This disables a set of tests that fail only under the NativeAOT runtime on Apple mobile platforms while continuing to pass on CoreCLR and Mono. The failures come from keychain entitlement handling in NativeAOT app bundles, reflection and configuration-from-file behavior in Microsoft.Extensions.Hosting, and an HttpListener closed-connection case. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Description
This disables a set of tests that fail only under the NativeAOT runtime on Apple mobile platforms while continuing to pass on CoreCLR and Mono. The failures come from keychain entitlement handling in NativeAOT app bundles, reflection and configuration-from-file behavior in Microsoft.Extensions.Hosting, and an HttpListener closed-connection case.