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:

    $ ./build/test/functional/interface_ipc.py
    2025-10-30T20:43:43.753812Z TestFramework (INFO): PRNG seed is: 8370468257027235753
    2025-10-30T20:43:43.754163Z TestFramework (INFO): Initializing test directory /tmp/bitcoin_func_test_b9kjzj2a
    terminate called after throwing an instance of 'kj::ExceptionImpl'
      what():  mp/proxy.capnp:6: failed: Import failed: /capnp/c++.capnp
    Aborted (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

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

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

    <!--021abf342d371248e50ceaed478a90ca-->

    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.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. sedited approved
  6. sedited 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

  13. sedited referenced this in commit c4d4877626 on Nov 5, 2025
  14. stickies-v referenced this in commit a785fe6759 on Nov 5, 2025
  15. stringintech referenced this in commit b82132c4d1 on Nov 6, 2025
  16. yuvicc referenced this in commit f620a2206b on Nov 16, 2025
  17. Kino1994 referenced this in commit 563694ae0a on Jun 28, 2026
  18. BigcoinBGC referenced this in commit a9e567faaf on Jun 30, 2026
  19. Kino1994 referenced this in commit a3fa70426a on Aug 19, 2026
  20. bitcoin locked this on Oct 31, 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