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>
This commit is contained in:
parent
ba2f8c20dd
commit
090394ab6f
@ -319,6 +319,9 @@ void tst_QDecompressHelper::countAheadPartialRead()
|
|||||||
|
|
||||||
void tst_QDecompressHelper::decompressBigData_data()
|
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<QByteArray>("encoding");
|
||||||
QTest::addColumn<QString>("path");
|
QTest::addColumn<QString>("path");
|
||||||
QTest::addColumn<qint64>("size");
|
QTest::addColumn<qint64>("size");
|
||||||
@ -420,10 +423,12 @@ void tst_QDecompressHelper::bigZlib()
|
|||||||
{
|
{
|
||||||
#if QT_POINTER_SIZE < 8
|
#if QT_POINTER_SIZE < 8
|
||||||
QSKIP("This cannot be tested on 32-bit systems");
|
QSKIP("This cannot be tested on 32-bit systems");
|
||||||
|
#elif defined(QT_ASAN_ENABLED)
|
||||||
|
QSKIP("Test is too slow with asan enabled");
|
||||||
#else
|
#else
|
||||||
#ifndef QT_NO_EXCEPTIONS
|
# ifndef QT_NO_EXCEPTIONS
|
||||||
try {
|
try {
|
||||||
#endif
|
# endif
|
||||||
// ZLib uses unsigned integers as their size type internally which creates some special
|
// ZLib uses unsigned integers as their size type internally which creates some special
|
||||||
// cases in the internal code that should be tested!
|
// cases in the internal code that should be tested!
|
||||||
QFile file(":/5GiB.txt.inflate");
|
QFile file(":/5GiB.txt.inflate");
|
||||||
@ -443,11 +448,11 @@ void tst_QDecompressHelper::bigZlib()
|
|||||||
QByteArray output(expected + 42, Qt::Uninitialized);
|
QByteArray output(expected + 42, Qt::Uninitialized);
|
||||||
const qsizetype size = helper.read(output.data(), output.size());
|
const qsizetype size = helper.read(output.data(), output.size());
|
||||||
QCOMPARE(size, expected);
|
QCOMPARE(size, expected);
|
||||||
#ifndef QT_NO_EXCEPTIONS
|
# ifndef QT_NO_EXCEPTIONS
|
||||||
} catch (const std::bad_alloc &) {
|
} catch (const std::bad_alloc &) {
|
||||||
QSKIP("Encountered most likely OOM.");
|
QSKIP("Encountered most likely OOM.");
|
||||||
}
|
}
|
||||||
#endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user