From 929466ba64c503cc1a7c6205f0a424350a9a201f Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Wed, 19 Feb 2025 09:40:44 +0100 Subject: [PATCH] tst_QCryptographicHashBigData: skip Sha1 tests on ASAN CI builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The SHA-1 test has started to time out in CI ASAN builds recently, so skip it there. Keep it on non-CI or non-ASAN builds, though. Amends c6e092a5f84b7fc72556897b50c7697152967925. Pick-to: 6.9 6.8 6.5 6.2 Change-Id: I8d653c2a8304cfae290befafda570d5c49dd4536 Reviewed-by: MÃ¥rten Nordheim --- .../tst_qcryptographichash_bigdata.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash_bigdata.cpp b/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash_bigdata.cpp index a07453a76f9..ff77d94b4ea 100644 --- a/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash_bigdata.cpp +++ b/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash_bigdata.cpp @@ -54,8 +54,17 @@ void tst_QCryptographicHashBigData::moreThan4GiBOfData_data() // these are reasonably fast (O(secs)) row(QCryptographicHash::Md4); row(QCryptographicHash::Md5); - row(QCryptographicHash::Sha1); - if (!qgetenv("QTEST_ENVIRONMENT").split(' ').contains("ci")) { + const bool runsOnCI = qgetenv("QTEST_ENVIRONMENT").split(' ').contains("ci"); + const bool runsUnderASan = + #ifdef QT_ASAN_ENABLED + true + #else + false + #endif + ; + if (!runsOnCI || !runsUnderASan) + row(QCryptographicHash::Sha1); + if (!runsOnCI) { // This is important but so slow (O(minute)) that, on CI, it tends to time out. // Retain it for manual runs, all the same, as most dev machines will be fast enough. row(QCryptographicHash::Sha512);