summaryrefslogtreecommitdiffstats
path: root/tests/auto/network/socket
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Lars Knoll2017-12-302-3/+22
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf mkspecs/win32-g++/qmake.conf src/corelib/global/qglobal_p.h src/corelib/global/qoperatingsystemversion_p.h src/corelib/io/qfilesystemengine_win.cpp src/network/bearer/qbearerengine.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/sql/doc/snippets/code/doc_src_sql-driver.cpp src/widgets/kernel/qwidget_p.h src/widgets/kernel/qwidgetwindow.cpp src/widgets/styles/qfusionstyle.cpp tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp Change-Id: I80e2722f481b12fff5d967c28f89208c0e9a1dd8
| | * Blacklist tst_QUdpSocket on Ubuntu 16.04Joni Jantti2017-12-271-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | tst_QUdpSocket::broadcasting and tst_QUdpSocket::pendingDatagramSize fail on the new Ubuntu 16.04 clean template. Task-number: QTBUG-65440 Change-Id: I0e973b9c90b7c5827406bac8138370b61992a115 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
| | * tst_QUdpSocket: fix linkLocalIPv4 testThiago Macieira2017-12-051-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I broke it in commit 4da2dda2aa1f710177157dc1cf841e0bf0b9d829. It wasn't flaky or anything: it was plain broken and would never pass. That indicates no node in the CI has an IPv4 link-local address (and apparently neither did I at the time). Change-Id: Ifb5969bf206e4cd7b14efffd14fb62176546916e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| | * tst_QUdpSocket: Don't test for .bytesAvailable on untrusted platformsThiago Macieira2017-12-051-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | FreeBSD, for example, does not have SO_NREAD and its FIONREAD returns the full socket buffer size, including IP and UDP headers. Change-Id: Ifb5969bf206e4cd7b14efffd14fb5d8ca778d16a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| * | tst_QUdpSocket: add some tests for link-local IPv6 multicastingThiago Macieira2017-12-291-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unlike higher scopes (like scope 4, admin-local, which the last commit used), scopes 1 and 2 require a scope in order to bind, even if some operating systems are lenient. So test that we are able to bind to them and do bind properly. Change-Id: Ifb5969bf206e4cd7b14efffd14fba153eab965b9 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | tst_QUdpSocket: always use an interface when binding to IPv6Thiago Macieira2017-12-292-6/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Binding without an interface and expecting the OS to select something is not supported in all OSes. On FreeBSD, I keep getting EADDRNOTAVAIL. So modify our test to only join, leave and send to multicast groups with an interface selection. With this, all tests either pass or are skipped for me on Linux, FreeBSD, and macOS. On Windows, this revealed an inconsistency in behavior, which this commit adds a workaround for. Change-Id: Ifb5969bf206e4cd7b14efffd14fb6815456494d2 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | tst_QUdpSocket: Don't use interface-local IPv6 multicastThiago Macieira2017-12-241-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The FreeBSD kernel treats them specially, just like link-local (that's probably why it calls them "interface-local" instead of "node-local"). So instead let's use a random address, which will avoid multiple tst_qudpsocket, when run on the same network at the same time, receiving each other's datagrams. It could happen, considering this test has an 800-second timeout limit. Change-Id: Ifb5969bf206e4cd7b14efffd14fb592a3166547e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| * | tst_QUdpSocket: stop trying to bind to multicast addressesThiago Macieira2017-12-242-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is not an official feature of the networking stacks and does not work portably across operating systems. So just stop trying to do that. This was failing reliably (not flaky!) with IPv6 on FreeBSD and Windows. For IPv4, Windows apparently accepts 239.255.0.0/16 but not other addresses, so remove IPv4 too. Change-Id: Ifb5969bf206e4cd7b14efffd14fb682c2839e95d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| * | tst_QUdpSocket: remove Bearer portions of the testThiago Macieira2017-12-051-122/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test fails to start on FreeBSD: FAIL! : tst_QUdpSocket::initTestCase() 'networkSession->waitForOpened(30000)' returned FALSE. () Loc: [/usr/home/tjmaciei/src/qt/qt5/qtbase/tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp(234)] This commit is basically a revert of the Qt 4.8 commit a951fb79139498774d021759d0466b4b2ff50e68. FORCE_SESSION was only used by manual testing, as the commit message said > 8. For manual testing, added the FORCE_SESSION macro to test behaviour > of UDP sockets when they have an explicit network session associated So I doubt it has been tested recently. Change-Id: Ifb5969bf206e4cd7b14efffd14fb569ebf53497b Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-302-3/+8
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/thread/qsemaphore.cpp tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: Id35b535e88df63fdfe4007ea92ed4a39c4b6d707
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-11-282-3/+8
| |\| | | | | | | | | | Change-Id: Iede384644c3df5ee01b701806dfdb586dd6bb138
| | * tst_QTcpSocket: fix disconnectWhileLookingUpMårten Nordheim2017-11-242-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and unblacklist it on Windows. From what I can tell there is no particular reason why this test fails other than that it is a little too slow sometimes (these things happen). So, to fix the test I bumped the timeout, but to avoid the test running for longer on every test-run it now also ends when the socket enters the "Unconnected" state. Previously it failed 171/500 times, and after this patch it failed 0/1000 times. Change-Id: I4266bff6b91aaaf502ee66265d01c3a177706402 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-235-55/+134
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/qhttp2protocolhandler_p.h src/network/kernel/kernel.pri src/network/ssl/qsslkey_qt.cpp src/plugins/platforms/cocoa/qcocoascreen.mm src/plugins/platforms/windows/accessible/iaccessible2.cpp src/plugins/platforms/windows/accessible/iaccessible2.h src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.h src/widgets/widgets/qmenu_p.h tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/other/qaccessibility/tst_qaccessibility.cpp tests/auto/testlib/selftests/expected_cmptest.lightxml tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt tests/auto/testlib/selftests/expected_cmptest.xml Done-with: Edward Welbourne <edward.welbourne@qt.io> Change-Id: I4217cc7d840cbae3e3dd28574741544469c4c6b9
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-11-094-50/+131
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qwindow.cpp src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/windows/qwindowssystemtrayicon.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp tests/auto/widgets/kernel/qaction/tst_qaction.cpp Change-Id: Ifa515dc0ece7eb1471b00c1214149629a7e6a233
| | * qudpsocket.pro - fix dependenciesTimur Pocheptsov2017-11-071-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to the problem found in QTcpSocket auto-test recently. While the failure on CI looks differently (apparently, server process starts but does not print anything), fixing the dependency does not hurt and at least fixes the 'make check' scenario. Change-Id: I8f29f3e492d22410533407a527f5fc8f664e7f5c Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| | * QNativeSocketEngine/Win: fix getting the datagram destinationThiago Macieira2017-11-042-46/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Looks like I never even tested this. There were two problems: 1) when we asked for the recvmsg and sendmsg functions, we used the wrong variable (socketDescriptor was still -1) 2) we extracted the destination addresses, but never set them in the QIpPacketHeader object The added tests confirm that this works on Windows, Linux, Darwin, FreeBSD. There also seems to be a problem, obtaining the destination address on an IPv4 socket with a dual-stack sender (I can reproduce that on FreeBSD, macOS and Windows, plus an old version of Linux). Task-number: QTBUG-63605 Change-Id: I638cf58bfa7b4e5fb386fffd14ea732bddbc0c42 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * tst_QTcpSocket::suddenRemoteDisconnect - fix flakynessTimur Pocheptsov2017-10-301-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test starts two processes - server and client - and requires an external executable ('stressTest'). In .pro file we have SUBDIRS containing both 'test' (test itself) and 'stressTest' (client/server app), but there is no explicit dependency and as result we run the test before we build 'stressTest' thus failing to start those processes. This patch makes 'test' dependent on 'stressTest'. Task-number: QTBUG-36629 Change-Id: I286b08bcff86b9afc4bbee87a75e887527eaf5f2 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
| * | Change almost all other uses of qrand() to QRandomGeneratorThiago Macieira2017-11-081-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The vast majority is actually switched to QRandomGenerator::bounded(), which gives a mostly uniform distribution over the [0, bound) range. There are very few floating point cases left, as many of those that did use floating point did not need to, after all. (I did leave some that were too ugly for me to understand) This commit also found a couple of calls to rand() instead of qrand(). This commit does not include changes to SSL code that continues to use qrand() (job for someone else): src/network/ssl/qsslkey_qt.cpp src/network/ssl/qsslsocket_mac.cpp tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5285d43f4afbf Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-09-263-4/+8
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qguiapplication.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h src/plugins/platforms/cocoa/qcocoawindow.h src/testlib/qtestsystem.h Change-Id: I5975ffb3261c2dd82fe02ec4e57df7c0950226c5
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-09-062-4/+4
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/opengl/qopenglwidget/main.cpp src/3rdparty/pcre2/src/pcre2_printint.c src/plugins/platforms/cocoa/qnsview.mm src/widgets/widgets/qcombobox.cpp Change-Id: I37ced9da1e8056f95851568bcc52cd5dc34f56af
| | * Convert features.socks5 to QT_[REQUIRE_]CONFIGStephan Binner2017-09-062-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | The sources were already added conditionally in the project file since 179fe5981fa. Change-Id: I0baaec2e772f3e596d311c1973b9745aa2b80423 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * | QNativeSocketEngine: disable unused methods about OS socket bufferThiago Macieira2017-09-011-0/+4
| | | | | | | | | | | | | | | | | | | | | They aren't used in the API, so let's stop wasting library size. Change-Id: I6e9274c1e7444ad48c81fffd14db247ecf825a57 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Replace Q_NULLPTR with nullptr where possibleKevin Funk2017-09-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remaining uses of Q_NULLPTR are in: src/corelib/global/qcompilerdetection.h (definition and documentation of Q_NULLPTR) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Replace Q_DECL_OVERRIDE with override where possibleKevin Funk2017-09-191-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remaining uses of Q_DECL_OVERRIDE are in: src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.cpp doc/global/qt-cpp-defines.qdocconf (definition and documentation of Q_DECL_OVERRIDE) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: Ib9b05d829add69e98a86238274b6a1fcb19b49ba Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/5.9' into devOswald Buddenhagen2017-08-022-2/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/xcb/qxcbconnection.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp src/plugins/styles/mac/qmacstyle_mac.mm src/widgets/widgets/qdockarealayout.cpp src/widgets/widgets/qmainwindow.cpp src/widgets/widgets/qmainwindowlayout.cpp src/widgets/widgets/qmainwindowlayout_p.h tests/auto/corelib/tools/qlocale/tst_qlocale.cpp tests/auto/other/macnativeevents/BLACKLIST tests/auto/widgets/widgets/qmenu/BLACKLIST Change-Id: Ic8e724b80a65e7b1af25511b0e674d209265e567
| * Fix bytesAvailable() on UDP under WindowsAlex Trotsenko2017-07-301-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When ::WSAIoctl() reports 1 byte available for reading, we are trying to peek an incoming datagram to ensure that the data is actually delivered. But, according to MSDN docs, we are not allowed to pass NULL as 'lpNumberOfBytesRecvd' parameter to ::WSARecvFrom() call, if 'lpOverlapped' parameter is also NULL. The case with an empty datagram is fixed accordingly. Change-Id: Id13038245332d3fb4bc18038d44a7cfd7ce04775 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Use QSharedPointer::create() moreMarc Mutz2017-07-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the result of running the (experimental) clang-tidy check qt-modernize-qsharedpointer-create Discarded changes: - tst_qsharedpointer.cpp: not sure we want these replacements there (→ separate change) - tst_collations.cpp: hit in a template specialization that is instantiated with both QSharedPointer and QSharedDataPointer. Change-Id: I203c2646e91d026735d923473af3d151d19e3820 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-07-042-7/+10
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qprocess_unix.cpp src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/widgets/util/util.pri tests/auto/corelib/thread/qthread/qthread.pro tests/auto/corelib/thread/qthread/tst_qthread.cpp Change-Id: I5c45ab54d46d3c75a5c6c116777ebf5bc47a871b
| * tst_QSocks5SocketEngine::downloadBigFile(): Output elapsed timeFriedemann Kleint2017-06-281-7/+8
| | | | | | | | | | | | | | | | | | Print time in the error handler to get some diagnostics about when the network connection is dropped. Task-number: QTBUG-61673 Change-Id: I376bec81f52d75c9b601f2af9b7e0b63f5883bb0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Blacklist tst_QSocks5SocketEngine::downloadBigFile()Friedemann Kleint2017-06-281-0/+2
| | | | | | | | | | | | Task-number: QTBUG-61673 Change-Id: Id81446e52c6492a22347de708b4785f55a1b0d5d Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-193-1/+16
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/plugins/platforms/android/qandroidplatformintegration.h src/plugins/platforms/windows/qwindowscontext.cpp src/plugins/platforms/windows/windows.pri src/tools/uic/cpp/cppwriteinitialization.cpp src/widgets/doc/src/widgets-and-layouts/gallery.qdoc Change-Id: I8d0834c77f350ea7540140c2c7f372814afc2d0f
| * Ignore test failures of linkLocalIPv6 on RHEL 6.6 in the CISimon Hausmann2017-06-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The test fails as sendmsg() on the socket trying to deliver a packet to the IPv6 link-local fe80 address returns with -ENETDOWN. I cannot figure out why this happens when RHEL 6.6 is run under qemu/kvm but not under vmware. More details are in the task, but meanwhile the result of this test is ignored. This affects only RHEL 6.6, it passes on RHEL 7.2. Change-Id: I4ade5cd249dd0d1901368ab571dad324e0fd10c2 Task-number: QTQAINFRA-1042 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| * Continue to blacklist the utun interfaces on macOSThiago Macieira2017-06-062-0/+14
| | | | | | | | | | | | | | | | | | | | There were two more places that blacklisted certain interface types that commit e579c822c5bedf5e626e4eb72db3b49a4a4015dc didn't catch. This commit adds those two. Task-number: QTBUG-61263 Change-Id: Ia58d0480a9169f0f121aec03bf2e8900a58939cd Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-071-0/+8
|\| | | | | | | | | | | | | Conflicts: src/widgets/widgets/qmenu.cpp Change-Id: I6d3baf56eb24501cddb129a3cb6b958ccc25a308
| * tst_qudpsocket: Blacklist "utun" interfaces on DarwinThiago Macieira2017-05-291-0/+8
| | | | | | | | | | | | | | | | | | | | Packets sent to to link-local addresses on it are never received. We don't know why this happens, as the tooling provided by Apple for development is close to useless. So we just ignore this interface. Task-number: QTBUG-61041 Change-Id: Ia608df1fff6bdee5238e107d8a50292a1f9e5c03 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
* | Add QLocalServer::socketDescriptorJesus Fernandez2017-06-061-0/+2
|/ | | | | | | | | | | | Adds a function to return the native socket descriptor. It allows threaded or forked applications to reuse a previously created socket. [ChangeLog][QtNetwork][QLocalServer] Added a function to retrieve the socket descriptor. Task-number: QTBUG-55043 Change-Id: I556e97000d2c02ad2bdd636984de6c7564381c6a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QWindowsPipeReader: fix possible invalid invocation of ReadFileEx()Alex Trotsenko2017-05-021-0/+12
| | | | | | | | | | | If the user calls QLocalSocket::setReadBufferSize() with a value less than the current size of the pipe buffer, startAsyncRead() would call ReadFileEx() with invalid parameters: ReadFileEx(handle, nullptr, some_big_value, ...); Change-Id: I3d153e3ec34f8038dc001c1c896aeceb666a8979 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix tst_QTcpServer for QEMUSami Nurmenniemi2017-04-201-0/+53
| | | | | | | | | QEMU does not support all syscalls needed for tcp socket testing. Skipped tests that can't pass on QEMU. Task-number: QTBUG-59966 Change-Id: Ib6d12d0fc4c913a0222e13db57f0864b7fdf21ba Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix tst_QUdpSocket for QEMUSami Nurmenniemi2017-03-291-0/+84
| | | | | | | | QEMU does not support all syscalls needed for udp socket testing. Skipped tests that can't pass on QEMU. Change-Id: I40882207a47cfafbc3becb3dff8e7cead9676255 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-134-9/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/network.pro mkspecs/features/mac/default_post.prf src/corelib/io/qfilesystemengine_win.cpp src/corelib/io/qprocess.cpp src/corelib/io/qprocess.h src/corelib/io/qprocess_p.h src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/corelib/thread/qmutex.cpp src/platformsupport/fontdatabases/windows/windows.pri src/plugins/platforms/eglfs/eglfsdeviceintegration.pro tests/auto/corelib/io/io.pro Change-Id: I8a27e0e141454818bba9c433200a4e84a88d147e
| * Properly use the "process" featureUlf Hermann2017-02-274-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | Replace all QT_NO_PROCESS with QT_CONFIG(process), define it in qconfig-bootstrapped.h, add QT_REQUIRE_CONFIG(process) to the qprocess headers, exclude the sources from compilation when switched off, guard header inclusions in places where compilation without QProcess seems supported, drop some unused includes, and fix some tests that were apparently designed to work with QT_NO_PROCESS but failed to. Change-Id: Ieceea2504dea6fdf43b81c7c6b65c547b01b9714 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Network: Use canonical license headersKai Koehne2017-02-281-16/+11
|/ | | | | | | | | Replace outdated LGPL21 with LGPL license header. Use GPL-EXCEPT for all autotests. Also use canonical contact url. Change-Id: I6e5cc8a4285569c4f862730a980f492b8a933a72 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* tst_QSocks5SocketEngine: Refactor testsFriedemann Kleint2017-01-231-88/+52
| | | | | | | | | | | Rewrite tcpSocketNonBlockingTest() and downloadBigFile() to use lambdas for the slots. This allows for removing the related member variables and slots of the test class and ensures no leaks of sockets or inconsistent values. Add an error handler printing the error message to the flaky downloadBigFile() test. Change-Id: Ieb64063c41e045a1a50a6d074bef01753ee319ef Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Fix warnings in tests (MinGW/MSCV)Friedemann Kleint2016-11-291-2/+2
| | | | | | | | | | | | tst_qtcpsocket.cpp:606:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] tst_qtcpsocket.cpp:670:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] tst_qfile.cpp(2661): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) tst_qarraydata.cpp(760): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) main.cpp:40:33: warning: ignoring return value of 'char* fgets(char*, int, FILE*)', declared with attribute warn_unused_result [-Wunused-result] Change-Id: I80ccef29b71af6a2c3d45a79aedaeb37f49bba72 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Fix some warnings in testsFriedemann Kleint2016-11-284-6/+9
| | | | | | | | | | | | | | | | | | ../tst_qfile.cpp: In member function 'void tst_QFile::handle()': ../tst_qfile.cpp:2661:38: warning: ignoring return value of 'ssize_t read(int, void*, size_t)', declared with attribute warn_unused_result [-Wunused-result] tst_qstatictext.cpp:862:58: warning: unused parameter 'textItem' [-Wunused-parameter] ../tst_qtcpsocket.cpp: In member function 'void tst_QTcpSocket::abortiveClose()': ../tst_qtcpsocket.cpp:2254:90: warning: suggest parentheses around assignment used as truth value [-Wparentheses] Test.cpp: In member function 'void My4Socket::read()': Test.cpp:66:20: warning: 'reply' may be used uninitialized in this function [-Wmaybe-uninitialized] ../tst_qlocalsocket.cpp: In lambda function: ../tst_qlocalsocket.cpp:701:51: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] ../tst_qtcpserver.cpp: In member function 'void tst_QTcpServer::linkLocal()': ../tst_qtcpserver.cpp:935:92: warning: suggest parentheses around assignment used as truth value [-Wparentheses] ../tst_qtcpserver.cpp:940:92: warning: suggest parentheses around assignment used as truth value [-Wparentheses] Change-Id: Ic315069768bcb63a6b333c28ac65b0b992b0d43f Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* Fix SCTP API according to Qt conventionsFriedemann Kleint2016-11-221-8/+8
| | | | | | | | inDatagramMode() -> isInDatagramMode() maxChannelCount -> maximumChannelCount Change-Id: Ib64bf52cc3b40354927ee11e3f41d47e84c6d9c4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Modularize configure.json/.priLars Knoll2016-09-151-0/+2
| | | | | | | | | | | | Move the different parts of configure.json/.pri into the libraries where they belong. Gui is not yet fully modularized, and contains many things related to the different QPA plugins. Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Change-Id: I6659bb29354ed1f36b95b8c69e7fce58f642053f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use qtConfig throughout in qtbaseLars Knoll2016-08-196-7/+7
| | | | | | | | | | | Use the new qtConfig macro in all pro/pri files. This required adding some feature entries, and adding {private,public}Feature to every referenced already existing entry. Change-Id: I164214dad1154df6ad84e86d99ed14994ef97cf4 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-161-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/src/qmake-manual.qdoc src/corelib/global/qglobal.cpp src/corelib/tools/qstring.cpp src/network/socket/qabstractsocket.cpp src/network/socket/qnativesocketengine_unix.cpp src/plugins/platforms/eglfs/api/qeglfsglobal.h Change-Id: Id5dfdbd30fa996f9b4b66a0b030b7d3b8c0ef288
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-101-0/+1
| |\ | | | | | | | | | Change-Id: I1a63523de158757964b6fb5ea026cf69a6c5ddcf