From 0735ce152c7f2f326e61921fb32d51534da93169 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Meusel?= Date: Thu, 31 Oct 2024 13:30:34 +0100 Subject: [PATCH] Use a matrix for nightly valgrind (Take 9) --- .github/workflows/nightly.yml | 2 +- src/scripts/ci_build.py | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index f71f9a039cd..c291fbc69f4 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -167,7 +167,7 @@ jobs: include: - compiler: clang - cxxflags: "" # default compilation flags + cxxflags: "" # default compilation flags target: "valgrind-full" # memory bug detection - compiler: clang cxxflags: "-Os" diff --git a/src/scripts/ci_build.py b/src/scripts/ci_build.py index bcc7d27153a..27a6307cf52 100755 --- a/src/scripts/ci_build.py +++ b/src/scripts/ci_build.py @@ -259,10 +259,15 @@ def sanitize_kv(some_string): test_prefix = ['valgrind', '-v', - '--error-exitcode=9', - '--leak-check=full', - '--show-reachable=yes', - '--track-origins=yes'] + '--error-exitcode=9'] + + # For finding memory bugs, we're enabling more features that add runtime + # overhead which we don't need for the secret-dependent execution checks + # that 'valgrind-ct' and 'valgrind-ct-full' are aiming for. + if target not in ['valgrind-ct', 'valgrind-ct-full']: + test_prefix += ['--leak-check=full', + '--show-reachable=yes', + '--track-origins=yes'] build_config = os.path.join(build_dir, 'build', 'build_config.json') pretest_cmd = ['python3', os.path.join(root_dir, 'src', 'ct_selftest', 'ct_selftest.py'), "--build-config-path=%s" % build_config, os.path.join(build_dir, 'botan_ct_selftest')]