test: resolve symlinks in which result for capnp
What changed, and why it matters
This is a one-line change in a test file that resolves filesystem symlinks before looking up the Cap'n Proto include directory. It only affects the test suite's ability to find header files when the `capnp` binary is installed via a symbolic link. There is no security issue here.
No security action needed. This is a benign test-only improvement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
In test/functional/interface_ipc.py, the load_capnp_modules() method now calls .resolve() on the Path(capnp_bin) result before walking up to ../include. This normalizes symbolic links so the include path is computed from the real binary location rather than the symlink’s directory. The change is purely a test infrastructure fix for environment setup.
Changed components
test/functional/interface_ipc.pyInspect captured patch +1 / −1
diff --git a/test/functional/interface_ipc.py b/test/functional/interface_ipc.py
index abcc4d6b..63bac7ad 100755
--- a/test/functional/interface_ipc.py
+++ b/test/functional/interface_ipc.py
@@ -27,7 +27,7 @@ class IPCInterfaceTest(BitcoinTestFramework):
def load_capnp_modules(self):
if capnp_bin := shutil.which("capnp"):
# Add the system cap'nproto path so include/capnp/c++.capnp can be found.
- capnp_dir = Path(capnp_bin).parent.parent / "include"
+ capnp_dir = Path(capnp_bin).resolve().parent.parent / "include"
else:
# If there is no system cap'nproto, the pycapnp module should have its own "bundled"
# includes at this location. If pycapnp was installed with bundled capnp,
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.