test: sock: Enable socket pair tests on Windows #33506

pull davidgumberg wants to merge 1 commits into bitcoin:master from davidgumberg:2025-09-29-sock-tests-on-windows changing 1 files +64 −55
  1. davidgumberg commented at 11:40 pm on September 29, 2025: contributor

    Some class Sock tests were previously disabled because Windows lacks socketpair(2). This PR adds a CreateSocketPair() helper which creates a sender socket and receiver socket with a TCP connection, enabling these test cases for Windows.

    This change is generally an improvement, but is also broken out of a branch that does compact block prefilling up to the available bytes in the connection’s current TCP window (see delving post).

    Creating connected socket pairs is useful for added tests in that branch that validate querying the current TCP window state, and without this change those tests don’t run on Windows.

  2. DrahtBot added the label Tests on Sep 29, 2025
  3. DrahtBot commented at 11:40 pm on September 29, 2025: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/33506.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    Concept ACK w0xlt

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  4. bitcoin deleted a comment on Sep 30, 2025
  5. bitcoin deleted a comment on Sep 30, 2025
  6. bitcoin deleted a comment on Sep 30, 2025
  7. davidgumberg force-pushed on Sep 30, 2025
  8. davidgumberg commented at 7:34 pm on September 30, 2025: contributor
    Rebased to split into two commits, a mostly refactor commit https://github.com/bitcoin/bitcoin/pull/33506/commits/06a5140e96a75948cd2e490b414419a5485f2cfd and the commit that adds the new CreateSocketPair() for windows and enables Windows socket tests https://github.com/bitcoin/bitcoin/pull/33506/commits/7586205c4a5e94c7e2357d8928c68dfab95dc47a
  9. w0xlt commented at 11:49 pm on September 30, 2025: contributor
    Concept ACK
  10. davidgumberg force-pushed on Oct 1, 2025
  11. davidgumberg force-pushed on Oct 1, 2025
  12. test: sock: Enable socket pair tests on Windows
    Adds a helper struct `socket_pair` for constructing and connecting TCP
    sockets, this replaces socketpair() which is not available on Windows.
    Making the socket pair TCP sockets instead of Unix sockets, and
    separating socket creation from socket connection also enables more
    detailed tests to be added in the future.
    95775080da
  13. davidgumberg force-pushed on Oct 1, 2025

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-10-10 12:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me