Commit Graph

179 Commits

Author SHA1 Message Date
Joerg Bornemann
2b2232b5ea Speed up tst_QLocalSocket::sendData
The data function for this test re-used listenAndConnect_data that
has an additional column "connections" which was never used in sendData.
Thus sendData executed three times the same code which is just uselessly
burned CI time.
Copied the actually needed code of listenAndConnect_data to sendData_data.

Change-Id: I6cdb1c1b72cb4ce7be7c13e90eea30ac09a14914
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2016-03-03 08:25:04 +00:00
Liang Qi
8f569c740a Merge remote-tracking branch 'origin/5.5' into 5.6
Conflicts:
	config.tests/common/atomic64/atomic64.cpp
	configure
	src/3rdparty/forkfd/forkfd.c
	src/corelib/io/forkfd_qt.cpp
	src/widgets/kernel/qwidgetwindow.cpp
	tests/auto/corelib/statemachine/qstatemachine/tst_qstatemachine.cpp
	tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
	tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
	tools/configure/configureapp.cpp

Change-Id: Ic6168d82e51a0ef1862c3a63bee6722e8f138414
2016-01-19 10:03:01 +01:00
Alex Trotsenko
294111e25a QHttpSocketEngine: ensure pending EOF triggers a notification
When the remote peer closed the connection, a read notification needs
to always be emitted, otherwise the higher layer does not get the
disconnected signal. From the other side, underlying QAbstractSocket
object could temporarily disable notifications from the engine at
any time. To avoid possible blocking of the socket, take a pending EOF
into account when the read notifications are re-enabled.

Change-Id: Iac9d4e2f790530be3500baf5a2000f1f63df5cc2
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
2016-01-18 11:08:34 +00:00
Alex Trotsenko
6b6955c2ff QAbstractSocket: do not enable read notifications on TCP in bind()
In bind+connect scenario, rejected connection can trigger a read
notification while the socket is opened. But unlike UDP, reading from
the socket engine or emitting a readyRead() signal is not allowed for
the TCP socket in bound or connecting state.

To make a bind+connect scenario work properly, disable the read
notifications until a connection is established.

Task-number: QTBUG-50124
Change-Id: I7b3d015b0f6021fb9ff9f83560478aa5545f41f5
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-12-24 14:05:26 +00:00
Friedemann Kleint
d93a4158e0 tst_QLocalSocket::threadedConnection(): Add failure message.
Introduce QVERIFY2() to get some information when exactly it fails.

Change-Id: Icaddf2ecae434d0bafc90c18458c5ee067dfd506
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2015-12-03 15:03:17 +00:00
Liang Qi
f8246099ea Merge remote-tracking branch 'origin/5.5' into 5.6
Conflicts:
	src/corelib/io/qstorageinfo_unix.cpp
	src/plugins/platforms/windows/qwindowsmousehandler.cpp
	src/widgets/styles/qwindowsvistastyle.cpp

Change-Id: Ie1725933815891cc8c86258d4c0e8ed0ab386edf
2015-11-04 12:28:48 +01:00
Joerg Bornemann
dfaffcbf2a QWindowsPipeReader: fix occasional "Unknown error 995"
After canceling the asynchronous read operation, the
notified() slot receives ERROR_OPERATION_ABORTED.
We must not handle this situation as an error.

This amends commit 5ce567c5.

Task-number: QTBUG-48336
Change-Id: Iff948ceb3ad1f805a9de8c188fbc39ed4c76ba82
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-11-02 12:38:50 +00:00
Timur Pocheptsov
25717bedfb tst_qudpsocket::multicast - blacklist several combinations
Different multicast tests fail on different platforms for different reasons.
Blacklist them to get rid of insignificant and later fix/un-blacklist.

Change-Id: I91548366c7666478ea1cc446bbf337becfdefd49
Task-number: QTBUG-46612
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@theqtcompany.com>
2015-10-30 22:01:50 +00:00
Liang Qi
b7ac036b72 Merge remote-tracking branch 'origin/5.5' into 5.6
Conflicts:
	src/network/socket/qabstractsocket.cpp
	src/plugins/platforms/winrt/qwinrtscreen.cpp
	src/sql/drivers/mysql/qsql_mysql.cpp

Change-Id: Ifb73623d09f53340ee5e10283f1f86b580998902
2015-10-13 23:03:51 +02:00
Alex Trotsenko
0872156559 QAbstractSocket: fix writing to socket in HostLookup state
After calling connectToHost(), the socket enters HostLookup state. At this
stage, the socket engine was not created yet, and writing to the socket
should result in either data buffering or an error. So, add a check for
d->socketEngine to prevent a crash on unbuffered sockets.

Task-number: QTBUG-48356
Change-Id: I15ea9ce7de97ce6d7e13e358eca5350745b556bb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-10-13 05:20:08 +00:00
Liang Qi
d0eaa737e1 Merge remote-tracking branch 'origin/5.5' into 5.6
Conflicts:
	qmake/doc/src/qmake-manual.qdoc
	src/corelib/tools/qstring.h
	src/gui/image/qimagereader.cpp
	src/network/access/qnetworkaccessmanager.cpp
	src/tools/qdoc/doc/examples/examples.qdoc
	src/widgets/accessible/qaccessiblewidgetfactory_p.h
	src/widgets/doc/qtwidgets.qdocconf

Change-Id: I8fae62283aebefe24e5ca4b4abd97386560c0fcb
2015-10-02 16:59:55 +02:00
Thiago Macieira
d878107001 Declare QNetworkAddressEntry and QNetworkInterface as metatypes
Change-Id: I7de033f80b0e4431b7f1ffff13f98c092ea3ba3e
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-09-13 18:54:09 +00:00
Alex Trotsenko
378e26dd14 QUdpSocket: avoid infinite read notifier blocking
There was a small amount of time between the last readDatagram() call
and disabling a read notifier in case the socket had a pending
datagram. If a new datagram arrived in this period, this qualified as
absence of a datagram reader. Do not change the read notifier state
because it is disabled on canReadNotification() entry and always enabled
by the datagram reader.

Thanks to Peter Seiderer, who investigated the same: "Querying
hasPendingDatagrams() for enabling/disabling setReadNotificationEnabled()
is racy (a new datagram could arrive after readDatagam() is called and
before hasPendingDatagrams() is checked). But for unbuffered sockets the
ReadNotification is already disabled before the readReady signal is
emitted and should be re-enabled when calling read() or readDatagram()
from the user."

However, this patch does not completely solve the problem under Windows,
as the socket notifier may emit spurious notifications.

Task-number: QTBUG-46552
Change-Id: If7295d53ae2c788c39e86303502f38135c4d6180
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-09-10 12:50:58 +00:00
Liang Qi
afab1546a7 Merge remote-tracking branch 'origin/5.5' into 5.6
Conflicts:
	qmake/doc/snippets/code/doc_src_qmake-manual.pro
	qmake/doc/src/qmake-manual.qdoc
	src/corelib/io/qstorageinfo_unix.cpp
	src/corelib/tools/qbytearray.cpp
	src/widgets/kernel/qwidgetwindow.cpp
	tests/auto/corelib/io/qprocess/tst_qprocess.cpp
	tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp
	tests/auto/network/access/qnetworkreply/BLACKLIST

Change-Id: I9efcd7e1cce1c394eed425c43aa6fce7d2edf31c
2015-08-26 20:06:57 +02:00
Thiago Macieira
5b38454714 Autotest: Print errno in case of failure
Change-Id: I7de033f80b0e4431b7f1ffff13fc4a02e1c1a2a5
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-08-22 22:26:27 +00:00
Thiago Macieira
89efa7333d QAbstractSocketEngine: introduce QIpPacketHeader for datagrams
This commit changes the readDatagram() and writeDatagram() virtual
functions to take a QIpPacketHeader as meta data, instead of a
QHostAddress/quint16 pair. As previously, the header is an "out"
parameter for readDatagram() and an "in" parameter for writeDatagram().

