[ios-clr] Remove ActiveIssue attribute for CoreCLR library tests on Apple mobile#125439
[ios-clr] Remove ActiveIssue attribute for CoreCLR library tests on Apple mobile#125439kotlarmilos wants to merge 7 commits intodotnet:mainfrom
Conversation
…pdate project exclusions
There was a problem hiding this comment.
Pull request overview
This PR aims to address failing test runs on Apple mobile (iOS/tvOS) when using CoreCLR by re-enabling previously skipped coverage and adjusting test/build configuration so those tests can execute successfully.
Changes:
- Removed Apple mobile/CoreCLR
ActiveIssueskips across several library tests and removed some Apple mobile project exclusions. - Updated
CustomAttributeDecoderTeststo derive the expectedSystem.Typeassembly-qualified string from metadata (more resilient to trimming/ILLink differences). - Adjusted test build targets to allow preview features/runtime-async on Apple mobile targets.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/libraries/tests.proj | Removes Apple mobile/CoreCLR exclusions for specific test projects so they run again. |
| src/libraries/System.Runtime/tests/System.Runtime.Tests/System/Reflection/InvokeWithRefLikeArgs.cs | Re-enables a previously skipped Apple mobile/CoreCLR test (still guarded by Reflection.Emit support). |
| src/libraries/System.Runtime/tests/System.Globalization.Calendars.Tests/CalendarTestWithConfigSwitch/CalendarTests.cs | Re-enables a previously skipped Apple mobile/CoreCLR calendar parsing test. |
| src/libraries/System.Runtime.Loader/tests/RefEmitLoadContext/RefEmitLoadContextTest.cs | Re-enables a previously skipped Apple mobile/CoreCLR Reflection.Emit load-context test. |
| src/libraries/System.Reflection.MetadataLoadContext/tests/src/Tests/CustomAttributes/DllImportTests.cs | Reorders ActiveIssue attributes (no behavioral code change). |
| src/libraries/System.Reflection.Metadata/tests/Metadata/Decoding/CustomAttributeDecoderTests.cs | Makes expected System.Type string match decoder output post-trimming and avoids using Type.GetType for enum underlying types. |
| src/libraries/System.Collections/tests/BitArray/BitArray_CtorTests.cs | Re-enables a previously skipped Apple mobile/CoreCLR BitArray clone test. |
| eng/testing/tests.targets | Enables preview features/runtime-async for Apple mobile targets by removing an exclusion. |
Comments suppressed due to low confidence (2)
src/libraries/System.Runtime/tests/System.Globalization.Calendars.Tests/CalendarTestWithConfigSwitch/CalendarTests.cs:25
- The test comment says the legacy behavior "On mobile, this does not throw", but after removing the Apple mobile skip this test will run on Apple mobile and still asserts a FormatException. Either update the comment to the specific platform(s) where it doesn’t throw (e.g., Android-only), or extend the skip/condition so the assertion matches actual mobile behavior.
[Fact]
[SkipOnPlatform(TestPlatforms.Android, "Doesn't throw on mobile")]
public static void TestJapaneseCalendarDateParsing()
{
CultureInfo ciJapanese = new CultureInfo("ja-JP") { DateTimeFormat = { Calendar = new JapaneseCalendar() } };
DateTime dt = new DateTime(1970, 1, 1);
string eraName = dt.ToString("gg", ciJapanese);
// Legacy behavior which we used to throw when using a year number exceeding the era max year.
//
// On mobile, this does not throw, but instead produces a DateTime w/ 95/01/01
Assert.ThrowsAny<FormatException>(() => DateTime.Parse(eraName + " 70/1/1 0:00:00", ciJapanese));
}
src/libraries/System.Collections/tests/BitArray/BitArray_CtorTests.cs:280
- Re-enabling this test on Apple mobile means it will allocate a BitArray of length int.MaxValue-30 (~256MB+), which is likely to OOM or heavily destabilize test runs on memory-constrained devices. Consider reducing the allocation size while still covering the clone path, or gating this test (e.g., OuterLoop / platform-conditional) for constrained environments.
[Fact]
public static void Clone_LongLength_Works()
{
BitArray bitArray = new BitArray(int.MaxValue - 30);
BitArray clone = (BitArray)bitArray.Clone();
Assert.Equal(bitArray.Length, clone.Length);
}
You can also share your feedback on Copilot code review. Take the survey.
src/libraries/System.Runtime.Loader/tests/RefEmitLoadContext/RefEmitLoadContextTest.cs
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.
You can also share your feedback on Copilot code review. Take the survey.
|
/azp run runtime-ioslike |
|
Azure Pipelines successfully started running 1 pipeline(s). |
…maccatalyst platform configurations
|
azp run runtime-ioslike,runtime-ioslikesimulator,runtime-maccatalyst |
|
/azp run runtime-ioslike,runtime-ioslikesimulator,runtime-maccatalyst |
|
Azure Pipelines successfully started running 3 pipeline(s). |
… stubs Fix two root causes of CoreCLR crashes on iOS/tvOS: 1. TransitionBlock.FromTarget() used TargetOS.OSX to select AppleArm64TransitionBlock, which only matched macOS. iOS/tvOS used the standard Arm64TransitionBlock with 8-byte stack alignment instead of Apple's natural alignment, producing incorrect GC ref maps that mismatched the runtime. Fix: Use target.IsApplePlatform which covers all Apple platforms. 2. AsyncResumptionStub generates synthetic IL with tokens referencing ParameterizedType/InstantiatedType. These tokens must be wrapped in manifest module tokens via ManifestModuleWrappedMethodIL. The CoreLib was in the version bubble (Apple mobile tests), wrapping was skipped and token resolution threw NotImplementedException. Fix: Wrap AsyncResumptionStub tokens unconditionally. Fixes dotnet#124325, dotnet#125724, dotnet#125725, dotnet#125726 Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 23 out of 23 changed files in this pull request and generated 1 comment.
You can also share your feedback on Copilot code review. Take the survey.
|
/azp run runtime-ioslike,runtime-ioslikesimulator,runtime-maccatalyst |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run runtime-ioslikesimulator,runtime-maccatalyst |
|
Azure Pipelines successfully started running 2 pipeline(s). |
Description
This PR tries to fix the failing CoreCLR tests on Apple mobile.