summaryrefslogtreecommitdiffstats
path: root/tests/auto/network
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2022-11-28 15:32:18 +0100
committerMårten Nordheim <marten.nordheim@qt.io>2022-11-30 03:50:37 +0000
commit090394ab6fb9556c9ff1e5a4a5d6b93035a2f1d8 (patch)
tree526db2ec2f928193609283325354445b1044a5d9 /tests/auto/network
parentba2f8c20ddc72636738b74128c8bb3194a641b5a (diff)
tst_qdecompresshelper: Disable big data tests under ASAN
They are already slow without ASAN, and risk running into timeouts with ASAN enabled. Change-Id: I427b990066d8ffa838ea90a318176fbcba400852 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'tests/auto/network')
-rw-r--r--tests/auto/network/access/qdecompresshelper/tst_qdecompresshelper.cpp13
1 files 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<QByteArray>("encoding");
QTest::addColumn<QString>("path");
QTest::addColumn<qint64>("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
}