From 110459eba82588feb106e74d4dae5527294381ce Mon Sep 17 00:00:00 2001 From: Max Lv Date: Wed, 14 Oct 2026 22:53:06 +0800 Subject: [PATCH] Disable the zero-allocation checks with a system Mbed TLS They hold for the bundled Mbed TLS (MBEDTLS_BLOCK_CIPHER_C); a system one may allocate in GCM key setup, as the Debian package build shows. --- tests/CMakeLists.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index ae391c00..e0108457 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -307,3 +307,15 @@ if(SS_BUILD_EXECUTABLES AND NOT CMAKE_CROSSCOMPILING) LABELS "integration" TIMEOUT 90) endif() endif() + +# The zero-allocation checks hold for the bundled Mbed TLS, which is built +# with MBEDTLS_BLOCK_CIPHER_C; a system Mbed TLS may allocate during GCM key +# setup. Keep those tests visible but disabled in system-dependency builds. +if(NOT SS_DEPENDENCY_MODE STREQUAL "bundled") + get_property(ss_all_tests DIRECTORY PROPERTY TESTS) + foreach(ss_test IN LISTS ss_all_tests) + if(ss_test MATCHES "^alloc_steady_(crypto|programs)") + set_tests_properties(${ss_test} PROPERTIES DISABLED TRUE) + endif() + endforeach() +endif()