test: ipc: resolve symlinks in which capnp #33749

pull davidgumberg wants to merge 1 commits into bitcoin:master from davidgumberg:2025-10-30-ipc-functional-symlink-resolve changing 1 files +1 −1
  1. davidgumberg commented at 9:34 pm on October 30, 2025: contributor

    On Fedora, /bin/ and /usr/bin are symlinked, and on one of my boxes (although I could not reproduce this behavior in a docker container), /bin comes before /usr/bin in $PATH, so which capnp reports /bin/capnp, and capnp_dir is set to /include, and the test fails:

    0$ ./build/test/functional/interface_ipc.py
    12025-10-30T20:43:43.753812Z TestFramework (INFO): PRNG seed is: 8370468257027235753
    22025-10-30T20:43:43.754163Z TestFramework (INFO): Initializing test directory /tmp/bitcoin_func_test_b9kjzj2a
    3terminate called after throwing an instance of 'kj::ExceptionImpl'
    4  what():  mp/proxy.capnp:6: failed: Import failed: /capnp/c++.capnp
    5Aborted (core dumped)
    

    This changes the functional test to resolve any symlinks in the capnp binary path reported by which.

  2. test: resolve symlinks in which result for capnp 51093d6ae1
  3. DrahtBot added the label Tests on Oct 30, 2025
  4. DrahtBot commented at 9:34 pm on October 30, 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/33749.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK TheCharlatan, ryanofsky

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

  5. TheCharlatan approved
  6. TheCharlatan commented at 8:01 am on October 31, 2025: contributor
    utACK 51093d6ae1d415b8dfa47f11cb634a87bd97e8a9
  7. Sjors commented at 11:35 am on October 31, 2025: member
    I tested that it doesn’t interfere with my macOS setup (/opt/homebrew/bin/capnp).
  8. fanquake commented at 3:43 pm on October 31, 2025: member
  9. ryanofsky approved
  10. ryanofsky commented at 4:20 pm on October 31, 2025: contributor

    Code review ACK 51093d6ae1d415b8dfa47f11cb634a87bd97e8a9

    I was wondering if this should use .parent.resolve().parent instead of .resolve().parent.parent but I could imagine resolving first being better if someone has a bin directory with symlinks to installs in different prefixes (like nix or some virtual environments have). There probably isn’t a perfect answer but this seems like an improvement.

  11. fanquake merged this on Oct 31, 2025
  12. fanquake closed this on Oct 31, 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-11-02 18:12 UTC

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