The header pointer in readDatagram() is allowed to be null if the
PacketHeaderOptions indicates WantNone. Otherwise, it must not be null.
The extra options parameter is introduced because we may not always want
all the metadata upon reception. For sending, we know what to include or
not based on what's set in the incoming header parameter.

QIpPacketHeader splits sender and destination because we'll be able to
return both on datagram reception.

Change-Id: Iee8cbc07c4434ce9b560ffff13ca4213255008c7
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-08-22 22:26:23 +00:00
Oliver Wolff
ec4426fada WinRT: Skip unsupported multicast UDP socket tests
Change-Id: I69f756ad829569060ae9931748b940842d23a6ea
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-08-17 08:07:49 +00:00
Oliver Wolff
265cda469f tst_qudpsocket: Do not crash if no testserver address could be found
Change-Id: Ica61974b20b848997c8ab101abde4b536814ba83
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-08-17 08:07:46 +00:00
Frederik Gladhorn
77da617dc8 Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
	doc/global/qt-cpp-defines.qdocconf
	src/3rdparty/forkfd/forkfd.c
	src/corelib/codecs/qtextcodec.cpp
	src/corelib/kernel/qmetatype.cpp
	src/corelib/tools/qset.qdoc
	src/gui/accessible/qaccessible.cpp
	src/gui/image/qpixmapcache.cpp
	src/opengl/qgl.cpp
	src/tools/qdoc/generator.cpp
	src/widgets/kernel/qwidget.cpp
	tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp

Change-Id: I4fbe1fa756a54c6843aa75f4ef70a1069ba7b085
2015-08-06 10:54:01 +02:00
Friedemann Kleint
57dbdcd92f tests/auto/network: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).
- Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer).
- Replace Q[TRY]_VERIFY(smartPointer == 0)  by
          Q[TRY]_VERIFY(smartPointer.isNull()).
- Replace Q[TRY]_VERIFY(a == b) by  Q[TRY]_COMPARE(a, b) and
  add casts where necessary. The values will then be logged
  should a test fail.

Change-Id: Icaa1edafcc6e2779fbd6dbc2c058544d6e07f1e9
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-07-31 04:29:33 +00:00
Friedemann Kleint
4b8cda8a36 Tests: Remove some unused member variables.
Fix warnings:

tst_qtcpsocket.cpp:245:9: warning: private field 'numConnections' is not used [-Wunused-private-field]
    int numConnections;
        ^
tst_qtcpsocket.cpp:1834:9: warning: private field 'exitCode' is not used [-Wunused-private-field]
    int exitCode;

tst_qcheckbox.cpp:86:10: warning: private field 'tmp' is not used [-Wunused-private-field]
    uint tmp;
         ^
tst_qcheckbox.cpp:88:10: warning: private field 'tmp2' is not used [-Wunused-private-field]
    uint tmp2;

Below warning is caused by code #ifdefed for OS X only, make it a local variable:
tst_qlabel.cpp:114:16: warning: private field 'test_edit' is not used [-Wunused-private-field]
    QLineEdit *test_edit;

Change-Id: I53c755545fe2e7ca1f053f40c8c0e50aec2efcdd
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
2015-07-28 13:19:07 +00:00
Thiago Macieira
58e4bbc83f tst_QUdpSocket: send two bytes in a datagram
I'm getting an error with WSARecvFrom in nativeBytesAvailable() and I
don't know why. The number of bytes obtained is correct and the test
works for 2 bytes, so let's use that.

The Windows nativeBytesAvailable() function has a comment saying that
WSAIoctl sometimes indicates 1 byte available when there's a pending
error notification, so that function proceeds to do a WSARecvFrom to
peek the number of bytes. Somehow that function in this test is getting
a SOCKET_ERROR I can't explain.

