Fix race condition in RemoteHyperVSocket #26057
Merged
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.
PR Summary
This pull request introduces support for a new V2 socket server mode in PowerShell's console host, along with improvements to test execution and workflow triggers. The main focus is on enabling the
-V2SocketServerMode
command-line parameter (Windows only), which requires a token and UTC timestamp for secure operation. Additionally, the build system and CI workflows are enhanced for better flexibility and debugging.V2 Socket Server Mode (Windows-only enhancements)
-V2SocketServerMode
command-line parameter, which enables a new socket server mode requiring both a token (-Token
) and a UTC timestamp (-UTCTimestamp
). The parser, validation logic, and server startup flow have been updated accordingly. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]HyperVSocketMediator
and related client/server classes to support token-based authentication and the new session ID socket for V2 mode. [1] [2] [3] [4]Command-line Parameter Parsing Improvements
ParameterBitmap
enum to include the new V2 socket server mode and ensured all bitmasks are properly sized for future expansion. [1] [2]Build and Test System Improvements
Start-PSxUnit
function to support test filtering and debug logging, allowing more granular and verbose test execution. [1] [2]CI Workflow Enhancements
*-feature
pattern, ensuring feature branches are properly built and tested. [1] [2] [3]PR Context
Already fixed in v7.5.3 and v7.4.12
PR Checklist
.h
,.cpp
,.cs
,.ps1
and.psm1
files have the correct copyright header