WIP: Add test coverage for `ConnectStream` #298

pull xyzconstant wants to merge 1 commits into bitcoin-core:master from xyzconstant:add-coverage-for-connect-stream changing 2 files +151 −2
  1. xyzconstant commented at 3:53 AM on June 24, 2026: contributor

    ref: #183

    Opening this draft to make it visible to more reviewers. Quoting my comment in the issue as well:

    I've added tests for four scenarios:

    1. Attempting to use an fd associated with a server that has already been disconnected results in a crash with: "IPC client method called after disconnect".
    2. Attempting to use an fd associated with a server that disconnects immediately after the first recv(), the outcome will either be crashing with "IPC client method called after disconnect" or "IPC client method call interrupted by disconnect." This behavior seems to depend on whether the recv() call successfully reads the entirety of what is likely Capnp’s bootstrap request or only a portion of it.
    3. Attempting to use an fd associated with a server that disconnects after a second recv(), the process crashes with "IPC client method call interrupted by disconnect."
    4. Attempting to use an fd associated with a server that indefinitely calls recv() in a while loop results in the test getting stuck at this line:

    https://github.com/bitcoin-core/libmultiprocess/blob/8412fcdc659e1379f9b4dea896c26bc1c5f3afa8/include/mp/proxy-types.h#L754

    It’s important to note that all of these cases call FooInterface::initThreadMap() to invoke clientInvoke(), as ConnectStream() on its own won't trigger any libmultiprocess request if there's not a construct() method available in the Init interface.

    I'm looking for more ideas for testing ConnectStream.

  2. WIP: Add test coverage for ConnectStream
    ref: #183
    
    This commit introduced new test cases to demonstrate how
    `ConnectStream` behaves under a few scenarios and improve coverage for it.
    bb60535f57
  3. DrahtBot commented at 3:54 AM on June 24, 2026: none

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

    LLM Linter (✨ experimental)

    Possible typos and grammar issues:

    • Cap N' Proto -> Cap'n Proto [the project name is misspelled]

    <sup>2026-06-24 03:54:02</sup>

  4. xyzconstant renamed this:
    WIP: Add test coverage for ConnectStream
    WIP: Add test coverage for `ConnectStream`
    on Jun 24, 2026

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/libmultiprocess. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-06-24 07:30 UTC

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