From a5c6c4f2c8b2c3e41133e0d5d357542ad8f3c772 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Sat, 8 Aug 2026 12:51:43 +0200 Subject: [PATCH] test: Append print_suppressions=0 to LSAN_OPTIONS, and suppress bitcoin-qt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The print_suppressions=0 is required to avoid a CI failure when the suppressions were used. E.g: ``` $ LSAN_OPTIONS="suppressions=$(pwd)/test/sanitizer_suppressions/lsan:print_suppressions=1" ./bld-cmake/test/functional/interface_gui.py 2026-08-08T10:53:45.864160Z TestFramework (INFO): PRNG seed is: 8358096631255493262 2026-08-08T10:53:45.914748Z TestFramework (INFO): Initializing test directory /tmp/bitcoin_func_test_5zx5343v 2026-08-08T10:53:47.029997Z TestFramework (INFO): Test that bitcoin-gui starts up and can be stopped via RPC 2026-08-08T10:53:47.431761Z TestFramework (ERROR): Unexpected exception: File "./test/functional/test_framework/test_node.py", line 534, in is_node_stopped raise AssertionError("Unexpected stderr {} != {}".format(stderr, expected_stderr)) AssertionError: Unexpected stderr ----------------------------------------------------- Suppressions used: count bytes template 2 181 bitcoin-qt ----------------------------------------------------- != ``` The general suppression of the qt executables is required to avoid CI failures for i386 builds. E.g: ``` test 2026-08-05T08:54:08.370427Z TestFramework (ERROR): Unexpected exception: Traceback (most recent call last): File "/ci_container_base/ci/scratch_ ₿🧪_/build-i686-pc-linux-gnu/test/functional/interface_gui.py", line 34, in run_test self.stop_node(0) ~~~~~~~~~~~~~~^^^ File "/ci_container_base/test/functional/test_framework/test_node.py", line 525, in is_node_stopped assert return_code in expected_ret_code, self._node_msg( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError: [node 0] Node returned unexpected exit code (1) vs ((0,)) when stopping node0 stderr ================================================================= ==73449==ERROR: LeakSanitizer: detected memory leaks Direct leak of 386 byte(s) in 17 object(s) allocated from: #0 0x5df28a2d in malloc (/ci_container_base/ci/scratch_ ₿🧪_/build-i686-pc-linux-gnu/bin/bitcoin-qt+0x1d0da2d) (BuildId: 496a5df531df278fe395724ae917f266331b3f81) #1 0xee03c1d1 () Indirect leak of 12 byte(s) in 1 object(s) allocated from: #0 0x5df28a2d in malloc (/ci_container_base/ci/scratch_ ₿🧪_/build-i686-pc-linux-gnu/bin/bitcoin-qt+0x1d0da2d) (BuildId: 496a5df531df278fe395724ae917f266331b3f81) #1 0xee03c1d1 () SUMMARY: AddressSanitizer: 398 byte(s) leaked in 18 allocation(s). ``` Github-Pull: #35937 Rebased-From: fad9ab714b5512f204f75a94d8cc4fa164dd4061 --- ci/test/03_test_script.sh | 2 +- test/sanitizer_suppressions/lsan | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ci/test/03_test_script.sh b/ci/test/03_test_script.sh index 8af2ceecf38..ea13ffafb88 100755 --- a/ci/test/03_test_script.sh +++ b/ci/test/03_test_script.sh @@ -12,7 +12,7 @@ cd "${BASE_ROOT_DIR}" export PATH="/path_with space:${PATH}" export ASAN_OPTIONS="detect_leaks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1" -export LSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/lsan" +export LSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/lsan:print_suppressions=0" export TSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/tsan:halt_on_error=1:second_deadlock_stack=1" export UBSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/ubsan:print_stacktrace=1:halt_on_error=1:report_error_type=1" diff --git a/test/sanitizer_suppressions/lsan b/test/sanitizer_suppressions/lsan index ddd61b607ea..8c2873c0be2 100644 --- a/test/sanitizer_suppressions/lsan +++ b/test/sanitizer_suppressions/lsan @@ -1,4 +1,3 @@ # Suppress warnings triggered in dependencies -leak:libQt6Widgets -leak:QDBusConnectionPrivate -leak:QLayoutPrivate +leak:test_bitcoin-qt +leak:bitcoin-qt