tst_QUdpSocket - unblacklist tests on Ubuntu 16.04
We use QSKIP instead for kernel versions [4.6, 4.13). Task-number: QTBUG-65440 Change-Id: Ie764b5a4eb8a67dc2a43d4dc67b5d6eb772f6b2a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Joni Jäntti <joni.jantti@qt.io>
This commit is contained in:
parent
8cef809b16
commit
4a11243d3c
@ -22,12 +22,9 @@ osx
|
|||||||
osx
|
osx
|
||||||
[broadcasting]
|
[broadcasting]
|
||||||
osx
|
osx
|
||||||
ubuntu-16.04
|
|
||||||
[zeroLengthDatagram]
|
[zeroLengthDatagram]
|
||||||
osx
|
osx
|
||||||
[linkLocalIPv6]
|
[linkLocalIPv6]
|
||||||
redhatenterpriselinuxworkstation-6.6
|
redhatenterpriselinuxworkstation-6.6
|
||||||
[pendingDatagramSize]
|
|
||||||
ubuntu-16.04
|
|
||||||
[readyReadForEmptyDatagram]
|
[readyReadForEmptyDatagram]
|
||||||
ubuntu-16.04
|
ubuntu-16.04
|
||||||
|
@ -131,11 +131,13 @@ protected slots:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
bool shouldSkipIpv6TestsForBrokenSetsockopt();
|
bool shouldSkipIpv6TestsForBrokenSetsockopt();
|
||||||
|
bool shouldWorkaroundLinuxKernelBug();
|
||||||
#ifdef SHOULD_CHECK_SYSCALL_SUPPORT
|
#ifdef SHOULD_CHECK_SYSCALL_SUPPORT
|
||||||
bool ipv6SetsockoptionMissing(int level, int optname);
|
bool ipv6SetsockoptionMissing(int level, int optname);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool m_skipUnsupportedIPv6Tests;
|
bool m_skipUnsupportedIPv6Tests;
|
||||||
|
bool m_workaroundLinuxKernelBug;
|
||||||
QList<QHostAddress> allAddresses;
|
QList<QHostAddress> allAddresses;
|
||||||
#ifndef QT_NO_BEARERMANAGEMENT
|
#ifndef QT_NO_BEARERMANAGEMENT
|
||||||
QNetworkConfigurationManager *netConfMan;
|
QNetworkConfigurationManager *netConfMan;
|
||||||
@ -183,6 +185,16 @@ bool tst_QUdpSocket::shouldSkipIpv6TestsForBrokenSetsockopt()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool tst_QUdpSocket::shouldWorkaroundLinuxKernelBug()
|
||||||
|
{
|
||||||
|
#ifdef Q_OS_LINUX
|
||||||
|
const QVersionNumber version = QVersionNumber::fromString(QSysInfo::kernelVersion());
|
||||||
|
return version.majorVersion() == 4 && version.minorVersion() >= 6 && version.minorVersion() < 13;
|
||||||
|
#else
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
static QHostAddress makeNonAny(const QHostAddress &address, QHostAddress::SpecialAddress preferForAny = QHostAddress::LocalHost)
|
static QHostAddress makeNonAny(const QHostAddress &address, QHostAddress::SpecialAddress preferForAny = QHostAddress::LocalHost)
|
||||||
{
|
{
|
||||||
if (address == QHostAddress::Any)
|
if (address == QHostAddress::Any)
|
||||||
@ -235,7 +247,7 @@ void tst_QUdpSocket::initTestCase()
|
|||||||
QSKIP("No network test server available");
|
QSKIP("No network test server available");
|
||||||
allAddresses = QNetworkInterface::allAddresses();
|
allAddresses = QNetworkInterface::allAddresses();
|
||||||
m_skipUnsupportedIPv6Tests = shouldSkipIpv6TestsForBrokenSetsockopt();
|
m_skipUnsupportedIPv6Tests = shouldSkipIpv6TestsForBrokenSetsockopt();
|
||||||
|
m_workaroundLinuxKernelBug = shouldWorkaroundLinuxKernelBug();
|
||||||
if (EmulationDetector::isRunningArmOnX86())
|
if (EmulationDetector::isRunningArmOnX86())
|
||||||
QSKIP("This test is unreliable due to QEMU emulation shortcomings.");
|
QSKIP("This test is unreliable due to QEMU emulation shortcomings.");
|
||||||
}
|
}
|
||||||
@ -329,6 +341,9 @@ void tst_QUdpSocket::unconnectedServerAndClientTest()
|
|||||||
|
|
||||||
void tst_QUdpSocket::broadcasting()
|
void tst_QUdpSocket::broadcasting()
|
||||||
{
|
{
|
||||||
|
if (m_workaroundLinuxKernelBug)
|
||||||
|
QSKIP("This test can fail due to linux kernel bug");
|
||||||
|
|
||||||
QFETCH_GLOBAL(bool, setProxy);
|
QFETCH_GLOBAL(bool, setProxy);
|
||||||
if (setProxy) {
|
if (setProxy) {
|
||||||
#ifndef QT_NO_NETWORKPROXY
|
#ifndef QT_NO_NETWORKPROXY
|
||||||
@ -797,6 +812,9 @@ void tst_QUdpSocket::bindAndConnectToHost()
|
|||||||
|
|
||||||
void tst_QUdpSocket::pendingDatagramSize()
|
void tst_QUdpSocket::pendingDatagramSize()
|
||||||
{
|
{
|
||||||
|
if (m_workaroundLinuxKernelBug)
|
||||||
|
QSKIP("This test can fail due to linux kernel bug");
|
||||||
|
|
||||||
QUdpSocket server;
|
QUdpSocket server;
|
||||||
#ifdef FORCE_SESSION
|
#ifdef FORCE_SESSION
|
||||||
server.setProperty("_q_networksession", QVariant::fromValue(networkSession));
|
server.setProperty("_q_networksession", QVariant::fromValue(networkSession));
|
||||||
|
Loading…
Reference in New Issue
Block a user