Skip socket and server tests on Ubuntu 22.04 and QEMU

Task-number: QTBUG-107696
Change-Id: Ic9cecd0c8624e7e8211633ef8a8ce0339662b4f6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
bb10
Ville Voutilainen 2023-01-31 00:37:02 +02:00
parent ae51eeb0bb
commit 9286d46ee2
5 changed files with 23 additions and 0 deletions

View File

@ -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
)

View File

@ -2,6 +2,7 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <qglobal.h>
// To prevent windows system header files from re-defining min/max
#define NOMINMAX 1
#if defined(_WIN32)
@ -36,9 +37,11 @@
#include <QNetworkProxy>
#include <QSet>
#include <QSysInfo>
#include <QList>
#include "../../../network-settings.h"
#include <QtTest/private/qemulationdetector_p.h>
#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));

View File

@ -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
)

View File

@ -40,6 +40,7 @@
#ifndef QT_NO_SSL
#include <QSslSocket>
#endif
#include <QSysInfo>
#include <QTextStream>
#include <QThread>
#include <QElapsedTimer>
@ -61,6 +62,7 @@
#include "private/qhostinfo_p.h"
#include "../../../network-settings.h"
#include <QtTest/private/qemulationdetector_p.h>
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));

View File

@ -27,6 +27,7 @@
#include <QTestEventLoop>
#include <QSignalSpy>
#include <QSemaphore>
#include <QSysInfo>
#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();