diff --git a/tests/auto/network/socket/qtcpserver/test/CMakeLists.txt b/tests/auto/network/socket/qtcpserver/test/CMakeLists.txt index df7334b7bc..0defd36013 100644 --- a/tests/auto/network/socket/qtcpserver/test/CMakeLists.txt +++ b/tests/auto/network/socket/qtcpserver/test/CMakeLists.txt @@ -13,6 +13,7 @@ qt_internal_add_test(tst_qtcpserver ../tst_qtcpserver.cpp LIBRARIES Qt::Network + Qt::TestPrivate QT_TEST_SERVER_LIST "danted" "cyrus" "squid" "ftp-proxy" # special case ) diff --git a/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp b/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp index b10bce335b..f853c2c2e3 100644 --- a/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp +++ b/tests/auto/network/socket/qtcpserver/tst_qtcpserver.cpp @@ -2,6 +2,7 @@ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 #include + // To prevent windows system header files from re-defining min/max #define NOMINMAX 1 #if defined(_WIN32) @@ -36,9 +37,11 @@ #include #include +#include #include #include "../../../network-settings.h" +#include #if defined(Q_OS_LINUX) #define SHOULD_CHECK_SYSCALL_SUPPORT @@ -137,6 +140,11 @@ void tst_QTcpServer::initTestCase_data() void tst_QTcpServer::initTestCase() { + QSysInfo sysInfo; + if (QTestPrivate::isRunningArmOnX86() + || (sysInfo.productType() == QStringLiteral("ubuntu") + && sysInfo.productVersion() == QStringLiteral("22.04"))) + QSKIP("Skipping test on Ubuntu 22.04 and QEMU, see QTBUG-107696."); #ifdef QT_TEST_SERVER QVERIFY(QtNetworkSettings::verifyConnection(QtNetworkSettings::socksProxyServerName(), 1080)); QVERIFY(QtNetworkSettings::verifyConnection(QtNetworkSettings::httpProxyServerName(), 3128)); diff --git a/tests/auto/network/socket/qtcpsocket/test/CMakeLists.txt b/tests/auto/network/socket/qtcpsocket/test/CMakeLists.txt index e521d37bce..e5620a3fff 100644 --- a/tests/auto/network/socket/qtcpsocket/test/CMakeLists.txt +++ b/tests/auto/network/socket/qtcpsocket/test/CMakeLists.txt @@ -14,6 +14,7 @@ qt_internal_add_test(tst_qtcpsocket LIBRARIES Qt::CorePrivate Qt::NetworkPrivate + Qt::TestPrivate QT_TEST_SERVER_LIST "danted" "squid" "apache2" "ftp-proxy" "vsftpd" "iptables" "cyrus" # special case ) diff --git a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp index 50c9192ea2..ca81332205 100644 --- a/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp +++ b/tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp @@ -40,6 +40,7 @@ #ifndef QT_NO_SSL #include #endif +#include #include #include #include @@ -61,6 +62,7 @@ #include "private/qhostinfo_p.h" #include "../../../network-settings.h" +#include QT_FORWARD_DECLARE_CLASS(QTcpSocket) class SocketPair; @@ -325,6 +327,11 @@ void tst_QTcpSocket::initTestCase_data() void tst_QTcpSocket::initTestCase() { + QSysInfo sysInfo; + if (QTestPrivate::isRunningArmOnX86() + || (sysInfo.productType() == QStringLiteral("ubuntu") + && sysInfo.productVersion() == QStringLiteral("22.04"))) + QSKIP("Skipping test on Ubuntu 22.04 and QEMU, see QTBUG-107696."); #ifdef QT_TEST_SERVER QVERIFY(QtNetworkSettings::verifyConnection(QtNetworkSettings::httpServerName(), 80)); QVERIFY(QtNetworkSettings::verifyConnection(QtNetworkSettings::httpProxyServerName(), 3128)); diff --git a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp index 4e380bcde1..f58d7ed440 100644 --- a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp +++ b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include "private/qhostinfo_p.h" #include "private/qiodevice_p.h" // for QIODEVICE_BUFFERSIZE @@ -394,6 +395,11 @@ void tst_QSslSocket::initTestCase_data() void tst_QSslSocket::initTestCase() { + QSysInfo sysInfo; + if (QTestPrivate::isRunningArmOnX86() + || (sysInfo.productType() == QStringLiteral("ubuntu") + && sysInfo.productVersion() == QStringLiteral("22.04"))) + QSKIP("Skipping test on Ubuntu 22.04 and QEMU, see QTBUG-107696."); testDataDir = QFileInfo(QFINDTESTDATA("certs")).absolutePath(); if (testDataDir.isEmpty()) testDataDir = QCoreApplication::applicationDirPath();