Change-Id: Ic5b19e556e572a72a9df9a405b1fee3b7efb8b24
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-07-17 15:49:32 +00:00
Liang Qi
0aa2d318b1 Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
	src/corelib/global/qglobal.cpp
	src/corelib/global/qglobal.h
	src/corelib/global/qsysinfo.h
	src/corelib/global/qsystemdetection.h
	src/corelib/kernel/qobjectdefs.h
	src/plugins/plugins.pro
	tests/auto/widgets/itemviews/qlistview/qlistview.pro

Change-Id: Ib55aa79d707c4c1453fb9d697f6cf92211ed665c
2015-07-01 11:05:26 +02:00
Simon Hausmann
bc5581f228 Blacklist socks bind test on Windows
The test is very flakey.

Change-Id: I6cb7ee7989169d077104883a02bb9240bafabe38
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-06-20 15:25:39 +00:00
Simon Hausmann
f3939d943e Blacklist and skip various tests that are flakey
They didn't show up in the "old" CI runs because they usually pass the second
time they are executed - which the testrunner does. The new CI doesn't do that
anymore, instead we now mark those tests explicitly and will track their record
of passing and failing in the new metrics database.

Change-Id: Id34dd6f792f38995b07b6fec88f833df64de2f8b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-06-14 10:50:45 +00:00
Oswald Buddenhagen
d32f47b703 fix usage of wince scope
Fix style issues along the way.

Change-Id: Ic6a6de28e198eb0b14c198b802e78845703909b9
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-06-05 10:29:10 +00:00
Liang Qi
135ebe4f3d Merge remote-tracking branch 'origin/5.5' into dev
Change-Id: If5d2e621c2fa5476c3ab687a3f4620c54fc3b32e
2015-03-24 07:38:02 +01:00
Thiago Macieira
699e7a0869 Remove the tests for Ubuntu Oneiric (11.10)
This system is no longer in the CI rotation and we haven't had reports
of the same issues happening on later versions. Either the issues have
since been fixed or they were never an issue in Qt in the first place.

