From 99ae91525692ec41edfeddb7f95886b759f81e1e Mon Sep 17 00:00:00 2001 From: Simon Rozsival Date: Fri, 3 Jul 2026 19:05:01 +0200 Subject: [PATCH] [tests] Re-enable AndroidMessageHandler ServerCertificateCustomValidationCallback tests These five `ServerCertificateCustomValidationCallback_*` device tests were `[Ignore]`d in #11801 because a boolean-returning SSL validation callback crashed the test process with a native SIGSEGV under the trimmable typemap (CoreCLR/NativeAOT) mid-handshake. The root cause was fixed in #11802: the trimmable typemap generator now matches each `n_*` callback `MemberRef` to its binding's real boolean/char signature, so the `[UnmanagedCallersOnly]` forwarder no longer "always throws" and the callback dispatches correctly. Verified locally on an arm64 emulator with `-p:_AndroidTypeMapImplementation=trimmable -p:UseMonoRuntime=false`: all five re-enabled tests (plus the never-ignored `NoServerCertificateCustomValidationCallback_*`) pass. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Xamarin.Android.Net/AndroidMessageHandlerTests.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tests/Mono.Android-Tests/Mono.Android-Tests/Xamarin.Android.Net/AndroidMessageHandlerTests.cs b/tests/Mono.Android-Tests/Mono.Android-Tests/Xamarin.Android.Net/AndroidMessageHandlerTests.cs index 315bb04bac6..99cde29dcd3 100644 --- a/tests/Mono.Android-Tests/Mono.Android-Tests/Xamarin.Android.Net/AndroidMessageHandlerTests.cs +++ b/tests/Mono.Android-Tests/Mono.Android-Tests/Xamarin.Android.Net/AndroidMessageHandlerTests.cs @@ -137,7 +137,6 @@ public async Task DoesNotDisposeContentStream() } [Test] - [Ignore ("Crashes the test process with a native SIGSEGV: https://github.com/dotnet/android/issues/8608")] public async Task ServerCertificateCustomValidationCallback_ApproveRequest () { bool callbackHasBeenCalled = false; @@ -164,7 +163,6 @@ public async Task ServerCertificateCustomValidationCallback_ApproveRequest () } [Test] - [Ignore ("Crashes the test process with a native SIGSEGV: https://github.com/dotnet/android/issues/8608")] public async Task ServerCertificateCustomValidationCallback_RejectRequest () { bool callbackHasBeenCalled = false; @@ -183,7 +181,6 @@ public async Task ServerCertificateCustomValidationCallback_RejectRequest () } [Test] - [Ignore ("Crashes the test process with a native SIGSEGV: https://github.com/dotnet/android/issues/8608")] public async Task ServerCertificateCustomValidationCallback_ApprovesRequestWithInvalidCertificate () { bool callbackHasBeenCalled = false; @@ -211,7 +208,6 @@ public async Task NoServerCertificateCustomValidationCallback_ThrowsWhenThereIsC } [Test] - [Ignore ("Crashes the test process with a native SIGSEGV: https://github.com/dotnet/android/issues/8608")] public async Task ServerCertificateCustomValidationCallback_IgnoresCertificateHostnameMismatch () { bool callbackHasBeenCalled = false; @@ -233,7 +229,6 @@ public async Task ServerCertificateCustomValidationCallback_IgnoresCertificateHo } [Test] - [Ignore ("Crashes the test process with a native SIGSEGV: https://github.com/dotnet/android/issues/8608")] public async Task ServerCertificateCustomValidationCallback_Redirects () { int callbackCounter = 0;