Skip to content

Remove redundant s_calls counter in async regression test - #132781

Merged
jakobbotsch merged 1 commit into
dotnet:mainfrom
jakobbotsch:fix-132731
Aug 27, 2026
Merged

Remove redundant s_calls counter in async regression test#132781
jakobbotsch merged 1 commit into
dotnet:mainfrom
jakobbotsch:fix-132731

Conversation

@jakobbotsch

Copy link
Copy Markdown
Member

The counter was incremented after an await, so the fire-and-forget Print and the awaited Print could race on the non-atomic increment. It also did not add coverage: both tasks are already joined, and s_log records the handler behavior the test is actually about.

Fix #132731

The counter was incremented after an await, so the fire-and-forget Print and
the awaited Print could race on the non-atomic increment. It also did not add
coverage: both tasks are already joined, and s_log records the handler behavior
the test is actually about.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d2b6737d-550f-4473-a6a7-a687c8fc6819
Copilot AI lite review requested due to automatic review settings August 26, 2026 13:41
@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.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

Copilot AI 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.

Pull request overview

This PR simplifies the Runtime_132017 async regression test by removing the s_calls counter, which was updated after an await and could race, causing intermittent failures. The test continues to validate the intended behavior via the existing ordered s_log assertions and deterministic task joining.

Changes:

  • Removed the static s_calls field and its reset/increment logic.
  • Dropped the Assert.Equal(2, s_calls) assertion, relying on s_log’s ordered contents to validate the two Print executions.

@jakobbotsch

Copy link
Copy Markdown
Member Author

cc @dotnet/jit-contrib PTAL @EgorBo

@jakobbotsch
jakobbotsch requested a review from EgorBo August 27, 2026 07:49
@jakobbotsch
jakobbotsch merged commit f8d7c8c into dotnet:main Aug 27, 2026
87 checks passed
@jakobbotsch
jakobbotsch deleted the fix-132731 branch August 27, 2026 08:45
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test failure: async/regression/132017/132017.dll

3 participants