test: add is_ipc_compiled() and skip_if_no_ipc() functions
What changed, and why it matters
This commit only adds test infrastructure so that Bitcoin Core's functional test suite can detect whether the software was built with IPC (inter-process communication) support and skip tests that require it. It does not change any production code, network behavior, or wallet logic, and it introduces no security issue.
No security action needed; this is a benign test-only change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change exposes the existing ENABLE_IPC CMake build option into the functional test configuration (test/config.ini.in) and adds two helper methods to the Python test framework: is_ipc_compiled() and skip_if_no_ipc(). These mirror existing helpers for other optional components such as bitcoin-cli, external signer, and USDT tracepoints. No IPC implementation itself is modified.
Changed components
test/CMakeLists.txttest/config.ini.intest/functional/test_framework/test_framework.pyInspect captured patch +11 / −0
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 0b6520a0..e2075346 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -26,6 +26,7 @@ function(create_test_config)
set_configure_variable(WITH_ZMQ ENABLE_ZMQ)
set_configure_variable(ENABLE_EXTERNAL_SIGNER ENABLE_EXTERNAL_SIGNER)
set_configure_variable(WITH_USDT ENABLE_USDT_TRACEPOINTS)
+ set_configure_variable(ENABLE_IPC ENABLE_IPC)
configure_file(config.ini.in config.ini USE_SOURCE_PERMISSIONS @ONLY)
endfunction()
diff --git a/test/config.ini.in b/test/config.ini.in
index e66791eb..f695dec4 100644
--- a/test/config.ini.in
+++ b/test/config.ini.in
@@ -26,3 +26,4 @@ RPCAUTH=@abs_top_srcdir@/share/rpcauth/rpcauth.py
@ENABLE_ZMQ_TRUE@ENABLE_ZMQ=true
@ENABLE_EXTERNAL_SIGNER_TRUE@ENABLE_EXTERNAL_SIGNER=true
@ENABLE_USDT_TRACEPOINTS_TRUE@ENABLE_USDT_TRACEPOINTS=true
+@ENABLE_IPC_TRUE@ENABLE_IPC=true
diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py
index 639421d3..abe62bc2 100755
--- a/test/functional/test_framework/test_framework.py
+++ b/test/functional/test_framework/test_framework.py
@@ -1016,6 +1016,11 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
if not self.is_cli_compiled():
raise SkipTest("bitcoin-cli has not been compiled.")
+ def skip_if_no_ipc(self):
+ """Skip the running test if ipc is not compiled."""
+ if not self.is_ipc_compiled():
+ raise SkipTest("ipc has not been compiled.")
+
def skip_if_no_previous_releases(self):
"""Skip the running test if previous releases are not available."""
if not self.has_previous_releases():
@@ -1075,6 +1080,10 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
"""Checks whether the USDT tracepoints were compiled."""
return self.config["components"].getboolean("ENABLE_USDT_TRACEPOINTS")
+ def is_ipc_compiled(self):
+ """Checks whether ipc was compiled."""
+ return self.config["components"].getboolean("ENABLE_IPC")
+
def has_blockfile(self, node, filenum: str):
return (node.blocks_path/ f"blk{filenum}.dat").is_file()
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.