Commit 32f46f79 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Try to make this test succeed on Jenkins

Apparently, on Jenkins we cannot create all of these colorspaces,
so don't fail by dereferencing a null pointer:

********* Start testing of TestLcmsRGBP2020PQColorSpace *********
Config: Using QtTest library 5.12.4, Qt 5.12.4 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 9.1.1 20190611 [gcc-9-branch revision 272147])
PASS   : TestLcmsRGBP2020PQColorSpace::initTestCase()
AddressSanitizer:DEADLYSIGNAL
=================================================================
==6181==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000008 (pc 0x7f3f02031167 bp 0x7fff6f5c1290 sp 0x7fff6f5c1280 T0)
==6181==The signal is caused by a READ memory access.
==6181==Hint: address points to the zero page.
    #0 0x7f3f02031166 in KoColorSpace::id() const /home/jenkins/workspace/Extragear/krita/kf5-qt5 SUSEQt5.12/libs/pigment/KoColorSpace.cpp:106
    #1 0x41535a in testRoundTrip(KoColorSpace const*, KoColorSpace const*, SourceType) /home/jenkins/workspace/Extragear/krita/kf5-qt5 SUSEQt5.12/plugins/color/lcms2engine/tests/TestLcmsRGBP2020PQColorSpace.cpp:44
    #2 0x418726 in testRoundTrip(KoID const&, KoID const&, SourceType) /home/jenkins/workspace/Extragear/krita/kf5-qt5 SUSEQt5.12/plugins/color/lcms2engine/tests/TestLcmsRGBP2020PQColorSpace.cpp:118
    #3 0x4192b2 in TestLcmsRGBP2020PQColorSpace::test() /home/jenkins/workspace/Extragear/krita/kf5-qt5 SUSEQt5.12/plugins/color/lcms2engine/tests/TestLcmsRGBP2020PQColorSpace.cpp:143
    #4 0x40aa2c in TestLcmsRGBP2020PQColorSpace::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) /home/jenkins/workspace/Extragear/krita/kf5-qt5 SUSEQt5.12/build/plugins/color/lcms2engine/tests/TestLcmsRGBP2020PQColorSpace_autogen/EWIEGA46WW/moc_TestLcmsRGBP2020PQColorSpace.cpp:78
    #5 0x7f3efcc6889a in QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const (/usr/lib64/libQt5Core.so.5+0x29689a)
    #6 0x7f3f050a0962  (/usr/lib64/libQt5Test.so.5+0x19962)
    #7 0x7f3f050a1352  (/usr/lib64/libQt5Test.so.5+0x1a352)
    #8 0x7f3f050a1910  (/usr/lib64/libQt5Test.so.5+0x1a910)
    #9 0x7f3f050a1cda in QTest::qRun() (/usr/lib64/libQt5Test.so.5+0x1acda)
    #10 0x7f3f050a1edb in QTest::qExec(QObject*, int, char**) (/usr/lib64/libQt5Test.so.5+0x1aedb)
    #11 0x41b9d7 in main /home/jenkins/workspace/Extragear/krita/kf5-qt5 SUSEQt5.12/plugins/color/lcms2engine/tests/TestLcmsRGBP2020PQColorSpace.cpp:185
    #12 0x7f3efc4f2bca in __libc_start_main (/lib64/libc.so.6+0x26bca)
    #13 0x40a8f9 in _start (/home/jenkins/workspace/Extragear/krita/kf5-qt5 SUSEQt5.12/build/plugins/color/lcms2engine/tests/TestLcmsRGBP2020PQColorSpace+0x40a8f9)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/jenkins/workspace/Extragear/krita/kf5-qt5 SUSEQt5.12/libs/pigment/KoColorSpace.cpp:106 in KoColorSpace::id() const
==6181==ABORTING
parent c5986f60
......@@ -41,9 +41,10 @@ enum SourceType {
void testRoundTrip(const KoColorSpace *srcCS, const KoColorSpace *dstCS, SourceType sourceIsPQ)
{
qDebug() << "Testing:" << srcCS->id() << truncated(srcCS->profile()->name())
<< "->"
<< dstCS->id() << truncated(dstCS->profile()->name());
/*
* On some systems these colorspaces cannot be created, so don't die:
*/
if (!srcCS | !dstCS) return;
KoColor srcColor(srcCS);
KoColor dstColor(dstCS);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment