Skip to content
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

Enable test timeout dump collection #44730

Merged
merged 17 commits into from
Nov 22, 2024
Merged

Conversation

marcpopMSFT
Copy link
Member

@marcpopMSFT marcpopMSFT commented Nov 7, 2024

I do not know the history on why we launch our tests with dotnet-exec. We may hae to change the arguments to match the above commands that we use on netfx (and simplify to just use one).

I'm starting with this just to see if it'll work.

Also open question is where will the dump end up.

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Infrastructure untriaged Request triage from a team member labels Nov 7, 2024
@marcpopMSFT
Copy link
Member Author

This doesn't appear to work on non-windows:
The test source file "/private/tmp/helix/working/AB8E0979/w/B5F809E7/e/trx" provided was not found.

And any test that requires msbuildforwardingapp doesn't appear to work correctly within the dotnet test execution.

Applying a fix for the path variable as it was adding quotes that weren't meant to be there.

@marcpopMSFT
Copy link
Member Author

@dsplaisted some of the other failures doing this are because we end up getting the host from the environment but that's now testhost.exe: https://github.com/dotnet/sdk/blob/main/src/Cli/Microsoft.DotNet.Cli.Utils/ForwardingAppImplementation.cs#L99

Is there a better way to find dotnet.exe that we already have in our test infrastructure?

@am11
Copy link
Member

am11 commented Nov 13, 2024

illink (and few other tools in runtime repo) finds it via DOTNET_HOST_PATH https://github.com/dotnet/runtime/blob/eee9fd32dbf29d4df263c940b394a8af47bd5cf5/src/tools/illink/src/ILLink.Tasks/LinkTask.cs#L235

@marcpopMSFT
Copy link
Member Author

/azp run dotnet-sdk-public-ci,sdk-source-build,sdk-unified-build

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@marcpopMSFT
Copy link
Member Author

will keep rerunning tests here to see if we can reproduce the arm64 macos test timeout while also looking for a solutino to the path problem. Using an env variable as suggested might work but I was looking for a standard option.

@marcpopMSFT
Copy link
Member Author

@dsplaisted let's chat on Monday about this. I got it working but in two places I had to change product code to fall back to env variables to find the dotnet host when not running. Not sure if we feel comfortable with that and would rather target 9.0.2xx since it's technically customer impacting now though I'm not sure how those scenarios would have worked before if they were returning the testhost.

Copy link
Member

@am11 am11 left a comment

Choose a reason for hiding this comment

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

@marcpopMSFT I think reliability-wise, this is the correct order. Note: DOTNET_HOST_PATH holds the absolute path to executable (unlike DOTNET_ROOT which points to directory)

For the Muxer logic itself, we probably want to stick to only using HOST_PATH when we detect the current process is not the muxer so as to reduce risk to the product.
Co-authored-by: Adeel Mujahid <[email protected]>
@marcpopMSFT
Copy link
Member Author

BTW, I checked the test results and locally and it looks like using dotnet test with xunit in helix will report the test work item as an additional failure. This was old behavior we used to have for the dotnet exec method of launching tests which we didn't like as it double counted failures and made the AzDO UI less user friendly.

I'm going to ping the test folks to see if there is an option for this.

src/Cli/Microsoft.DotNet.Cli.Utils/Muxer.cs Outdated Show resolved Hide resolved
Co-authored-by: Daniel Plaisted <[email protected]>
@marcpopMSFT marcpopMSFT enabled auto-merge (squash) November 21, 2024 01:23
@marcpopMSFT
Copy link
Member Author

unrelated failure in Microsoft.DotNet.Watcher.Tools.FileWatcherTests.DeleteSubfolder. Rerrunning all to see if that resolves it or else I'll ping the watch team next. Don't see the failure in other PRs that I've poked at.

@marcpopMSFT marcpopMSFT merged commit aef12ba into release/9.0.1xx Nov 22, 2024
31 checks passed
@marcpopMSFT marcpopMSFT deleted the marcpopMSFT-collectdump branch November 22, 2024 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Infrastructure untriaged Request triage from a team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants