From 090394ab6fb9556c9ff1e5a4a5d6b93035a2f1d8 Mon Sep 17 00:00:00 2001 From: Fabian Kosmale Date: Mon, 28 Nov 2022 15:32:18 +0100 Subject: [PATCH] tst_qdecompresshelper: Disable big data tests under ASAN MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit They are already slow without ASAN, and risk running into timeouts with ASAN enabled. Change-Id: I427b990066d8ffa838ea90a318176fbcba400852 Reviewed-by: MÃ¥rten Nordheim --- .../qdecompresshelper/tst_qdecompresshelper.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tests/auto/network/access/qdecompresshelper/tst_qdecompresshelper.cpp b/tests/auto/network/access/qdecompresshelper/tst_qdecompresshelper.cpp index 43248a99dc..41f435a076 100644 --- a/tests/auto/network/access/qdecompresshelper/tst_qdecompresshelper.cpp +++ b/tests/auto/network/access/qdecompresshelper/tst_qdecompresshelper.cpp @@ -319,6 +319,9 @@ void tst_QDecompressHelper::countAheadPartialRead() void tst_QDecompressHelper::decompressBigData_data() { +#if defined(QT_ASAN_ENABLED) + QSKIP("Tests are too slow with asan enabled"); +#endif QTest::addColumn("encoding"); QTest::addColumn("path"); QTest::addColumn("size"); @@ -420,10 +423,12 @@ void tst_QDecompressHelper::bigZlib() { #if QT_POINTER_SIZE < 8 QSKIP("This cannot be tested on 32-bit systems"); +#elif defined(QT_ASAN_ENABLED) + QSKIP("Test is too slow with asan enabled"); #else -#ifndef QT_NO_EXCEPTIONS +# ifndef QT_NO_EXCEPTIONS try { -#endif +# endif // ZLib uses unsigned integers as their size type internally which creates some special // cases in the internal code that should be tested! QFile file(":/5GiB.txt.inflate"); @@ -443,11 +448,11 @@ void tst_QDecompressHelper::bigZlib() QByteArray output(expected + 42, Qt::Uninitialized); const qsizetype size = helper.read(output.data(), output.size()); QCOMPARE(size, expected); -#ifndef QT_NO_EXCEPTIONS +# ifndef QT_NO_EXCEPTIONS } catch (const std::bad_alloc &) { QSKIP("Encountered most likely OOM."); } -#endif +# endif #endif }