This commit has the additional benefit of getting rid of the following
shell error when qmake was run:
	sh: line 0: [: =: unary operator expected
as /etc/lsb-release hasn't contained DISTRIB_CODENAME for some time and
proper quoting was never implemented (not even qtcpsocket.pro).

Change-Id: Ia0aac2f09e9245339951ffff13c829e910ee64e9
Reviewed-by: Albert Astals Cid <albert.astals@canonical.com>
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-03-17 01:26:13 +00:00
Marko Kangas
bc69fd1dfe Skip instead of entirely excluding tests with disabled features
Properly QSKIP tests that use disabled QProcess and symlink
features instead of excluding them silently by #ifdef.
Other reason is that moc doesn't respect QT_NO_* defines
in class definition which causes build issues on some
platforms.

Change-Id: I041020f7452f7d36c7ec8a5866a4ba5eb23d1f94
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
2015-03-16 09:34:15 +00:00
Simon Hausmann
198606f6db Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
	src/plugins/platforms/xcb/qxcbnativeinterface.cpp
	src/plugins/platforms/xcb/qxcbnativeinterface.h

Change-Id: I31b38ba439b9341d51a01c0fd54bea33f7410076
2015-03-16 10:31:07 +01:00
Thiago Macieira
97f489e7b9 Network tests: don't try to test against disabled network interfaces
Other parts of tst_qudpsocket.cpp already did this check.

Change-Id: Iee8cbc07c4434ce9b560ffff13ca545a03c9596a
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-03-16 05:30:44 +00:00
Frederik Gladhorn
6cef72d0b4 Merge remote-tracking branch 'origin/5.5' into dev
Change-Id: I9d10911c51700965f2cf0e3173b88fd9116bd3ee
2015-03-09 10:23:15 +01:00
Thiago Macieira
9fb68a90af Fix bind+connect in both TCP and UDP
This has been known to be broken for a while. Now it works: you can bind
and you'll retain the port (and the file descriptor) for the connect
call. Incidentally, in fixing the binding for more than one IP for the
hostname (with event loop), this commit fixes the setSocketDescriptor
XFAIL.

[ChangeLog][QtNetwork] Fixed a bug that caused both QTcpSocket and
QUdpSocket to close the socket and lose any bound ports before
connecting. Now bind()/setSocketDescriptor() followed by connect() will
retain the original file descriptor.

Task-number: QTBUG-26538
Change-Id: I691caed7e8fd16a9cf687b5995afbf3006bf453a
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-03-04 23:58:03 +00:00
Frederik Gladhorn
709e40093e Merge remote-tracking branch 'origin/5.5' into dev
Change-Id: Ie709286a14b452dae7abb59830f584bb33f1ccf5
2015-02-25 12:23:22 +01:00
Frederik Gladhorn
34b14a8472 Merge remote-tracking branch 'origin/5.4' into 5.5
Conflicts:
	examples/xml/htmlinfo/simpleexample.html
	examples/xml/rsslisting/rsslisting.cpp
	qmake/generators/win32/msbuild_objectmodel.cpp
	src/3rdparty/harfbuzz-ng/src/hb-private.hh
	src/corelib/global/qlogging.cpp
	src/corelib/io/qstorageinfo_unix.cpp
	src/corelib/thread/qwaitcondition_unix.cpp
	src/gui/kernel/qguiapplication.cpp
	src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp
	src/testlib/doc/src/qt-webpages.qdoc
	tests/auto/other/qaccessibility/tst_qaccessibility.cpp

Change-Id: Ib272ff0bc30a1a5d51275eb3cd2f201dc82c11ff
2015-02-24 21:02:08 +01:00
Alex Trotsenko
dbfd3c0952 Move the socket test to an appropriate file
Actually, it tests the buffered QTcpSocket. Place it in
tst_qtcpsocket.cpp instead of tst_qabstractsocket.cpp.

Change-Id: I3055c4773d0de74c238be4f11b2d1c07ddad4485
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-02-23 16:33:54 +00:00
Alex Trotsenko
071716f2da QAbstractSocket: remove unneeded cleanup calls and private member
QAbstractSocket::close() always calls QIODevice::close(), which resets
QIODevice's internal read buffer. So it makes no sense to make same calls
from disconnectFromHost(). This made the closeCalled private member
superfluous.

Change-Id: I4ec64e9711490e44e737763e4ed7fb41bffe2556
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-02-11 21:19:13 +00:00
Jani Heikkinen
83a5694dc2 Update copyright headers
Qt copyrights are now in The Qt Company, so we could update the source
code headers accordingly. In the same go we should also fix the links to
point to qt.io.

Outdated header.LGPL removed (use header.LGPL21 instead)

Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing
combination. New header.LGPL-COMM taken in the use file which were
using old header.LGPL3 (src/plugins/platforms/android/extract.cpp)

Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license
combination

Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe
Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
2015-02-11 06:49:51 +00:00
Richard J. Moore
86b000ea1b Fix reported build failure with VS2010 on windows 8.1.
Task-number: QTBUG-44321
Change-Id: I885e3dab52193f7dfd245345fde53f6bb3420430
Reviewed-by: Peter Hartmann <peter-qt@hartmann.tk>
2015-02-09 10:29:08 +00:00
Thiago Macieira
a4c837b3a1 Fix QUdpSocket's emission of readyRead()
The documentation says that QUdpSocket emits readyRead() only for one
datagram and that if you don't read it, the class will not emit again.
That should be implemented by disabling of the socket notifier once we
have the datagram already read, but was broken.

In turn, that breakage caused a live-lock of the event loop: since we
didn't disable the notifier nor read the pending datagram, the event
loop would fire every time for the same datagram.

The re-enabling of the notifier was already working.

Task-number: QTBUG-43857
Change-Id: Ic5d393bfd36e48a193fcffff13bb32ad390b5fe8
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-01-22 04:44:10 +01:00
Thiago Macieira
b699ac070c Don't bind to QHostAddress::Any if we want to do IPv4 multicast ops
Linux gracefully allows us to do that and treat the v6 socket as if it
were v4. Other OS (notably OS X) aren't so forgiving.

Change-Id: I13dd3274be2a4b13e8b1eef93cbc2dd17b648f96
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-01-05 08:07:10 +01:00
Thiago Macieira
1196f69112 tst_QUdpSocket: Fix inverted logic in getting a non-"any" address
We want to use "localhost" if the server's address is "any", as some OS
can't send datagrams to "any" (e.g., OS X and FreeBSD).

Change-Id: I1004bc2282e7f930cdb7ed394aa9f4b5a1cfcf82
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-12-28 15:58:54 +01:00
Thiago Macieira
9a70b67b5a Don't hardcode port numbers in tst_QUdpSocket wherever possible
On my Mac Mini, port 5000 is in use, which means the broadcasting test
fails.

Change-Id: Ifb0883263e277f388342430349ea7315d42f324a
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-12-28 15:58:10 +01:00
Thiago Macieira
c290ee69f2 Fix silly QSKIP for IPv6 in tst_QUdpSocket::multicast
It was unconditional. Someone forgot to check for IPv6 support before
skipping IPv6 tests.

Change-Id: I7b11528ad02560f0db9defde3c64f76f48a6c1f8
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-12-28 15:57:52 +01:00
Thiago Macieira
98a7497d74 Silence warning in tst_QUdpSocket::multicast for Any+IPv4
QUdpSocket doesn't support binding to QHostAddress::Any and then joining
an IPv4 multicat group since QHostAddress::Any is really an IPv6 socket
with v6only = false. The test did check this case, but failed to ignore
the warning.

Change-Id: I62d782408319a6e566e0ff1a6081b706ac1f669c
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-12-24 22:49:26 +01:00
Thiago Macieira
14c5f149cd Fix tst_QUdpSocket::multicastLeaveAfterClose
With IPv6, you cannot bind to a multicast address. You need to bind to a
local address only. The previous tests either checked this or didn't
check the result of bind().

Change-Id: Ief70887d8988fc1bc4394cf6ff34b5d560e5748e
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-12-24 22:49:20 +01:00
Thiago Macieira
e38631b5e9 Stabilize tst_QUdpSocket::broadcasting
Sending 100*8 packets of each type of message is WAY overkill. That's a
stress test without limiting. My Linux system starts reporting EAGAIN on
the socket, so reduce the amount of data sent.

Change-Id: I153f44cf3b91d37526dac580b400114cc80b1769
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-12-24 14:42:27 +01:00
Thiago Macieira
68d8d27fad Don't try to send broadcasts over IPv6
IPv6 has no such thing, so don't try to bind to an IPv6 address to send
broadcasts (even though that works) and it's a poor idea to bind to IPv6
to receive broadcasts. Moreover, skip any IPv6 network addresses
(broadcast() is invalid).

Change-Id: I2829b042c000158565adfd92db682f37d67dacae
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-12-24 14:42:05 +01:00
Thiago Macieira
7a303ff55f Suppress silly shell warning during qmake of qtcpsocket.pro
If you don't have /etc/lsb-release, you'd get
  sh: line 0: [: =: unary operator expected

Change-Id: Idb5c79f799879e4d32cd640ef74fb388227f831e
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-12-24 14:41:55 +01:00
Thiago Macieira
a0cec54220 Autotest: Disable multicast testing with proxies
It doesn't make sense because there is no command to ask the proxy
server to join a multicast group. At best, we could write a datagram via
proxy without joining, but we definitely can't receive.

Change-Id: Icc6b54572a053fb7821dfca1f4111f2046ff8686
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-12-24 14:40:21 +01:00