Skip to content

Commit 75a185e

Browse files
committed
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.
1 parent f9d8910 commit 75a185e

File tree

6 files changed

+10
-0
lines changed

6 files changed

+10
-0
lines changed

test/functional/interface_usdt_coinselection.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ def skip_test_if_missing_module(self):
117117
self.skip_if_no_python_bcc()
118118
self.skip_if_no_bpf_permissions()
119119
self.skip_if_no_wallet()
120+
self.skip_if_running_under_valgrind()
120121

121122
def get_tracepoints(self, expected_types):
122123
events = []

test/functional/interface_usdt_mempool.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ def skip_test_if_missing_module(self):
158158
self.skip_if_no_bitcoind_tracepoints()
159159
self.skip_if_no_python_bcc()
160160
self.skip_if_no_bpf_permissions()
161+
self.skip_if_running_under_valgrind()
161162

162163
def added_test(self):
163164
"""Add a transaction to the mempool and make sure the tracepoint returns

test/functional/interface_usdt_net.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ def skip_test_if_missing_module(self):
254254
self.skip_if_no_bitcoind_tracepoints()
255255
self.skip_if_no_python_bcc()
256256
self.skip_if_no_bpf_permissions()
257+
self.skip_if_running_under_valgrind()
257258

258259
def run_test(self):
259260
self.p2p_message_tracepoint_test()

test/functional/interface_usdt_utxocache.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ def skip_test_if_missing_module(self):
150150
self.skip_if_no_bitcoind_tracepoints()
151151
self.skip_if_no_python_bcc()
152152
self.skip_if_no_bpf_permissions()
153+
self.skip_if_running_under_valgrind()
153154

154155
def run_test(self):
155156
self.wallet = MiniWallet(self.nodes[0])

test/functional/interface_usdt_validation.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ def skip_test_if_missing_module(self):
6464
self.skip_if_no_bitcoind_tracepoints()
6565
self.skip_if_no_python_bcc()
6666
self.skip_if_no_bpf_permissions()
67+
self.skip_if_running_under_valgrind()
6768

6869
def run_test(self):
6970
# Tests the validation:block_connected tracepoint by generating blocks

test/functional/test_framework/test_framework.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,6 +1016,11 @@ def skip_if_no_external_signer(self):
10161016
if not self.is_external_signer_compiled():
10171017
raise SkipTest("external signer support has not been compiled.")
10181018

1019+
def skip_if_running_under_valgrind(self):
1020+
"""Skip the running test if Valgrind is being used."""
1021+
if self.options.valgrind:
1022+
raise SkipTest("This test is not compatible with Valgrind.")
1023+
10191024
def is_cli_compiled(self):
10201025
"""Checks whether bitcoin-cli was compiled."""
10211026
return self.config["components"].getboolean("ENABLE_CLI")

0 commit comments

Comments
 (0)