fuzz: push messages to one of m_nodes in connman target #36765

pull darosior wants to merge 1 commits into bitcoin:master from darosior:2611_connman_fuzz_fix changing 1 files +4 −1
  1. darosior commented at 7:58 PM on November 4, 2026: member

    The connman fuzz target never exercised m_nodes peers with queued messages, as their message queue is always empty. The most they ever had to send was handshake bytes in the case of v2 peers, so the socket handler only ever waited for SendEvent, and sent data, during a v2 handshake.

    Fix this by pushing messages to one of the m_nodes peers instead of random_node, which is never added to connman.

  2. fuzz: push a message to an actually connected node in connman target
    Pushing a message to random_node, which is never part of connman's
    m_nodes, meant that whatever data left in vSendMsg was never picked up,
    and that actual peers in m_nodes mostly never had anything to send (the
    queue of all nodes added with AddTestNode() was always empty, and the
    v2 peers only ever had their handshake bytes to send).
    
    Fix this by pushing messages to a peer chosen amongst connman's m_nodes
    instead, to increase meaningful coverage of connman's operations.
    ad51e87ecf
  3. fanquake commented at 8:05 PM on November 4, 2026: member
  4. darosior commented at 8:24 PM on November 4, 2026: member

    For reference, the PushMessage to random_node is an artifact of when the target was first introduced in 79ef8324d4c8, which as far as i understand it was attempting to maximize line coverage rather than meaningful coverage.

  5. marcofleon commented at 5:26 PM on November 5, 2026: contributor

    ACK ad51e87ecfd8f4b27e703b5c6116e6d75dcb9787

    net.cpp coverage on master

    net.cpp coverage this PR

    V2Transport::SetMessageToSend() is hit by this target now that messages are being pushed to connman's actual peers, some of which are V2.

  6. DrahtBot commented at 5:26 PM on November 5, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    External sites

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process.

    Type Reviewers
    ACK marcofleon

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #35888 <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/35888.svg"></sub> (net: reject oversized outbound messages by l0rinc)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  7. fanquake merged this on Nov 6, 2026
  8. fanquake closed this on Nov 6, 2026

  9. darosior deleted the branch on Nov 6, 2026

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: 2026-11-18 16:51 UTC

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