-
Notifications
You must be signed in to change notification settings - Fork 5k
Add more protection against exited processed in CoreclrTestLib #115642
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
Conversation
There was a problem hiding this comment.
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 enhances the robustness of process retrieval in CoreclrTestLib by adding protection against exceptions when processes exit unexpectedly and updating the logging mechanism.
- Use TryGetProcessName and TryGetProcessId for logging process details
- Wrap GetChildren() calls in try-catch blocks to handle process exit exceptions
- Update logging output for active processes
Comments suppressed due to low confidence (2)
src/tests/Common/Coreclr.TestWrapper/CoreclrTestWrapperLib.cs:684
- TryGetProcessName is used with an output type of int for parentProcessName, which is inconsistent with typical process name types that are strings. Please verify if this is intended or update the type to string.
process.TryGetProcessName(out int parentProcessName);
src/tests/Common/Coreclr.TestWrapper/CoreclrTestWrapperLib.cs:864
- TryGetProcessName outputs a string for activeProcessName here, which is inconsistent with its usage earlier where an int was expected; please ensure both usages align with the correct process name type.
activeProcess.TryGetProcessName(out string activeProcessName);
Tagging subscribers to this area: @hoyosjs |
Continuation of #113937 Motivate by failure seen in #115602
|
No description provided.