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:
faumaray committed 2026-12-06 02:41:08 +03:00
1 parent ea285d1c65
commit c6ba2f42b5
6 files changed
+34 -2

No files matched your search

+8 -2
View File
@@ -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()
{