Skip to content

Fix stack overflow tests#15461

Merged
nohwnd merged 7 commits intomicrosoft:mainfrom
nohwnd:fix-stack-overflow-tests
Mar 9, 2026
Merged

Fix stack overflow tests#15461
nohwnd merged 7 commits intomicrosoft:mainfrom
nohwnd:fix-stack-overflow-tests

Conversation

@nohwnd
Copy link
Copy Markdown
Member

@nohwnd nohwnd commented Mar 9, 2026

Description

Stack overflow tests were skipping themselves in release mode, but that is unnecessary since we are killing the process by allocating more space than the stack has, so it will always stack overflow, no matter if any tail call optimization is applied or not.

Before the change the tests were always failing in Debug mode, because the returned error from NET contains also stack trace, but we just check for exact string in a collection of strings. We run tests as Release in CI, which is why we don't see the failures in CI.

nohwnd and others added 5 commits March 9, 2026 09:19
dotnet.config is no longer suppported way of configuring mtp, replace it with global.json
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 9, 2026 14:02
@nohwnd
Copy link
Copy Markdown
Member Author

nohwnd commented Mar 9, 2026

Failure was observed locally here: #15450

And I was not sure why I don't also see it in CI build for the same change.

Copy link
Copy Markdown
Contributor

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

Removes release-mode skipping for stack overflow acceptance tests and makes the assertions less dependent on exact line endings / additional crash details.

Changes:

  • Removed Assert.Inconclusive guard that skipped stack overflow tests in Release builds.
  • Updated stack overflow error assertions to be pattern-based and to assert a single error entry.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
test/Microsoft.TestPlatform.Acceptance.IntegrationTests/TranslationLayerTests/RunTests.cs Stops skipping in Release and changes error assertion to pattern-match a single reported error.
test/Microsoft.TestPlatform.Acceptance.IntegrationTests/ExecutionTests.cs Stops skipping the console/diag-log stack overflow test in Release builds.

…ationLayerTests/RunTests.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 9, 2026 14:15
Copy link
Copy Markdown
Contributor

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

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

@nohwnd nohwnd merged commit 3ae44f0 into microsoft:main Mar 9, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants