Skip to content

Disable runtimeasyncapis in ReadyToRun tests - #133261

Open
jtschuster with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-profiler-runtimeasyncapis-test
Open

Disable runtimeasyncapis in ReadyToRun tests#133261
jtschuster with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-profiler-runtimeasyncapis-test

Conversation

CopilotAI commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

The runtimeasyncapis profiler test repeatedly fails across ReadyToRun configurations because the expected profiler success marker is missing.

  • Mark the test as R2RIncompatible.
  • Preserve execution in non-ReadyToRun configurations.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
16 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Co-authored-by: jtschuster <36744439+jtschuster@users.noreply.github.com>
CopilotAI changed the title [WIP] Fix test failure in profiler/runtimeasyncapisDisable runtimeasyncapis in ReadyToRun testsSep 4, 2026
CopilotAI requested a review from jtschusterSeptember 4, 2026 21:17
@jtschuster
jtschuster marked this pull request as ready for review September 4, 2026 22:26
CopilotAI lite review requested due to automatic review settings September 4, 2026 22:26
@jtschuster

Copy link
Copy Markdown
Member

/azp run runtime-coreclr crossgen2

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
13 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The change is a minimal, targeted test-project setting that uses established harness behavior to skip only R2R runs without affecting normal execution.

Pull request overview

Disables the runtimeasyncapis profiler test when running under ReadyToRun (Crossgen2) by marking the test project as R2R-incompatible, while keeping the test runnable in non-R2R configurations.

Changes:

  • Set <R2RIncompatible>true</R2RIncompatible> for src/tests/profiler/runtimeasyncapis/runtimeasyncapis.csproj so R2R runs skip execution via the existing CrossGen test harness logic.
  • Preserve existing non-R2R behavior (no change to normal execution path).
File summaries
FileDescription
src/tests/profiler/runtimeasyncapis/runtimeasyncapis.csprojMarks the test as R2R-incompatible so ReadyToRun configurations skip executing it, while leaving non-R2R runs intact.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag
See info in area-owners.md if you want to be subscribed.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/crossgen-contrib
See info in area-owners.md if you want to be subscribed.

@jtschuster
jtschuster enabled auto-merge (squash) September 4, 2026 22:35
<OutputType>exe</OutputType>
<Optimize>true</Optimize>
<Features>$(Features);runtime-async=on</Features>
<R2RIncompatible>true</R2RIncompatible>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this by-design or is this just disabling the test for now since it is failing frequently?

If this is by-design, there should be a comment with explanation.
If this is a workaround, there should be a link to ActiveIssue that tracks fixing the bug.

<OutputType>exe</OutputType>
<Optimize>true</Optimize>
<Features>$(Features);runtime-async=on</Features>
<R2RIncompatible>true</R2RIncompatible>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

#132810 has hits in runtime-coreclr outerloop and runtime-interpreter too. I do not think this is R2R-speciifc issue. Disabling the test for R2R will reduce the failure rate, but I expect the test is still going to fail frequently.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This test checks for needs JIT hooks to run in order to pass, so it makes sense this would fail in interpreter and other outerloop tests too. The disablement should be broader.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do you mean JITCompilationStarted/JITCompilationFinished callbacks?

The profiler test should be able to use JITCachedFunctionSearchStarted/JITCachedFunctionSearchFinished to intercept the code that is originating from R2R image. It would be preferable to fix the test to maintain coverage across different configurations rather than disabling the test.

@jtschuster

Copy link
Copy Markdown
Member

@copilot this test expects JIT hooks to run in order to pass. This should be disabled for all platforms that don't have fully JITed code at runtime. Modify the skip logic to skip platforms/form factors that aren't fully jitted and add a comment describing why this test is disabled in those cases.

Co-authored-by: jtschuster <36744439+jtschuster@users.noreply.github.com>
CopilotAI review requested due to automatic review settings September 5, 2026 03:12

CopilotAI commented Sep 5, 2026

Copy link
Copy Markdown
ContributorAuthor

@copilot this test expects JIT hooks to run in order to pass. This should be disabled for all platforms that don't have fully JITed code at runtime. Modify the skip logic to skip platforms/form factor...

Updated the skip logic to cover both interpreter and ReadyToRun execution modes, with an explanatory ActiveIssue reference for #132810. Normal execution remains unchanged in fully JITed runs. d072f69

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The PR metadata should be aligned with the fact that the change also skips interpreter runs, and the new explanatory comment should be clarified to avoid confusion.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 2
  • Review effort level: Lite

Comment on lines +7 to +11
<!--
This profiler test relies on JIT hooks firing, so it does not validate the same behavior when
the runtime is executed in interpreter or ReadyToRun modes. Skip those non-fully-JITed paths
until ActiveIssue https://github.com/dotnet/runtime/issues/132810 is fixed.
-->
Comment on lines +12 to +13
<InterpreterIncompatible>true</InterpreterIncompatible>
<R2RIncompatible>true</R2RIncompatible>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status
Status: No status

Development

Successfully merging this pull request may close these issues.

5 participants

@jtschuster@jkotas@tommcdon