Add managed ilasm round-trip testing support#127096
Conversation
Add a 'managedilasmroundtrip' test scenario that sets both RunningIlasmRoundTrip=1 and IlasmRoundTripUseManagedIlasm=1, and include it in the 'ilasm' testGroup so it runs alongside the existing native ilasm round-trip tests on all platforms. Also add 'usemanagedilasm' option to run.cmd for local use. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR adds a new managed-ilasm-backed mode for the existing ilasm round-trip test infrastructure, allowing round-trip validation to run against the managed ilasm packaged into Core_Root/managed-ilasm/ and integrating that mode into local CLI workflows and CI scenarios.
Changes:
- Added a
--use_managed_ilasm/usemanagedilasmswitch to enable managed-ilasm for ilasm round-trip runs via an environment variable. - Registered
IlasmRoundTripUseManagedIlasmin test environment generation and introduced amanagedilasmroundtripscenario. - Updated the ilasm round-trip script generation and CI scenario matrix to run the managed-ilasm variant alongside the native one.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/tests/run.py |
Adds CLI flag and sets IlasmRoundTripUseManagedIlasm=1 for managed-ilasm runs. |
src/tests/run.cmd |
Adds usemanagedilasm passthrough to run.py. |
src/tests/Common/testenvironment.proj |
Registers the env var and adds the managedilasmroundtrip scenario. |
src/tests/Common/CLRTest.Jit.targets |
Switches ilasm invocation path based on IlasmRoundTripUseManagedIlasm. |
eng/pipelines/common/templates/runtimes/run-test-job.yml |
Adds managedilasmroundtrip to the ilasm test group scenarios. |
|
Tagging subscribers to this area: @JulieLeeMSFT, @dotnet/jit-contrib |
|
There seems to be false-positives: perhaps it is not failing with non-zero exit code, or perhaps test infra is not listening to the error code? |
|
This should fix the issue by adding support for modern/command-line-api style switches: CLRTest.Jit.targets.txt The exit code is 1, but test/helix infra doesn't consider it as failure. It's a separate issue, but worth noticing. |
|
@am11 I have another PR I'm going to put out with a bunch of fixes that for some reason this didn't catch (with regression tests). I'll switch this into draft and we can come back to it later. |
|
@copilot please ensure that the generated round-trip script exits with a failure code (and fails the test) if the ilasm execution fails with an error. Also, please address the review feedback. |
…n.py managed ilasm handling, update testenvironment.proj comment Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/8f36d494-ef7f-4b5d-8570-0df158cf7299 Co-authored-by: jkoritzinsky <1571408+jkoritzinsky@users.noreply.github.com>
Done in commit 488df8b. Here's what was addressed: Round-trip script exits on failure (your request): All Review feedback:
|
Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/7d292874-c117-4b3f-9b48-538b8b09fa71 Co-authored-by: jkoritzinsky <1571408+jkoritzinsky@users.noreply.github.com>
Done in commit 1a576ca:
|
🤖 Copilot Code Review — PR #127096Note This review was AI-generated by GitHub Copilot using Claude Opus 4.6 (primary) with Claude Haiku 4.5 and GPT-5.3-codex (secondary models). Holistic AssessmentMotivation: The PR adds infrastructure to run ilasm round-trip tests with the new managed ilasm. This is justified scaffolding to validate the managed ilasm rewrite, with the CI scenario correctly disabled until dependencies are ready (#127297). Approach: Clean and minimal — an environment variable switches the ilasm path, a new test scenario wires it up via Summary: Detailed Findings
|
|
@copilot please disable the failing hugeexpr test for ilasm round trip testing (and mark as RequiresProcessIsolation if not already) |
Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/7ca5c3be-b5ef-450d-9069-858ed0eb602e Co-authored-by: jkoritzinsky <1571408+jkoritzinsky@users.noreply.github.com>
Head branch was pushed to by a user without write access
Done in commit 112c3d6. Added |
Note
This PR was authored with assistance from GitHub Copilot.
Summary
This PR adds infrastructure to run ilasm round-trip tests using the new managed ilasm (located in the
managed-ilasm/subfolder of Core_Root) alongside the existing native ilasm.This does not enable the leg in CI as we need #127297 to have any semblance of a passing run.
Changes
Runtime environment variable support
CLRTest.Jit.targets: The generated ilasm round-trip Python script checksIlasmRoundTripUseManagedIlasmenv var at runtime. When set to1, ilasm invocations usemanaged-ilasm/ilasminstead of the nativeilasmin Core_Root.testenvironment.proj: RegisteredIlasmRoundTripUseManagedIlasmin theDOTNETVariableslist, and added a newmanagedilasmroundtriptest scenario that sets bothRunningIlasmRoundTrip=1andIlasmRoundTripUseManagedIlasm=1.CLI support for local testing
run.py: Added--use_managed_ilasmargument that sets the env var and can be combined with--ilasmroundtrip.run.cmd: Addedusemanagedilasmoption that passes through torun.py.