From c1eac2002fcf7c5ccbcb20fb1aa26dfbd8b57efc Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Mon, 16 Mar 2026 09:28:02 -0500 Subject: [PATCH] [tests] Add NativeAOTIgnore to InvokeVirtualFromConstructorTests These 3 tests fail on NativeAOT with DelegateMarshalling_MissingInteropData because PreserveRegistrations does not handle [JniAddNativeMethodRegistrationAttribute] delegate types. NativeAOT cannot generate the unmanaged-callable wrapper for CalledFromConstructorMarshalMethod at runtime. Tracking issue: https://github.com/dotnet/android/issues/10950 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Java.Interop/InvokeVirtualFromConstructorTests.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/Java.Interop-Tests/Java.Interop/InvokeVirtualFromConstructorTests.cs b/tests/Java.Interop-Tests/Java.Interop/InvokeVirtualFromConstructorTests.cs index 95d8e81d5..e22dd86e7 100644 --- a/tests/Java.Interop-Tests/Java.Interop/InvokeVirtualFromConstructorTests.cs +++ b/tests/Java.Interop-Tests/Java.Interop/InvokeVirtualFromConstructorTests.cs @@ -15,6 +15,7 @@ namespace Java.InteropTests { public class InvokeVirtualFromConstructorTests : JavaVMFixture { [Test] + [Category ("NativeAOTIgnore")] // https://github.com/dotnet/android/issues/10950 public void CreateManagedInstanceFirst_WithAllocObject () { CallVirtualFromConstructorDerived.Intermediate_FromActivationConstructor = null; @@ -61,6 +62,7 @@ static void Dispose (ref T peer) } [Test] + [Category ("NativeAOTIgnore")] // https://github.com/dotnet/android/issues/10950 public void CreateManagedInstanceFirst_WithNewObject () { CallVirtualFromConstructorDerived.Intermediate_FromActivationConstructor = null; @@ -111,6 +113,7 @@ public void CreateManagedInstanceFirst_WithNewObject () } [Test] + [Category ("NativeAOTIgnore")] // https://github.com/dotnet/android/issues/10950 public void CreateJavaInstanceFirst () { CallVirtualFromConstructorDerived.Intermediate_FromActivationConstructor = null;