Fix flaky TestWindowStyle: check only STARTF_USESHOWWINDOW bit, remove ShellExecute cases#125847
Merged
adamsitnik merged 2 commits intomainfrom Mar 21, 2026
Merged
Conversation
Contributor
|
Tagging subscribers to this area: @dotnet/area-system-diagnostics-process |
…TARTF_USESHOWWINDOW bit Co-authored-by: adamsitnik <6011991+adamsitnik@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix System.Diagnostics.Tests.ProcessStartInfoTests.TestWindowStyle failure in CI
Fix flaky TestWindowStyle: check only STARTF_USESHOWWINDOW bit, remove ShellExecute cases
Mar 20, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR stabilizes ProcessStartInfoTests.TestWindowStyle on Windows by narrowing the assertion to the STARTF_USESHOWWINDOW bit and removing UseShellExecute-driven cases that exercised OS ShellExecute behavior (and caused CI timeouts).
Changes:
- Update the test to assert only whether
STARTF_USESHOWWINDOWis set (dwFlags & 0x1) rather than comparing the entiredwFlagsvalue. - Remove the
useShellExecutedimension from the theory data (8 cases → 4 cases). - Remove Mono-specific ShellExecute skip logic and the now-unused
Microsoft.DotNet.XUnitExtensionsusing.
adamsitnik
approved these changes
Mar 20, 2026
danmoseley
reviewed
Mar 20, 2026
src/libraries/System.Diagnostics.Process/tests/ProcessStartInfoTests.Windows.cs
Show resolved
Hide resolved
danmoseley
reviewed
Mar 20, 2026
src/libraries/System.Diagnostics.Process/tests/ProcessStartInfoTests.Windows.cs
Show resolved
Hide resolved
danmoseley
reviewed
Mar 20, 2026
src/libraries/System.Diagnostics.Process/tests/ProcessStartInfoTests.Windows.cs
Show resolved
Hide resolved
danmoseley
approved these changes
Mar 20, 2026
This was referenced Mar 20, 2026
Open
Member
|
/ba-g wasm timeout is unrelated |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
ProcessStartInfoTests.TestWindowStylewas flaky in CI due to two issues:dwFlagsassertion — the test compared the fulldwFlagsvalue, but the OS can set additional bits beyondSTARTF_USESHOWWINDOW(0x1), causing spurious failures.useShellExecute: true) tested OS ShellExecute implementation behavior, which is not our responsibility to verify and was the primary source of timeouts.Changes
STARTF_USESHOWWINDOWbit (si.dwFlags & 0x1) instead of the exactdwFlagsvalueuseShellExecuteparameter and all[InlineData(..., true/false)]entries (8 → 4 test cases)SkipTestException) and unusedusing Microsoft.DotNet.XUnitExtensionsOriginal prompt
This section details on the original issue you should resolve
<issue_title>System.Diagnostics.Tests.ProcessStartInfoTests.TestWindowStyle failing in CI</issue_title>
<issue_description>## Build Information
Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1144025
Build error leg or test failing: System.Diagnostics.Tests.ProcessStartInfoTests.TestWindowStyle
Pull request: #119528
Error Message
Fill the error message using step by step known issues guidance.
{ "ErrorMessage": ["System.Diagnostics.Tests.ProcessStartInfoTests.TestWindowStyle", "Assert.True() Failure", "Expected: True"], "ErrorPattern": "", "BuildRetry": false, "ExcludeConsoleLog": false }Known issue validation
Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1144025
Error message validated:
[System.Diagnostics.Tests.ProcessStartInfoTests.TestWindowStyle Assert.True() Failure Expected: True]Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 9/10/2025 12:16:36 PM UTC
Report
⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.