Skip to content

Support windows in conformance runner - #29524

Open
anuraaga wants to merge 1 commit into
protocolbuffers:mainfrom
anuraaga:windows-conformance
Open

Support windows in conformance runner#29524
anuraaga wants to merge 1 commit into
protocolbuffers:mainfrom
anuraaga:windows-conformance

Conversation

@anuraaga

@anuraaga anuraaga commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

It would be good to be able to run conformance tests on Windows to have full coverage for them. Because we can convert pipes to standard file descriptors, the actual conformance logic needs no significant change and this just wires windows versions of starting / stopping processes. It is adapted from what subprocess.cc does, similar to the existing SpawnTestProgram also reproducing subprocess.cc start logic to have control for bidi streaming.

I realize the note in Portability says to get in touch about a strategy, but since this seems fairly uninvasive, hope this PR can be the mechanism for that.

I have verified e2e in https://github.com/bufbuild/protobuf-py/actions/runs/33296367633/job/99363658469?pr=80 - the build is intentionally red to make it obvious the conformance runner is executing, and finding failures on Windows (this branch doesn't have updates for v36 yet).

// 3. testee sends 4-byte length M (little endian)
// 4. testee sends M bytes representing a ConformanceResponse proto

#include <signal.h>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These headers weren't used, presumably predating extraction of fork_pipe_runner

size_t ofs = 0;
while (len > 0) {
std::future<ssize_t> future = std::async(
std::future<int> future = std::async(

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only edits to existing code is changing ssize_t to int which is cross-platform. It matches protoc's existing approach such as in zero_copy_stream_impl.cc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant