[Tests] Enable SubscribeToAppDomainUnhandledException on CoreCLR#11673
Open
jonathanpeppers wants to merge 1 commit into
Open
[Tests] Enable SubscribeToAppDomainUnhandledException on CoreCLR#11673jonathanpeppers wants to merge 1 commit into
jonathanpeppers wants to merge 1 commit into
Conversation
The test was previously skipped for both CoreCLR and NativeAOT, but the expected-sender switch already handled CoreCLR (null sender). Tighten the Assert.Ignore so the test runs on CoreCLR while still skipping on NativeAOT. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the MSBuild device integration test suite to exercise AppDomain.CurrentDomain.UnhandledException on CoreCLR by narrowing an Assert.Ignore guard that previously skipped the test for both CoreCLR and NativeAOT.
Changes:
- Restrict
SubscribeToAppDomainUnhandledExceptionto skip only onAndroidRuntime.NativeAOT. - Update the ignore message to reflect the new skip condition.
kotlarmilos
added a commit
that referenced
this pull request
Jun 17, 2026
The test body already routes CoreCLR to a null unhandled-exception sender, so only NativeAOT needs to stay skipped. Aligns with #11673. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
MSBuildDeviceIntegration.InstallAndRunTests.SubscribeToAppDomainUnhandledExceptionwas previously skipped viaAssert.Ignorefor bothCoreCLRandNativeAOT, with the reason "AppDomain.CurrentDomain.UnhandledException doesn''t work in CoreCLR or NativeAOT".However, the rest of the test body was already wired up for CoreCLR:
…and
IgnoreUnsupportedConfiguration(CoreCLR, release: true)already returnsfalse(i.e. CoreCLR + Release is supported).Change
Tighten the
Assert.Ignoreblock so it only skips onNativeAOT, letting the test exerciseAppDomain.CurrentDomain.UnhandledExceptionon CoreCLR. Withsender == null, the formatted logcat line becomes# Unhandled Exception: sender=; e.IsTerminating=True; e.ExceptionObject=System.Exception: CRASH, which the existingexpectedSenderswitch already produces.Test status on
main(build 14389667)