MSVC phase 5: Windows subprocess API in CLI test runner (issue #71) - #182
Merged
Conversation
Replace POSIX-only fork/pipe/poll/execv/waitpid in cli_test_runner.hpp with a _WIN32-guarded CreateProcess/CreatePipe/PeekNamedPipe/ReadFile implementation. Update io_tests.hpp to replace POSIX stat/symlink calls with Windows API equivalents guarded by _WIN32. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
dnovick
force-pushed
the
claude-msvc-phase5-test-runner
branch
from
May 20, 2026 19:39
78930fb to
7ea9e6d
Compare
Owner
Author
|
Blocking review finding after the rebase: in the new Windows runner loop, |
The previous expression compared against a stale sentinel that remained true once any data had been read, causing the drain loop to skip the Sleep(1)/WaitForSingleObject idle check and spin hot. Save the total byte count before both drain_pipe calls and compare against it. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
#ifdef _WIN32/#elseguard tocli_test_runner.hppso the POSIXfork/pipe/poll/execv/waitpidcode compiles only on POSIX; a new Windows path usesCreateProcessA,CreatePipe,PeekNamedPipe/ReadFile,WaitForSingleObject, andGetExitCodeProcessio_tests.hppto replace<sys/stat.h>/<unistd.h>includes and::stat()/::symlink()calls with#ifdef _WIN32guarded Windows API equivalents (GetNamedSecurityInfoAfor permission checks,CreateSymbolicLinkWfor symlink creation withGTEST_SKIPif insufficient privilege)strip_trailing_newlineparameter and all existing test logic are preserved unchangedTest plan
cmake --build cmake-build-debug --target safe_crypto_cli_test && ./cmake-build-debug/safe-crypto-cli-test/safe_crypto_cli_test— all tests passcli_test_runner.hppcompiles under MSVC without POSIX headers🤖 Generated with Claude Code