Repository navigation
Use Windows subsystem for AccessControlTestApp to eliminate console handoff race - #7004
Draft
Kyaw Thant (kythant) wants to merge 1 commit into
Draft
Kyaw Thant (kythant) wants to merge 1 commit into
Kyaw Thant (kythant) wants to merge 1 commit into
Conversation
…andoff race AccessControlTestApp is a headless test helper that opens AccessControlTest_Event, signals it, and exits, yet it was built with /SUBSYSTEM:CONSOLE. On Windows 11 with Default Terminal delegation enabled, launching consecutive test methods triggers conhost.exe -> OpenConsole.exe -> WindowsTerminal.exe activation and teardown back-to-back. When a subsequent test launches while the previous WindowsTerminal.exe instance is shutting down, the handoff can fail with ERROR_BROKEN_PIPE during KernelBase!DllMain console initialization (STATUS_DLL_INIT_FAILED / 0xC0000142), hanging the helper process before main() is ever reached and timing out both win32_event.wait and MethodUninit. Changes: - Switch AccessControlTestApp to /SUBSYSTEM:WINDOWS with wWinMain and OutputDebugStringW so no console host or terminal handoff occurs. - Create AccessControlTest_Event before launching AccessControlTestApp in AccessControlTests::APITests to remove the startup polling race. - Open the child process handle with PROCESS_TERMINATE and terminate hung processes in test cleanup so package removal does not stall on failure. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
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
Fixes intermittent timeouts in Test::AccessControl::APITests (win32_event.wait(10000) and MethodUninit handle_wait failures) on Windows 11.
Root Cause
AccessControlTestApp.exe is a headless test helper that opens AccessControlTest_Event, signals it, and exits, yet it was built with /SUBSYSTEM:CONSOLE. On Windows 11 with Default Terminal delegation enabled, launching consecutive test methods (FlatAPITest, WinRTStringTest, WinRTBytesTest) triggers conhost.exe -> OpenConsole.exe -> WindowsTerminal.exe activation and teardown back-to-back: