1 minor finding · 2 suggestions
Earlier concerns neither republished nor resolved: 1 suggestion. See the Run archive for their assessments.
Findings
[minor] · Installed-layout test raises ValueError when install directories coincide
Source inspection shows tool_bitcoin.py raises ValueError when the configured bindir and libexecdir coincide; no tracked CI or packaging configuration selects this supported layout.
Location: test/functional/tool_bitcoin.py:150 (head).
Details and suggested fix
For example, with the default bindir and -DCMAKE_INSTALL_LIBEXECDIR=bin, os.path.relpath() produces '.', so libexecdir becomes Path('.'). The positive fixture places bitcoind beside the wrapper, where the wrapper can execute it. The subsequent libexecdir.with_name(...) raises ValueError because Path('.') has no filename, preventing the negative case from running. Skip the negative case when libexecdir == Path('.') to retain the positive check without this exception.
Optional improvements
[suggestion] · Current CI layouts do not distinguish configured lookup from hardcoded libexec
No tracked CI job configures a non-default bindir or libexecdir, so reverting to the old hardcoded lookup would still satisfy the new installed-layout assertions.
Location: test/functional/tool_bitcoin.py:102 (head).
Details and suggested fix
With the default configuration, the fixture uses a wrapper directory named bin and an internal directory at ../libexec. Source inspection shows that the base lookup finds the positive fixture and misses ../libexec_notfound, satisfying both checks without the fix. The shared CI option -DCMAKE_INSTALL_PREFIX does not change that relationship. Add -DCMAKE_INSTALL_LIBEXECDIR=lib to one existing functional-test CI configuration so the positive assertion distinguishes the configured lookup from the old hardcoded path.
[suggestion] · Installed-layout assertions hide stderr and accept unrelated failures
A failed positive invocation hides captured stderr, while the negative case accepts any nonzero exit instead of requiring an executable-lookup failure.
Location: test/functional/tool_bitcoin.py:147 (head).
Details and suggested fix
If the positive invocation exits with status 1, assert_equal(result.returncode, 0) reports only not(1 == 0), omitting the wrapper's or valgrind's captured diagnostic. The negative case likewise does not establish that executable lookup caused the failure, even though the wrapper reports that condition with execvp failed to execute on stderr. Include result.stdout and result.stderr in assertion failure messages, as test_args already does, and require b"execvp failed to execute" in the negative result's stderr.
Earlier concerns
Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.
- [suggestion]: Installed-layout subprocess ignores the timeout factor (earlier report)
Background
Ralph's summary of historical context for the behaviour affected by this change. The historical record reviewed here is incomplete.
Documented decisions
The wrapper was introduced partly to place multiprocess executables in libexec rather than expose additional commands in bin, reducing user confusion while making functionality discoverable through one command.
This explains why the wrapper needs an installed-layout lookup separate from its build-tree, adjacent-executable lookup. The pinned base recognizes a bin directory and searches sibling libexec; the head retains that structure while substituting the configured bindir basename and bindir-to-libexec relationship. The historical description establishes the purpose of the layout, but not the choice of basename recognition itself.
Executable selection deliberately distinguishes explicit-path invocation from PATH invocation. A reviewer objected that running a locally built wrapper without GUI support could unexpectedly launch a system-installed bitcoin-qt. The author consequently disabled PATH fallback when the wrapper was not invoked through PATH, while noting the competing appeal of a simple command alias that can find executables elsewhere.
Both pinned versions preserve this distinction through the original invocation string, even after resolving the wrapper's filesystem location. Thus wrapper-relative lookup serves a compatibility boundary between the selected installation or build and unrelated system executables; it is not merely a convenience for locating any executable with the right name.
Ralph's inferences
The existing heuristic is mechanically relocation-friendly: it recognizes the resolved wrapper directory by its final component rather than its complete installation path, then finds internal executables relative to that directory. Moving an installation tree while preserving those directory relationships therefore need not preserve the configured absolute prefix. Canonicalizing the wrapper path also makes a symlink invocation locate executables relative to the symlink target's installation rather than the directory containing the link.
The pinned base explicitly attempts symlink resolution before checking for bin and sibling libexec. The head preserves that sequence and replaces the hardcoded relationship with a configured relative path. As shown in the supplied CMake patch, when both install directories are prefix-relative, changing the common prefix with cmake --install --prefix leaves this relationship unchanged. This explains the compatibility advantage over embedding absolute configured executable paths, but the inspected historical sources do not prove that these were the original motivating requirements.