Skip to content

[Android] Add CoreCLR smoke tests for Android #116540

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
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

kotlarmilos
Copy link
Member

@kotlarmilos kotlarmilos commented Jun 11, 2025

Description

This PR adds CoreCLR smoke tests for Android. The libraries are selected to cover components that differ on Android compared to linux bionic and other platforms:

  • Networking
  • Diagnostics
  • InteropServices
  • Functional tests (static and dynamic linking)

This will be expanded with cryptography and additional networking tests once those tests are fixed.

Contributes to #114951

@kotlarmilos kotlarmilos added this to the 10.0.0 milestone Jun 11, 2025
@kotlarmilos kotlarmilos self-assigned this Jun 11, 2025
@Copilot Copilot AI review requested due to automatic review settings June 11, 2025 15:26
@kotlarmilos kotlarmilos marked this pull request as draft June 11, 2025 15:26
@kotlarmilos kotlarmilos added NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) NO-REVIEW Experimental/testing PR, do NOT review it labels Jun 11, 2025
Copy link
Contributor

Tagging subscribers to this area: @hoyosjs
See info in area-owners.md if you want to be subscribed.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds CoreCLR runtime test jobs for Android by updating the CI pipeline configurations.

  • Introduces a new CoreCLR runtime tests job for Android emulator in runtime-extra-platforms-androidemulator.yml.
  • Updates the Android devices pipeline in runtime-extra-platforms-android.yml to re-enable Mono tests and add a new CoreCLR tests job.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
eng/pipelines/extra-platforms/runtime-extra-platforms-androidemulator.yml Adds a new job block for CoreCLR runtime tests using the Android emulator.
eng/pipelines/extra-platforms/runtime-extra-platforms-android.yml Re-enables the Mono job and adds a new CoreCLR job for Android devices.

- template: /eng/pipelines/common/templates/runtimes/test-variables.yml

#
# Build the whole product using CoreCLR for Android and run runtime tests with Android devices
Copy link
Preview

Copilot AI Jun 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The CoreCLR and Mono job definitions share many similar parameters. Consider abstracting the common parts into a reusable template to reduce duplication and simplify maintenance.

Copilot uses AI. Check for mistakes.

@kotlarmilos
Copy link
Member Author

/azp run runtime-android,runtime-androidemulator

1 similar comment
@kotlarmilos
Copy link
Member Author

/azp run runtime-android,runtime-androidemulator

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@kotlarmilos
Copy link
Member Author

/azp run runtime-extra-platforms

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jkotas
Copy link
Member

jkotas commented Jun 12, 2025

I see "runtime (Build android-x64 Release AllSubsets_CoreCLR" timing out on number of other PRs. I suspect that the tests run by this PR killed a bunch of Android devices.

A few examples:

#116569 - runtime (Build android-x64 Release AllSubsets_CoreCLR) Started 5 hours ago
#116557 - runtime (Build android-x64 Release AllSubsets_CoreCLR) Started 7 hours ago

@kotlarmilos
Copy link
Member Author

It likely happened because tests for both Mono and CoreCLR were enabled. I’ll narrow the scope to src/tests/JIT or an even smaller subset. Do you have any suggestions for a subset that cover the basic functionality?

@jkotas
Copy link
Member

jkotas commented Jun 12, 2025

The JIT is exactly same between regular Linux and Android. The JIT has a ton of tests (vast majority of tests under src\tests are JIT tests) so they are expensive to run. I do not think it is useful to run the JIT tests on Android in the default PR set.

Do you have any suggestions for a subset that cover the basic functionality?

For broad cheap coverage of basic functionality, I would run a small subset of libraries tests (these subsets are triggered using RunSmokeTestsOnly):

For example, here is a subset we run for native aot: https://github.com/dotnet/runtime/blob/main/src/libraries/tests.proj#L581-L592

For Android, you want to create similar subset that's tailored towards what's different on Android. For example, the subset does not need to include System.Linq.Expressions or System.Collections since they are exactly same on Android, but it may want to include System.Security.Cryptography or some networking tests since those components are different on Android.

@steveisok
Copy link
Member

I see "runtime (Build android-x64 Release AllSubsets_CoreCLR" timing out on number of other PRs. I suspect that the tests run by this PR killed a bunch of Android devices.

A few examples:

#116569 - runtime (Build android-x64 Release AllSubsets_CoreCLR) Started 5 hours ago #116557 - runtime (Build android-x64 Release AllSubsets_CoreCLR) Started 7 hours ago

The x64 leg is for emulators and we "should" have plenty of capacity to handle the load. @kotlarmilos can you nag FR and see why we're seemingly so low on capacity?

@steveisok
Copy link
Member

The JIT is exactly same between regular Linux and Android. The JIT has a ton of tests (vast majority of tests under src\tests are JIT tests) so they are expensive to run. I do not think it is useful to run the JIT tests on Android in the default PR set.

I think these are only being added to the pipelines that run on the rolling build or need to be manually triggered. It is a fair question to wonder if a subset of key tests makes sense generally since we have adequate linux coverage.

@kotlarmilos
Copy link
Member Author

The x64 leg is for emulators and we "should" have plenty of capacity to handle the load. @kotlarmilos can you nag PR and see why we're seemingly so low on capacity?

I'll follow up on the capacity with the engineering team.

For Android, you want to create similar subset that's tailored towards what's different on Android. For example, the subset does not need to include System.Linq.Expressions or System.Collections since they are exactly same on Android, but it may want to include System.Security.Cryptography or some networking tests since those components are different on Android.

I agree. For android, we should already have coverage through the linux jobs, so I'll update the smoke tests to cover the platform-specific differences.

@kotlarmilos kotlarmilos changed the title [Android] Expand CoreCLR smoke tests for Android [Android] Add CoreCLR smoke tests for Android Jun 19, 2025
@kotlarmilos kotlarmilos removed NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) NO-REVIEW Experimental/testing PR, do NOT review it labels Jun 19, 2025
@kotlarmilos kotlarmilos requested a review from steveisok June 19, 2025 16:02
@kotlarmilos kotlarmilos marked this pull request as ready for review June 19, 2025 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants