diff options
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/corelib/animation/qsequentialanimationgroup/BLACKLIST | 1 | ||||
-rw-r--r-- | tests/auto/corelib/io/largefile/largefile.pro | 2 | ||||
-rw-r--r-- | tests/auto/corelib/io/largefile/tst_largefile.cpp | 6 | ||||
-rw-r--r-- | tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp | 156 | ||||
-rw-r--r-- | tests/auto/gui/qopengl/qopengl.pro | 2 | ||||
-rw-r--r-- | tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp | 9 | ||||
-rw-r--r-- | tests/auto/network/access/http2/tst_http2.cpp | 9 | ||||
-rw-r--r-- | tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp | 84 | ||||
-rw-r--r-- | tests/auto/network/ssl/qsslsocket/BLACKLIST | 2 | ||||
-rw-r--r-- | tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp | 18 | ||||
-rw-r--r-- | tests/auto/opengl/qgl/tst_qgl.cpp | 4 | ||||
-rw-r--r-- | tests/auto/testlib/selftests/selftests.pri | 3 | ||||
-rw-r--r-- | tests/auto/testlib/selftests/tst_selftests.cpp | 13 | ||||
-rw-r--r-- | tests/auto/widgets/kernel/qwidget/BLACKLIST | 1 |
14 files changed, 228 insertions, 82 deletions
diff --git a/tests/auto/corelib/animation/qsequentialanimationgroup/BLACKLIST b/tests/auto/corelib/animation/qsequentialanimationgroup/BLACKLIST index e11e4ae6fb..36b777de34 100644 --- a/tests/auto/corelib/animation/qsequentialanimationgroup/BLACKLIST +++ b/tests/auto/corelib/animation/qsequentialanimationgroup/BLACKLIST @@ -2,3 +2,4 @@ windows [finishWithUncontrolledAnimation] windows +macos-10.12 diff --git a/tests/auto/corelib/io/largefile/largefile.pro b/tests/auto/corelib/io/largefile/largefile.pro index 6c1bb8d7ea..e96d1398ca 100644 --- a/tests/auto/corelib/io/largefile/largefile.pro +++ b/tests/auto/corelib/io/largefile/largefile.pro @@ -2,3 +2,5 @@ CONFIG += testcase TARGET = tst_largefile QT = core testlib SOURCES = tst_largefile.cpp +INCLUDEPATH += ../../../../shared/ +HEADERS += ../../../../shared/emulationdetector.h diff --git a/tests/auto/corelib/io/largefile/tst_largefile.cpp b/tests/auto/corelib/io/largefile/tst_largefile.cpp index a19a5ce58d..4e7877253f 100644 --- a/tests/auto/corelib/io/largefile/tst_largefile.cpp +++ b/tests/auto/corelib/io/largefile/tst_largefile.cpp @@ -47,6 +47,8 @@ # endif #endif // Q_OS_WIN +#include "emulationdetector.h" + class tst_LargeFile : public QObject { @@ -68,6 +70,10 @@ public: #else maxSizeBits = 24; // 16 MiB #endif + + // QEMU only supports < 4GB files + if (EmulationDetector::isRunningArmOnX86()) + maxSizeBits = qMin(maxSizeBits, 28); } private: diff --git a/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp b/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp index f8bcb14ab3..a935258fb8 100644 --- a/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp +++ b/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp @@ -70,6 +70,8 @@ private slots: void palette(); void modalWindow(); void quitOnLastWindowClosed(); + void quitOnLastWindowClosedMulti(); + void dontQuitOnLastWindowClosed(); void genericPluginsAndWindowSystemEvents(); void layoutDirection(); void globalShareContext(); @@ -791,107 +793,111 @@ void tst_QGuiApplication::modalWindow() void tst_QGuiApplication::quitOnLastWindowClosed() { - { - int argc = 0; - QGuiApplication app(argc, 0); - const QRect screenGeometry = QGuiApplication::primaryScreen()->availableVirtualGeometry(); + int argc = 0; + QGuiApplication app(argc, 0); + const QRect screenGeometry = QGuiApplication::primaryScreen()->availableVirtualGeometry(); - QTimer timer; - timer.setInterval(100); + QTimer timer; + timer.setInterval(100); - QSignalSpy spy(&app, SIGNAL(aboutToQuit())); - QSignalSpy spy2(&timer, SIGNAL(timeout())); + QSignalSpy spyAboutToQuit(&app, &QCoreApplication::aboutToQuit); + QSignalSpy spyTimeout(&timer, &QTimer::timeout); - QWindow mainWindow; - mainWindow.setTitle(QStringLiteral("quitOnLastWindowClosedMainWindow")); - mainWindow.resize(windowSize, windowSize); - mainWindow.setFramePosition(QPoint(screenGeometry.left() + spacing, screenGeometry.top() + spacing)); + QWindow mainWindow; + mainWindow.setTitle(QStringLiteral("quitOnLastWindowClosedMainWindow")); + mainWindow.resize(windowSize, windowSize); + mainWindow.setFramePosition(QPoint(screenGeometry.left() + spacing, screenGeometry.top() + spacing)); - QWindow dialog; - dialog.setTransientParent(&mainWindow); - dialog.setTitle(QStringLiteral("quitOnLastWindowClosedDialog")); - dialog.resize(windowSize, windowSize); - dialog.setFramePosition(QPoint(screenGeometry.left() + 2 * spacing + windowSize, screenGeometry.top() + spacing)); + QWindow dialog; + dialog.setTransientParent(&mainWindow); + dialog.setTitle(QStringLiteral("quitOnLastWindowClosedDialog")); + dialog.resize(windowSize, windowSize); + dialog.setFramePosition(QPoint(screenGeometry.left() + 2 * spacing + windowSize, screenGeometry.top() + spacing)); - QVERIFY(app.quitOnLastWindowClosed()); + QVERIFY(app.quitOnLastWindowClosed()); - mainWindow.show(); - dialog.show(); - QVERIFY(QTest::qWaitForWindowExposed(&dialog)); + mainWindow.show(); + dialog.show(); + QVERIFY(QTest::qWaitForWindowExposed(&dialog)); - timer.start(); - QTimer::singleShot(1000, &mainWindow, SLOT(close())); // This should quit the application - QTimer::singleShot(2000, &app, SLOT(quit())); // This makes sure we quit even if it didn't + timer.start(); + QTimer::singleShot(1000, &mainWindow, &QWindow::close); // This should quit the application + QTimer::singleShot(2000, &app, QCoreApplication::quit); // This makes sure we quit even if it didn't - app.exec(); + app.exec(); - QCOMPARE(spy.count(), 1); - QVERIFY(spy2.count() < 15); // Should be around 10 if closing caused the quit - } - { - int argc = 0; - QGuiApplication app(argc, 0); - const QRect screenGeometry = QGuiApplication::primaryScreen()->availableVirtualGeometry(); + QCOMPARE(spyAboutToQuit.count(), 1); + // Should be around 10 if closing caused the quit + QVERIFY2(spyTimeout.count() < 15, QByteArray::number(spyTimeout.count()).constData()); +} - QTimer timer; - timer.setInterval(100); +void tst_QGuiApplication::quitOnLastWindowClosedMulti() +{ + int argc = 0; + QGuiApplication app(argc, 0); + const QRect screenGeometry = QGuiApplication::primaryScreen()->availableVirtualGeometry(); - QSignalSpy spy(&app, SIGNAL(aboutToQuit())); - QSignalSpy spy2(&timer, SIGNAL(timeout())); + QTimer timer; + timer.setInterval(100); - QWindow mainWindow; - mainWindow.setTitle(QStringLiteral("quitOnLastWindowClosedMainWindow")); - mainWindow.resize(windowSize, windowSize); - mainWindow.setFramePosition(QPoint(screenGeometry.left() + spacing, screenGeometry.top() + spacing)); + QSignalSpy spyAboutToQuit(&app, &QCoreApplication::aboutToQuit); + QSignalSpy spyTimeout(&timer, &QTimer::timeout); - QWindow dialog; - dialog.setTitle(QStringLiteral("quitOnLastWindowClosedDialog")); - dialog.resize(windowSize, windowSize); - dialog.setFramePosition(QPoint(screenGeometry.left() + 2 * spacing + windowSize, screenGeometry.top() + spacing)); + QWindow mainWindow; + mainWindow.setTitle(QStringLiteral("quitOnLastWindowClosedMultiMainWindow")); + mainWindow.resize(windowSize, windowSize); + mainWindow.setFramePosition(QPoint(screenGeometry.left() + spacing, screenGeometry.top() + spacing)); - QVERIFY(!dialog.transientParent()); - QVERIFY(app.quitOnLastWindowClosed()); + QWindow dialog; + dialog.setTitle(QStringLiteral("quitOnLastWindowClosedMultiDialog")); + dialog.resize(windowSize, windowSize); + dialog.setFramePosition(QPoint(screenGeometry.left() + 2 * spacing + windowSize, screenGeometry.top() + spacing)); - mainWindow.show(); - dialog.show(); - QVERIFY(QTest::qWaitForWindowExposed(&dialog)); + QVERIFY(!dialog.transientParent()); + QVERIFY(app.quitOnLastWindowClosed()); - timer.start(); - QTimer::singleShot(1000, &mainWindow, SLOT(close())); // This should not quit the application - QTimer::singleShot(2000, &app, SLOT(quit())); + mainWindow.show(); + dialog.show(); + QVERIFY(QTest::qWaitForWindowExposed(&dialog)); - app.exec(); + timer.start(); + QTimer::singleShot(1000, &mainWindow, &QWindow::close); // This should not quit the application + QTimer::singleShot(2000, &app, &QCoreApplication::quit); - QCOMPARE(spy.count(), 1); - QVERIFY(spy2.count() > 15); // Should be around 20 if closing did not cause the quit - } - { - int argc = 0; - QGuiApplication app(argc, 0); - app.setQuitOnLastWindowClosed(false); + app.exec(); + + QCOMPARE(spyAboutToQuit.count(), 1); + // Should be around 20 if closing did not cause the quit + QVERIFY2(spyTimeout.count() > 15, QByteArray::number(spyTimeout.count()).constData()); +} + +void tst_QGuiApplication::dontQuitOnLastWindowClosed() +{ + int argc = 0; + QGuiApplication app(argc, 0); + app.setQuitOnLastWindowClosed(false); - QTimer timer; - timer.setInterval(2000); - timer.setSingleShot(true); - QObject::connect(&timer, SIGNAL(timeout()), &app, SLOT(quit())); + QTimer timer; + timer.setInterval(2000); + timer.setSingleShot(true); + QObject::connect(&timer, &QTimer::timeout, &app, &QCoreApplication::quit); - QSignalSpy spy(&app, SIGNAL(lastWindowClosed())); - QSignalSpy spy2(&timer, SIGNAL(timeout())); + QSignalSpy spyLastWindowClosed(&app, &QGuiApplication::lastWindowClosed); + QSignalSpy spyTimeout(&timer, &QTimer::timeout); - QPointer<QWindow> mainWindow = new QWindow; + QScopedPointer<QWindow> mainWindow(new QWindow); - mainWindow->show(); + mainWindow->show(); - QTimer::singleShot(1000, mainWindow, SLOT(close())); // This should not quit the application - timer.start(); + QTimer::singleShot(1000, mainWindow.data(), &QWindow::close); // This should not quit the application + timer.start(); - app.exec(); + app.exec(); - QCOMPARE(spy2.count(), 1); // quit timer fired - QCOMPARE(spy.count(), 1); // lastWindowClosed emitted + app.setQuitOnLastWindowClosed(true); // restore underlying static to default value - app.setQuitOnLastWindowClosed(true); // restore underlying static to default value - } + QCOMPARE(spyTimeout.count(), 1); // quit timer fired + QCOMPARE(spyLastWindowClosed.count(), 1); // lastWindowClosed emitted } static Qt::ScreenOrientation testOrientationToSend = Qt::PrimaryOrientation; diff --git a/tests/auto/gui/qopengl/qopengl.pro b/tests/auto/gui/qopengl/qopengl.pro index aaef6e5125..d744d37280 100644 --- a/tests/auto/gui/qopengl/qopengl.pro +++ b/tests/auto/gui/qopengl/qopengl.pro @@ -8,4 +8,4 @@ QT += gui-private core-private testlib SOURCES += tst_qopengl.cpp -linux:qtConfig(xcb-glx):qtConfig(xcb-xlib):!qtConfig(egl): DEFINES += USE_GLX +linux:qtConfig(xcb):qtConfig(xcb-glx):qtConfig(xcb-xlib):!qtConfig(egl): DEFINES += USE_GLX diff --git a/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp b/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp index e8244a0e5d..e52cb63384 100644 --- a/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp +++ b/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp @@ -244,8 +244,13 @@ void tst_QFontDatabase::addAppFont() QVERIFY(!newFamilies.isEmpty()); QVERIFY(newFamilies.count() >= oldFamilies.count()); - for (int i = 0; i < addedFamilies.count(); ++i) - QVERIFY(newFamilies.contains(addedFamilies.at(i))); + for (int i = 0; i < addedFamilies.count(); ++i) { + QString family = addedFamilies.at(i); + QVERIFY(newFamilies.contains(family)); + QFont qfont(family); + QFontInfo fi(qfont); + QCOMPARE(fi.family(), family); + } QVERIFY(QFontDatabase::removeApplicationFont(id)); QCOMPARE(fontDbChangedSpy.count(), 2); diff --git a/tests/auto/network/access/http2/tst_http2.cpp b/tests/auto/network/access/http2/tst_http2.cpp index e7609b3243..d7a57f5e26 100644 --- a/tests/auto/network/access/http2/tst_http2.cpp +++ b/tests/auto/network/access/http2/tst_http2.cpp @@ -590,8 +590,15 @@ void tst_Http2::replyFinished() { QVERIFY(nRequests); - if (const auto reply = qobject_cast<QNetworkReply *>(sender())) + if (const auto reply = qobject_cast<QNetworkReply *>(sender())) { QCOMPARE(reply->error(), QNetworkReply::NoError); + const QVariant http2Used(reply->attribute(QNetworkRequest::HTTP2WasUsedAttribute)); + QVERIFY(http2Used.isValid()); + QVERIFY(http2Used.toBool()); + const QVariant spdyUsed(reply->attribute(QNetworkRequest::SpdyWasUsedAttribute)); + QVERIFY(spdyUsed.isValid()); + QVERIFY(!spdyUsed.toBool()); + } --nRequests; if (!nRequests && serverGotSettingsACK) diff --git a/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp b/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp index 1133a80820..9a604e5d04 100644 --- a/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp +++ b/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp @@ -52,6 +52,13 @@ #include <QtNetwork/qnetworksession.h> #endif +#if defined(Q_OS_LINUX) +#define SHOULD_CHECK_SYSCALL_SUPPORT +#include <netinet/in.h> +#include <sys/socket.h> +#include <errno.h> +#endif + Q_DECLARE_METATYPE(QHostAddress) QT_FORWARD_DECLARE_CLASS(QUdpSocket) @@ -115,6 +122,12 @@ protected slots: void async_readDatagramSlot(); private: + bool shouldSkipIpv6TestsForBrokenSetsockopt(); +#ifdef SHOULD_CHECK_SYSCALL_SUPPORT + bool ipv6SetsockoptionMissing(int level, int optname); +#endif + + bool m_skipUnsupportedIPv6Tests; QList<QHostAddress> allAddresses; #ifndef QT_NO_BEARERMANAGEMENT QNetworkConfigurationManager *netConfMan; @@ -125,6 +138,43 @@ private: QUdpSocket *m_asyncReceiver; }; +#ifdef SHOULD_CHECK_SYSCALL_SUPPORT +bool tst_QUdpSocket::ipv6SetsockoptionMissing(int level, int optname) +{ + int testSocket; + + testSocket = socket(PF_INET6, SOCK_DGRAM, 0); + + // If we can't test here, assume it's not missing + if (testSocket == -1) + return false; + + bool result = false; + if (setsockopt(testSocket, level, optname, nullptr, 0) == -1) + if (errno == ENOPROTOOPT) + result = true; + + close(testSocket); + return result; +} +#endif //SHOULD_CHECK_SYSCALL_SUPPORT + +bool tst_QUdpSocket::shouldSkipIpv6TestsForBrokenSetsockopt() +{ +#ifdef SHOULD_CHECK_SYSCALL_SUPPORT + // Following parameters for setsockopt are not supported by all QEMU versions: + if (ipv6SetsockoptionMissing(SOL_IPV6, IPV6_JOIN_GROUP) + || ipv6SetsockoptionMissing(SOL_IPV6, IPV6_MULTICAST_HOPS) + || ipv6SetsockoptionMissing(SOL_IPV6, IPV6_MULTICAST_IF) + || ipv6SetsockoptionMissing(SOL_IPV6, IPV6_MULTICAST_LOOP) + || ipv6SetsockoptionMissing(SOL_IPV6, IPV6_RECVHOPLIMIT)) { + return true; + } +#endif //SHOULD_CHECK_SYSCALL_SUPPORT + + return false; +} + static QHostAddress makeNonAny(const QHostAddress &address, QHostAddress::SpecialAddress preferForAny = QHostAddress::LocalHost) { if (address == QHostAddress::Any) @@ -176,6 +226,7 @@ void tst_QUdpSocket::initTestCase() if (!QtNetworkSettings::verifyTestNetworkSettings()) QSKIP("No network test server available"); allAddresses = QNetworkInterface::allAddresses(); + m_skipUnsupportedIPv6Tests = shouldSkipIpv6TestsForBrokenSetsockopt(); } void tst_QUdpSocket::init() @@ -1140,6 +1191,13 @@ void tst_QUdpSocket::multicastTtlOption() expected = 0; } + // Some syscalls needed for ipv6 udp multicasting are not functional + if (m_skipUnsupportedIPv6Tests) { + if (bindAddress.protocol() == QAbstractSocket::IPv6Protocol) { + QSKIP("Syscalls needed for ipv6 udp multicasting missing functionality"); + } + } + QUdpSocket udpSocket; #ifdef FORCE_SESSION udpSocket.setProperty("_q_networksession", QVariant::fromValue(networkSession)); @@ -1186,6 +1244,13 @@ void tst_QUdpSocket::multicastLoopbackOption() expected = 0; } + // Some syscalls needed for ipv6 udp multicasting are not functional + if (m_skipUnsupportedIPv6Tests) { + if (bindAddress.protocol() == QAbstractSocket::IPv6Protocol) { + QSKIP("Syscalls needed for ipv6 udp multicasting missing functionality"); + } + } + QUdpSocket udpSocket; #ifdef FORCE_SESSION udpSocket.setProperty("_q_networksession", QVariant::fromValue(networkSession)); @@ -1240,6 +1305,13 @@ void tst_QUdpSocket::multicastLeaveAfterClose() if (!QtNetworkSettings::hasIPv6() && groupAddress.protocol() == QAbstractSocket::IPv6Protocol) QSKIP("system doesn't support ipv6!"); + // Some syscalls needed for ipv6 udp multicasting are not functional + if (m_skipUnsupportedIPv6Tests) { + if (groupAddress.protocol() == QAbstractSocket::IPv6Protocol) { + QSKIP("Syscalls needed for ipv6 udp multicasting missing functionality"); + } + } + QUdpSocket udpSocket; #ifdef FORCE_SESSION udpSocket.setProperty("_q_networksession", QVariant::fromValue(networkSession)); @@ -1280,6 +1352,11 @@ void tst_QUdpSocket::setMulticastInterface() QFETCH(QNetworkInterface, iface); QFETCH(QHostAddress, address); + // Some syscalls needed for udp multicasting are not functional + if (m_skipUnsupportedIPv6Tests) { + QSKIP("Syscalls needed for udp multicasting missing functionality"); + } + QUdpSocket udpSocket; // bind initializes the socket bool bound = udpSocket.bind((address.protocol() == QAbstractSocket::IPv6Protocol @@ -1339,6 +1416,13 @@ void tst_QUdpSocket::multicast() return; } + // Some syscalls needed for ipv6 udp multicasting are not functional + if (m_skipUnsupportedIPv6Tests) { + if (groupAddress.protocol() == QAbstractSocket::IPv6Protocol) { + QSKIP("Syscalls needed for ipv6 udp multicasting missing functionality"); + } + } + QUdpSocket receiver; #ifdef FORCE_SESSION receiver.setProperty("_q_networksession", QVariant::fromValue(networkSession)); diff --git a/tests/auto/network/ssl/qsslsocket/BLACKLIST b/tests/auto/network/ssl/qsslsocket/BLACKLIST index 52c023b78f..cfab0b7eb0 100644 --- a/tests/auto/network/ssl/qsslsocket/BLACKLIST +++ b/tests/auto/network/ssl/qsslsocket/BLACKLIST @@ -5,3 +5,5 @@ windows rhel-7.2 [protocolServerSide:tls1.0-any] rhel-7.2 +[protocolServerSide] +osx-10.11 diff --git a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp index f44e5261dd..4e2974b4bf 100644 --- a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp +++ b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp @@ -29,6 +29,7 @@ #include <QtCore/qglobal.h> #include <QtCore/qthread.h> +#include <QtCore/qoperatingsystemversion.h> #include <QtNetwork/qhostaddress.h> #include <QtNetwork/qhostinfo.h> #include <QtNetwork/qnetworkproxy.h> @@ -1170,6 +1171,19 @@ void tst_QSslSocket::protocolServerSide_data() QTest::addColumn<QSsl::SslProtocol>("clientProtocol"); QTest::addColumn<bool>("works"); + // On macOS 10.11 with SecureTransport backend some tests are failing for no + // obvious reason (so no bug in our code): QTBUG-48860 - an error can be + // errSSLInternal or cipher negotiation failure. This problem does not exist + // on macOS before 10.11 and after 10.11, so we adjust these tests only for 10.11. + +#if defined(QT_SECURETRANSPORT) + using OSVersion = QOperatingSystemVersion; + const bool testWorks = OSVersion::current() < OSVersion::OSXElCapitan + || OSVersion::current() > OSVersion::OSXElCapitan; +#else + const bool testWorks = true; +#endif + #if !defined(OPENSSL_NO_SSL2) && !defined(QT_SECURETRANSPORT) QTest::newRow("ssl2-ssl2") << QSsl::SslV2 << QSsl::SslV2 << false; // no idea why it does not work, but we don't care about SSL 2 #endif @@ -1194,14 +1208,14 @@ void tst_QSslSocket::protocolServerSide_data() #endif #if !defined(OPENSSL_NO_SSL3) QTest::newRow("ssl3-tls1.0") << QSsl::SslV3 << QSsl::TlsV1_0 << false; - QTest::newRow("ssl3-tls1ssl3") << QSsl::SslV3 << QSsl::TlsV1SslV3 << true; + QTest::newRow("ssl3-tls1ssl3") << QSsl::SslV3 << QSsl::TlsV1SslV3 << testWorks; QTest::newRow("ssl3-secure") << QSsl::SslV3 << QSsl::SecureProtocols << false; #endif #if !defined(OPENSSL_NO_SSL2) && !defined(QT_SECURETRANSPORT) && !defined(OPENSSL_NO_SSL3) QTest::newRow("ssl3-any") << QSsl::SslV3 << QSsl::AnyProtocol << false; // we won't set a SNI header here because we connect to a // numerical IP, so OpenSSL will send a SSL 2 handshake #elif !defined(OPENSSL_NO_SSL3) - QTest::newRow("ssl3-any") << QSsl::SslV3 << QSsl::AnyProtocol << true; + QTest::newRow("ssl3-any") << QSsl::SslV3 << QSsl::AnyProtocol << testWorks; #endif #if !defined(OPENSSL_NO_SSL2) && !defined(QT_SECURETRANSPORT) diff --git a/tests/auto/opengl/qgl/tst_qgl.cpp b/tests/auto/opengl/qgl/tst_qgl.cpp index cf92c9fab6..7dfa8e4e22 100644 --- a/tests/auto/opengl/qgl/tst_qgl.cpp +++ b/tests/auto/opengl/qgl/tst_qgl.cpp @@ -1195,7 +1195,9 @@ void tst_QGL::currentFboSync() QGLFramebufferObject::bindDefault(); - QCOMPARE(fbo1.toImage(), fbo2Image); + // Convert the QGLFBO's result since QOpenGLFBO uses a wider + // variety of possible return formats. + QCOMPARE(fbo1.toImage().convertToFormat(fbo2Image.format()), fbo2Image); } { diff --git a/tests/auto/testlib/selftests/selftests.pri b/tests/auto/testlib/selftests/selftests.pri index 7404a1c49b..66c7e06760 100644 --- a/tests/auto/testlib/selftests/selftests.pri +++ b/tests/auto/testlib/selftests/selftests.pri @@ -45,3 +45,6 @@ SUBPROGRAMS = \ verifyexceptionthrown \ warnings \ xunit + +INCLUDEPATH += ../../../../shared/ +HEADERS += ../../../../shared/emulationdetector.h diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp index 0c078127b4..e7123fc059 100644 --- a/tests/auto/testlib/selftests/tst_selftests.cpp +++ b/tests/auto/testlib/selftests/tst_selftests.cpp @@ -36,6 +36,8 @@ #include <private/cycle_p.h> +#include "emulationdetector.h" + struct LoggerSet; class tst_Selftests: public QObject @@ -550,6 +552,7 @@ static QProcessEnvironment processEnvironment() || key == QLatin1String("GRAPHICS_ROOT") || key == QLatin1String("TZ") #elif defined(Q_OS_UNIX) || key == QLatin1String("HOME") || key == QLatin1String("USER") // Required for X11 on openSUSE + || key == QLatin1String("QEMU_SET_ENV") || key == QLatin1String("QEMU_LD_PREFIX") // Required for QEMU # if !defined(Q_OS_MAC) || key == QLatin1String("DISPLAY") || key == QLatin1String("XAUTHLOCALHOSTNAME") || key.startsWith(QLatin1String("XDG_")) @@ -642,6 +645,16 @@ void tst_Selftests::doRunSubTest(QString const& subdir, QStringList const& logge && subdir != QLatin1String("blacklisted") // calls qFatal() && subdir != QLatin1String("silent") // calls qFatal() #endif +#ifdef Q_OS_LINUX + // QEMU outputs to stderr about uncaught signals + && (!EmulationDetector::isRunningArmOnX86() || + (subdir != QLatin1String("blacklisted") + && subdir != QLatin1String("silent") + && subdir != QLatin1String("assert") + && subdir != QLatin1String("crashes") + ) + ) +#endif && subdir != QLatin1String("benchlibcallgrind")) QVERIFY2(err.isEmpty(), err.constData()); diff --git a/tests/auto/widgets/kernel/qwidget/BLACKLIST b/tests/auto/widgets/kernel/qwidget/BLACKLIST index 6fe6bd2f67..4a49a94c5d 100644 --- a/tests/auto/widgets/kernel/qwidget/BLACKLIST +++ b/tests/auto/widgets/kernel/qwidget/BLACKLIST @@ -9,6 +9,7 @@ ubuntu-14.04 osx [updateWhileMinimized] ubuntu-14.04 +ubuntu-16.04 rhel-7.1 rhel-7.2 osx |