Windows: portability fixes for IPC, SystemAsync and MCP tests
- IPC: map poll() onto WSAPoll and link ws2_32 on Windows (the module's remaining POSIX socket surface still needs a dedicated port). - SystemAsync: define the non-ANSI SIGTERM/SIGKILL values the Windows process backend interprets itself. - MCP tests: stdio transport cases skip on Windows instead of being compiled out (the scanner cannot evaluate #if guards). - SystemAsync tests: mark the POSIX process-helper suite with @requires-posix. Refs #65
This commit is contained in:
1 parent
ea285d1c65
commit
c6ba2f42b5
6 files changed
+34
-2
No files matched your search
@@ -292,9 +292,11 @@ Void::Testing::Test mcp_line_framer_bounds_and_crlf()
|
||||
std::string{"first\nsecond"});
|
||||
}
|
||||
|
||||
#if !defined(_WIN32)
|
||||
Void::Testing::Test mcp_stdio_framing_dispatch_and_parse_error()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
Void::Testing::skip("POSIX pipe-based stdio transport");
|
||||
#else
|
||||
int input[2]{};
|
||||
int output[2]{};
|
||||
Void::Testing::require(::pipe(input) == 0);
|
||||
@@ -344,10 +346,14 @@ Void::Testing::Test mcp_stdio_framing_dispatch_and_parse_error()
|
||||
Void::Testing::require(error_response->error.has_value());
|
||||
Void::Testing::expect_eq(error_response->error->code,
|
||||
std::int32_t{-32700});
|
||||
#endif
|
||||
}
|
||||
|
||||
Void::Testing::Test mcp_stdio_cancellation_and_slow_reader()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
Void::Testing::skip("POSIX pipe-based stdio transport");
|
||||
#else
|
||||
// Cancellation while waiting on an empty, non-blocking input pipe.
|
||||
{
|
||||
int input[2]{};
|
||||
@@ -408,8 +414,8 @@ Void::Testing::Test mcp_stdio_cancellation_and_slow_reader()
|
||||
::close(output[0]);
|
||||
::close(output[1]);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
Void::Testing::Test mcp_legacy_session_fixtures()
|
||||
{
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// @requires-posix: drives the POSIX process helper and descriptor semantics.
|
||||
#include <Void/Async/Executor.hpp>
|
||||
#include <Void/Async/TaskScope.hpp>
|
||||
#include <Void/IO/Driver.hpp>
|
||||
|
||||
@@ -224,6 +224,9 @@ Void::Testing::Test systemasync_driver_shutdown_pending_pipe_read_retains_and_de
|
||||
|
||||
// Unblock file worker and kill child -> Driver shutdown completes and delivers once.
|
||||
sys.gate.open();
|
||||
#ifndef SIGKILL
|
||||
#define SIGKILL 9
|
||||
#endif
|
||||
(void)child.child().send_signal(SIGKILL);
|
||||
auto rep2 = drv.shutdown(
|
||||
Void::Async::OperationOptions{
|
||||
|
||||
Reference in new issue
Block a user