Summary
Several tests are excluded when running Mono.Android.NET-Tests with _AndroidTypeMapImplementation=trimmable. Each exclusion needs investigation and a proper fix to achieve full test parity with the legacy llvm-ir typemap.
TrimmableIgnore category (3 tests)
These tests pass with legacy CoreCLR but fail/behave differently with the trimmable typemap:
1. JnienvTest.NewOpenGenericTypeThrows
Status: Fix in progress — PR #11093 adds an IsGenericTypeDefinition guard in StartCreateInstance. Once merged, this test should be re-enabled.
2. JnienvTest.ActivatedDirectThrowableSubclassesShouldBeRegistered
Status: Fix in progress — PR #11094 adds ActivatePeerFromJavaConstructor which calls the matching managed ctor for ()V signatures. Once merged, this test should be re-enabled.
3. JavaObjectExtensionsTests.JavaCast_BaseToGenericWrapper
Status: Needs investigation. The test casts a JavaList to JavaList<object> using JavaCast. The trimmable typemap may not handle generic type casting correctly.
SSL category (~20 tests)
SSL tests (ServerCertificateCustomValidationCallback_*, HttpsShouldWork, etc.) are excluded with the SSL category. These need investigation — they may already be fixed by:
Once those PRs merge, re-run SSL tests with trimmable and remove the exclusion if they pass.
ExcludedTestNames (6 fixtures, ~42 tests)
These Java.Interop-Tests fixtures are excluded because they crash with SIGABRT (ClassNotFoundException) — the JCW Java classes for JavaObject subclasses are not generated by the trimmable build process:
Java.InteropTests.JavaObjectTest
Java.InteropTests.InvokeVirtualFromConstructorTests
Java.InteropTests.JniPeerMembersTests
Java.InteropTests.JniTypeManagerTests
Java.InteropTests.JniValueMarshaler_object_ContractTests
Java.InteropTests.JavaExceptionTests.InnerExceptionIsNotAProxy
Root cause
These fixtures use JavaObject types (Java.Interop's direct JNI wrapper, not Java.Lang.Object). Their JCW Java classes (e.g., net.dot.jni.test.JavaDisposedObject) are generated by the standalone Java.Interop-Tests build and compiled into Mono.Android-Test-classes.jar. However, the trimmable JCW generator only processes Java.Lang.Object subclasses — JavaObject subclasses are outside the Android type map system.
Possible fix
Include the standalone Java.Interop JCW output in the trimmable APK build, or have the trimmable GenerateTrimmableTypeMap task also process JavaObject subclasses when detected in the test assembly.
Definition of done
Summary
Several tests are excluded when running
Mono.Android.NET-Testswith_AndroidTypeMapImplementation=trimmable. Each exclusion needs investigation and a proper fix to achieve full test parity with the legacy llvm-ir typemap.TrimmableIgnore category (3 tests)
These tests pass with legacy CoreCLR but fail/behave differently with the trimmable typemap:
1.
JnienvTest.NewOpenGenericTypeThrowsStatus: Fix in progress — PR #11093 adds an
IsGenericTypeDefinitionguard inStartCreateInstance. Once merged, this test should be re-enabled.2.
JnienvTest.ActivatedDirectThrowableSubclassesShouldBeRegisteredStatus: Fix in progress — PR #11094 adds
ActivatePeerFromJavaConstructorwhich calls the matching managed ctor for()Vsignatures. Once merged, this test should be re-enabled.3.
JavaObjectExtensionsTests.JavaCast_BaseToGenericWrapperStatus: Needs investigation. The test casts a
JavaListtoJavaList<object>usingJavaCast. The trimmable typemap may not handle generic type casting correctly.SSL category (~20 tests)
SSL tests (
ServerCertificateCustomValidationCallback_*,HttpsShouldWork, etc.) are excluded with theSSLcategory. These need investigation — they may already be fixed by:IHostnameVerifierInvokerAlwaysAcceptingHostnameVerifierOnce those PRs merge, re-run SSL tests with trimmable and remove the exclusion if they pass.
ExcludedTestNames (6 fixtures, ~42 tests)
These Java.Interop-Tests fixtures are excluded because they crash with SIGABRT (
ClassNotFoundException) — the JCW Java classes forJavaObjectsubclasses are not generated by the trimmable build process:Java.InteropTests.JavaObjectTestJava.InteropTests.InvokeVirtualFromConstructorTestsJava.InteropTests.JniPeerMembersTestsJava.InteropTests.JniTypeManagerTestsJava.InteropTests.JniValueMarshaler_object_ContractTestsJava.InteropTests.JavaExceptionTests.InnerExceptionIsNotAProxyRoot cause
These fixtures use
JavaObjecttypes (Java.Interop's direct JNI wrapper, notJava.Lang.Object). Their JCW Java classes (e.g.,net.dot.jni.test.JavaDisposedObject) are generated by the standalone Java.Interop-Tests build and compiled intoMono.Android-Test-classes.jar. However, the trimmable JCW generator only processesJava.Lang.Objectsubclasses —JavaObjectsubclasses are outside the Android type map system.Possible fix
Include the standalone Java.Interop JCW output in the trimmable APK build, or have the trimmable
GenerateTrimmableTypeMaptask also processJavaObjectsubclasses when detected in the test assembly.Definition of done
TrimmableIgnorecategory — all 3 tests passSSLexclusion — all SSL tests passExcludedTestNames— Java.Interop-Tests fixtures run without SIGABRT