test: add skip_if_running_under_valgrind()

Enable it in the USDT tests. The context (from 0xB10C):

> every time the tracepoint is reached a SIGTRAP is fired.
> No matter the tracepoint contents, even with an empty one.
> Valgrind intercepts SIGTRAP and aborts.

See discussion in #32374.
This commit is contained in:
fanquake
2025-05-14 10:48:40 +01:00
parent f9d8910539
commit 75a185ea3d
6 changed files with 10 additions and 0 deletions

View File

@@ -1016,6 +1016,11 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
if not self.is_external_signer_compiled():
raise SkipTest("external signer support has not been compiled.")
def skip_if_running_under_valgrind(self):
"""Skip the running test if Valgrind is being used."""
if self.options.valgrind:
raise SkipTest("This test is not compatible with Valgrind.")
def is_cli_compiled(self):
"""Checks whether bitcoin-cli was compiled."""
return self.config["components"].getboolean("ENABLE_CLI")