Thanks to visit codestin.com
Credit goes to github.com

Skip to content

NativeAOT on-device tests #10079

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 of 6 tasks
jonathanpeppers opened this issue Apr 25, 2025 · 0 comments
Open
1 of 6 tasks

NativeAOT on-device tests #10079

jonathanpeppers opened this issue Apr 25, 2025 · 0 comments
Assignees
Labels
Area: App Runtime Issues in `libmonodroid.so`. Area: Unit Tests Issues with repo unit tests.
Milestone

Comments

@jonathanpeppers
Copy link
Member

jonathanpeppers commented Apr 25, 2025

Android framework version

net10.0-android (Preview)

Affected platform version

.NET 10 Preview 4, NativeAOT runtime

Description

These are a list of tests I've disabled in:

  • Entire Java.Interop-Tests.dll assembly

  • GCBridge category, requires a "GC Bridge"

  • SSL category

  • NTLM category

  • AndroidClientHandler category:

04-25 12:21:24.792 29497 29572 I NUnit   : 7) Xamarin.Android.NetTests.AndroidClientHandlerIntegrationTests.HttpClientIntegrationTestBase.Send_Invalid (Mono.Android.NET-Tests)
04-25 12:21:24.792 29497 29572 I NUnit   : System.InvalidOperationException : Field '_nativeUnderlyingHandler' is missing from type 'Xamarin.Android.Net.AndroidClientHandler'.
04-25 12:21:24.792 29497 29572 I NUnit   : 
04-25 12:21:24.792 29497 29572 I NUnit   :    at Xamarin.Android.Net.AndroidClientHandler.GetUnderlyingHandler() + 0x2b4
04-25 12:21:24.792 29497 29572 I NUnit   :    at Xamarin.Android.Net.AndroidClientHandler..ctor() + 0x20
04-25 12:21:24.792 29497 29572 I NUnit   :    at Xamarin.Android.NetTests.HttpClientIntegrationTestBase.Send_Invalid() + 0x3c
04-25 12:21:24.792 29497 29572 I NUnit   :    at libMono.Android.NET-Tests!<BaseAddress>+0x1542e54
04-25 12:21:24.792 29497 29572 I NUnit   :    at System.Reflection.DynamicInvokeInfo.Invoke(Object, IntPtr, Object[], BinderBundle, Boolean) + 0x10c
  • Java.LangTests.ObjectTest.JnienvCreateInstance_RegistersMultipleInstances fails with:
Expected: same as <com.xamarin.android.runtimetests.CreateInstance_OverrideAbsListView_Adapter{90ba161 V.ED.VC.. ......I. 0,0-0,0}>
But was:  <com.xamarin.android.runtimetests.CreateInstance_OverrideAbsListView_Adapter{90ba161 V.ED.VC.. ......I. 0,0-0,0}>

Steps to Reproduce

Run:

.\dotnet-local.cmd build tests\Mono.Android-Tests\Mono.Android-Tests\Mono.Android.NET-Tests.csproj -t:Install,RunTestApks -bl -p:PublishAot=true -c Release
@jonathanpeppers jonathanpeppers added the Area: App Runtime Issues in `libmonodroid.so`. label Apr 25, 2025
@jonathanpeppers jonathanpeppers added this to the .NET 10 milestone Apr 25, 2025
@jonathanpeppers jonathanpeppers self-assigned this Apr 25, 2025
@dotnet-policy-service dotnet-policy-service bot added the needs-triage Issues that need to be assigned. label Apr 25, 2025
jonathanpeppers added a commit that referenced this issue Apr 25, 2025
Context: #10079

This runs Mono.Android-Tests with `-p:PublishAot=true`.

I temporarily disabled the following tests:

* The `Java.Interop-Tests.dll` test assembly
* `GCBridge` category, related to a missing "GC Bridge"
* `SSL` and `NTLM` categories related to some http tests
* Some individual tests

These categories will probably *never need to* work on NativeAOT:

* `Export`: use of `Mono.Android.Export.dll`
* `AndroidClientHandler`: legacy `HttpClientHandler` implementation
* `NativeTypeMap`: as the managed typemap is trimmer safe
* `AppContextTests.TestPrivateSwitches` may not be relevant for NativeAOT

I left a `TODO` comment for each ignored test, to investigate in the future.
@jpobst jpobst added Area: Unit Tests Issues with repo unit tests. and removed needs-triage Issues that need to be assigned. labels Apr 25, 2025
jonathanpeppers added a commit that referenced this issue Apr 28, 2025
Context: #10079

This runs Mono.Android-Tests with `-p:PublishAot=true`.

I temporarily disabled the following tests:

* The `Java.Interop-Tests.dll` test assembly
* `GCBridge` category, related to a missing "GC Bridge"
* `SSL` and `NTLM` categories related to some http tests
* Some individual tests

These categories will probably *never need to* work on NativeAOT:

* `Export`: use of `Mono.Android.Export.dll`
* `AndroidClientHandler`: legacy `HttpClientHandler` implementation
* `NativeTypeMap`: as the managed typemap is trimmer safe
* `AppContextTests.TestPrivateSwitches` may not be relevant for NativeAOT

I left a `TODO` comment for each ignored test, to investigate in the future.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: App Runtime Issues in `libmonodroid.so`. Area: Unit Tests Issues with repo unit tests.
Projects
None yet
Development

No branches or pull requests

2 participants