test: less ambiguous error if bitcoind is missing #32921

pull Sjors wants to merge 1 commits into bitcoin:master from Sjors:2025/07/test-missing-binary changing 1 files +17 −12
  1. Sjors commented at 8:37 AM on July 8, 2025: member

    Before this change, when a functional test is run without building the source, the error message suggested that previous release binaries were missing.

    When no previous release version is set, make the error message more specifically about bitcoind.

    To test, try this before and after:

    git clean -dfx
    cmake -B build
    build/test/functional/mining_basic.py
    cmake --build build
    build/test/functional/mining_basic.py
    build/test/functional/wallet_backwards_compatibility.py
    test/get_previous_releases.py
    build/test/functional/wallet_backwards_compatibility.py
    
  2. DrahtBot added the label Tests on Jul 8, 2025
  3. DrahtBot commented at 8:37 AM on July 8, 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/32921.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK janb84, w0xlt, achow101

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

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

    LLM Linter (✨ experimental)

    Possible typos and grammar issues:

    • “Previous releases binaries” -> “Previous release binaries” [fix plural noun for clarity]

    <sup>drahtbot_id_4_m</sup>

  4. Sjors force-pushed on Jul 8, 2025
  5. DrahtBot added the label CI failed on Jul 8, 2025
  6. DrahtBot commented at 8:46 AM on July 8, 2025: contributor

    <!--85328a0da195eb286784d51f73fa0af9-->

    🚧 At least one of the CI tasks failed. <sub>Task lint: https://github.com/bitcoin/bitcoin/runs/45539391667</sub> <sub>LLM reason (✨ experimental): Lint errors caused the CI failure.</sub>

    <details><summary>Hints</summary>

    Try to run the tests locally, according to the documentation. However, a CI failure may still happen due to a number of reasons, for example:

    • Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.

    • A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test.

    • An intermittent issue.

    Leave a comment here, if you need help tracking down a confusing failure.

    </details>

  7. in test/functional/test_framework/test_framework.py:559 in 93c703d2ce outdated
     566 | +                                     for argv in (binaries.node_argv(), binaries.rpc_argv())):
     567 | +
     568 | +                if shutil.which(bin_path) is None:
     569 | +                    self.log.error(f"Binary not found: {bin_path}")
     570 | +                    if v is None:
     571 | +                        raise AssertionError("bitcoind is missing, did you compile?")
    


    maflcko commented at 9:39 AM on July 8, 2025:
                            raise AssertionError("At least one binary is missing, did you compile?")
    

    there are more binaries that could be missing, than just bitcoind?


    Sjors commented at 11:20 AM on July 8, 2025:

    Done

  8. DrahtBot removed the label CI failed on Jul 8, 2025
  9. test: less ambiguous error if bitcoind is missing
    Before this change, when a functional test is run without building
    the source, the error message suggested that previous release binaries
    were missing.
    
    When no previous release version is set, make the error message more
    specifically about bitcoind.
    83bb414557
  10. Sjors force-pushed on Jul 8, 2025
  11. Sjors commented at 11:20 AM on July 8, 2025: member

    If you're testing this on Apple Silicon, you may also need #32922.

  12. janb84 commented at 6:26 PM on July 8, 2025: contributor

    ACK 83bb41455715a9e05320ba791987204031626c10

    PR changes error when no binaries are found that are necessary for the functional test(s). Old error gave the impression that previous binaries needed to be downloaded, new error (only) correctly state that the binaries are missing and gives an hint that one forgot to compile. This more correct and I agree with the change.

    • code review ✅
    • tested on Apple Silicon without #32922 (nix shell)

    <details>

    Master:

    $ build/test/functional/mining_basic.py
    2025-07-08T18:13:40.455522Z TestFramework (INFO): PRNG seed is: 8663704818878322585
    2025-07-08T18:13:40.455980Z TestFramework (INFO): Initializing test directory /private/tmp/nix-shell-56840-0/bitcoin_func_test_ntyajsde
    2025-07-08T18:13:40.456786Z TestFramework (ERROR): Binary not found: /Users/jan/Projects/bitcoin/build/bin/bitcoind
    2025-07-08T18:13:40.456840Z TestFramework (ERROR): Binary not found: /Users/jan/Projects/bitcoin/build/bin/bitcoin-cli
    2025-07-08T18:13:40.456885Z TestFramework (ERROR): Binary not found: /Users/jan/Projects/bitcoin/build/bin/bitcoind
    2025-07-08T18:13:40.456916Z TestFramework (ERROR): Binary not found: /Users/jan/Projects/bitcoin/build/bin/bitcoin-cli
    2025-07-08T18:13:40.456955Z TestFramework (ERROR): Binary not found: /Users/jan/Projects/bitcoin/build/bin/bitcoind
    2025-07-08T18:13:40.456990Z TestFramework (ERROR): Binary not found: /Users/jan/Projects/bitcoin/build/bin/bitcoin-cli
    2025-07-08T18:13:40.457022Z TestFramework (ERROR): Assertion failed
    Traceback (most recent call last):
      File "/Users/jan/Projects/bitcoin/test/functional/test_framework/test_framework.py", line 191, in main
        self.setup()
      File "/Users/jan/Projects/bitcoin/test/functional/test_framework/test_framework.py", line 361, in setup
        self.setup_network()
      File "/Users/jan/Projects/bitcoin/test/functional/test_framework/test_framework.py", line 452, in setup_network
        self.setup_nodes()
      File "/Users/jan/Projects/bitcoin/test/functional/test_framework/test_framework.py", line 473, in setup_nodes
        self.add_nodes(self.num_nodes, self.extra_args)
      File "/Users/jan/Projects/bitcoin/test/functional/test_framework/test_framework.py", line 558, in add_nodes
        raise AssertionError("At least one release binary is missing. "
    AssertionError: At least one release binary is missing. Previous releases binaries can be downloaded via `test/get_previous_releases.py`.
    2025-07-08T18:13:40.512675Z TestFramework (INFO): Not stopping nodes as test failed. The dangling processes will be cleaned up later.
    2025-07-08T18:13:40.512797Z TestFramework (WARNING): Not cleaning up dir /private/tmp/nix-shell-56840-0/bitcoin_func_test_ntyajsde
    2025-07-08T18:13:40.512841Z TestFramework (ERROR): Test failed. Test logging available at /private/tmp/nix-shell-56840-0/bitcoin_func_test_ntyajsde/test_framework.log
    2025-07-08T18:13:40.512911Z TestFramework (ERROR):
    2025-07-08T18:13:40.513025Z TestFramework (ERROR): Hint: Call /Users/jan/Projects/bitcoin/test/functional/combine_logs.py '/private/tmp/nix-shell-56840-0/bitcoin_func_test_ntyajsde' to consolidate all logs
    2025-07-08T18:13:40.513062Z TestFramework (ERROR):
    2025-07-08T18:13:40.513093Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
    2025-07-08T18:13:40.513139Z TestFramework (ERROR): https://github.com/bitcoin/bitcoin/issues
    2025-07-08T18:13:40.513171Z TestFramework (ERROR):
    

    This PR (error)

    $ build/test/functional/mining_basic.py
    2025-07-08T18:08:39.622104Z TestFramework (INFO): PRNG seed is: 7569875464969361775
    2025-07-08T18:08:39.622584Z TestFramework (INFO): Initializing test directory /private/tmp/nix-shell-56840-0/bitcoin_func_test_6xo20r7u
    2025-07-08T18:08:39.623408Z TestFramework (ERROR): Binary not found: /Users/jan/Projects/bitcoin/build/bin/bitcoind
    2025-07-08T18:08:39.623454Z TestFramework (ERROR): Assertion failed
    Traceback (most recent call last):
      File "/Users/jan/Projects/bitcoin/test/functional/test_framework/test_framework.py", line 191, in main
        self.setup()
      File "/Users/jan/Projects/bitcoin/test/functional/test_framework/test_framework.py", line 361, in setup
        self.setup_network()
      File "/Users/jan/Projects/bitcoin/test/functional/test_framework/test_framework.py", line 452, in setup_network
        self.setup_nodes()
      File "/Users/jan/Projects/bitcoin/test/functional/test_framework/test_framework.py", line 473, in setup_nodes
        self.add_nodes(self.num_nodes, self.extra_args)
      File "/Users/jan/Projects/bitcoin/test/functional/test_framework/test_framework.py", line 559, in add_nodes
        raise AssertionError("At least one binary is missing, did you compile?")
    AssertionError: At least one binary is missing, did you compile?
    2025-07-08T18:08:39.679097Z TestFramework (INFO): Not stopping nodes as test failed. The dangling processes will be cleaned up later.
    2025-07-08T18:08:39.679159Z TestFramework (WARNING): Not cleaning up dir /private/tmp/nix-shell-56840-0/bitcoin_func_test_6xo20r7u
    2025-07-08T18:08:39.679197Z TestFramework (ERROR): Test failed. Test logging available at /private/tmp/nix-shell-56840-0/bitcoin_func_test_6xo20r7u/test_framework.log
    2025-07-08T18:08:39.679258Z TestFramework (ERROR):
    2025-07-08T18:08:39.679362Z TestFramework (ERROR): Hint: Call /Users/jan/Projects/bitcoin/test/functional/combine_logs.py '/private/tmp/nix-shell-56840-0/bitcoin_func_test_6xo20r7u' to consolidate all logs
    2025-07-08T18:08:39.679396Z TestFramework (ERROR):
    2025-07-08T18:08:39.679427Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
    2025-07-08T18:08:39.679470Z TestFramework (ERROR): https://github.com/bitcoin/bitcoin/issues
    2025-07-08T18:08:39.679500Z TestFramework (ERROR):
    

    This PR (after compile)

    $ build/test/functional/mining_basic.py
    2025-07-08T18:10:51.573960Z TestFramework (INFO): PRNG seed is: 3664027831089907027
    2025-07-08T18:10:51.574415Z TestFramework (INFO): Initializing test directory /private/tmp/nix-shell-56840-0/bitcoin_func_test_hmt823xs
    2025-07-08T18:10:52.358905Z TestFramework (INFO): Create some old blocks
    [...]
    2025-07-08T18:11:10.301402Z TestFramework (INFO): Sanity check generated blocks have their coinbase timelocked to their height.
    2025-07-08T18:11:10.357987Z TestFramework (INFO): Stopping nodes
    2025-07-08T18:11:10.524961Z TestFramework (INFO): Cleaning up /private/tmp/nix-shell-56840-0/bitcoin_func_test_hmt823xs on exit
    2025-07-08T18:11:10.525039Z TestFramework (INFO): Tests successful
    

    </details>

  13. achow101 commented at 9:45 PM on July 10, 2025: member

    ACK 83bb41455715a9e05320ba791987204031626c10

  14. achow101 merged this on Jul 10, 2025
  15. achow101 closed this on Jul 10, 2025

  16. stringintech referenced this in commit f19e7819e9 on Jul 19, 2025
  17. alexanderwiederin referenced this in commit 9997c3d993 on Jul 25, 2025
  18. alexanderwiederin referenced this in commit 8d6ebb9c4e on Jul 28, 2025
  19. alexanderwiederin referenced this in commit 533a4585b5 on Jul 28, 2025
  20. yuvicc referenced this in commit 22f55cf11d on Aug 26, 2025
  21. bug-castercv502 referenced this in commit d4bd8a1259 on Sep 28, 2025
  22. stickies-v referenced this in commit a19c56cd7c on Nov 4, 2025
  23. Kino1994 referenced this in commit deba5eeb05 on Jun 28, 2026
  24. BigcoinBGC referenced this in commit 6a4098a98f on Jun 30, 2026
  25. bitcoin locked this on Jul 30, 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-08-11 09:51 UTC

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