summaryrefslogtreecommitdiffstats
path: root/tests/auto/network/socket
Commit message (Collapse)AuthorAgeFilesLines
* Update license headers and add new license filesMatti Paaso2014-09-2415-285/+165
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Fix QAbstractSocket::readData() behavior on buffered socketAlex Trotsenko2014-09-231-0/+53
| | | | | | | | | Remove an useless check which spontaneously allow direct reads from the socket engine. Change-Id: Ia3d2a572d6f1563d613fe2f00d0d6849df259827 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Skip unstable autotests in QtBase.Morten Johan Sørvig2014-07-022-0/+7
| | | | | | | | | | | | | | | | The combination of these unstable tests makes it very hard to get changes through the CI system due to the unrelated test failures. Skip the following test functions: tst_QIODevice::unget QTBUG-39983 (Mac) tst_QThreadPool:expiryTimeoutRace QTBUG-3786 (Windows) tst_QLocalSocket::processConnection QTBUG-39986 (Mac) tst_QTcpServer::adressReusable QTBUG-39985 (Linux) Change-Id: I96559bea0d437fd25966b6ccac1ece1490e06241 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Android: Fix compilation of qtcpsocket testEskil Abrahamsen Blomfeldt2014-06-301-2/+2
| | | | | | | No pthread_yield() in the Android NDK. Change-Id: I5ff77c55f30c172ee7fefb1129bdf475b318449e Reviewed-by: BogDan Vatra <bogdan@kde.org>
* tst_qtcpsocket: fix comment, the slot goes to 512David Faure2014-06-091-1/+1
| | | | | Change-Id: Ia0c5b29d6e02c9fda0b1da4a2779f1cbe9b1d747 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Socks5 socket engine test: Disable UDP over Socks testPeter Hartmann2014-05-211-10/+4
| | | | | | | | | | | ... because it fails on the new network test server. The Socks5 tests in QUdpSocket have already been disabled by commit aa3eaf9d2ec4927df51e7d773a66f68ec5e4fce9 . Task-number: QTBUG-35490 Change-Id: Ib062adb422ff6e5538f14d15a266d79c3bb53956 Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
* QTcpSocket auto test: Temporarily disable Socks5 testsPeter Hartmann2014-04-251-4/+4
| | | | | | | | | ... because they are too unstable. We can check whether they are more stable once the new network tests server is in place. Task-number: QTBUG-38385 Change-Id: I5ced7cc1f89290812aa88f174a41965fd2ef7252 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Fix network tests relying on troll.noSimo Fält2014-03-131-1/+1
| | | | | | | | Replacing old troll.no domain with qt-project.org domain. Using troll.no doesn't work anymore. Change-Id: Ic6fa71b044d1adbdc66c875b47bfdc256a2afc8e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* QtNetwork tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0Sergio Ahumada2014-02-2512-12/+0
| | | | | Change-Id: If1cc5fafddc41ed19dd818caf294c69cd4969216 Reviewed-by: Richard J. Moore <rich@kde.org>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-01-201-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.h src/corelib/tools/qstring.cpp src/gui/image/image.pri src/gui/image/qimage.cpp src/plugins/platforms/cocoa/qcocoawindow.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/eglfs/qeglfshooks_stub.cpp tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp Change-Id: I3b9ba029c8f2263b011f204fdf68c3231c6d4ce5
| * test: tst_qhttpsocketengine requires `private_tests' setSergio Ahumada2014-01-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | Otherwise you get: undefined reference to `vtable for QAbstractSocketEngine' when -developer-build is not used. Change-Id: I444140736a6bf736894dc12a20f6a4d48af2678e Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
* | Replace win32-g++ with mingw scopeKai Koehne2014-01-171-1/+1
| | | | | | | | | | | | | | | | Commit 773dd01 introduced a general mingw platform scope, which is cleaner and more flexible than matching the spec name. Change-Id: Ie3a9cb791a83f7c8a51bc4e23069190c452ab521 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | expand tabs and related whitespace fixes in *.{cpp,h,qdoc}Oswald Buddenhagen2014-01-131-1/+1
| | | | | | | | | | | | | | | | the diff -w for this commit is empty. Started-by: Thiago Macieira <thiago.macieira@intel.com> Change-Id: I77bb84e71c63ce75e0709e5b94bee18e3ce6ab9e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Simon Hausmann2013-12-231-1/+16
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-12-161-1/+16
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qplatformtheme.h tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp Change-Id: Iecd3343d6a050b8764f78d809c4a1532aeba69e5
| | * QUdpSocket auto test: disable Socks5 over UDP for new test serverPeter Hartmann2013-12-101-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... because they fail on the new test server. This commit can be reverted once the Socks5 socket engine is fixed. Task-number: QTBUG-35490 Change-Id: I85635d4b44d26168d40a56b7a121693297564f0f Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* | | QAbstractSocket: fix setReadBufferSize from readyRead slot.David Faure2013-12-201-0/+53
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a slot connected to readyRead, if the app detects that the buffer size is too small and increases it, it expects that readyRead() will be emitted again. setReadBufferSize() doesn't re-enable the socket notifier when calling from within readyRead, and readyRead itself was missing the code to do it. Change-Id: Ia00a3066ad3ba09d5cfae0716adc5691ae96c3fa Done-with: Thiago Reviewed-by: Peter Hartmann <phartmann@blackberry.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | WinRT: Fixed compilation of network autotests and benchmarksOliver Wolff2013-12-065-2/+94
| | | | | | | | | | Change-Id: Id689f199cfb22dce231cec36faba57ab958b1bac Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
* | Remove trailing space from QDebug streamKai Koehne2013-12-061-1/+1
|/ | | | | | | | | | | It's unexpected that all messages generated by the stream version of qDebug and friends have a trailing space. It also makes switching to categorized logging (which only supports the stream version) difficult, since all autotests checking for debug output would have to be adapted. Task-number: QTBUG-15256 Change-Id: I8d627a8379dc273d9689f5611184f03607b73823 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/stable' into devSergio Ahumada2013-09-071-1/+1
|\ | | | | | | Change-Id: I9ee4176f0a0078908d49896508826154c9f71530
| * QTcpSocket auto test: rely on IMAP port, not SMTP portPeter Hartmann2013-08-271-1/+1
| | | | | | | | | | | | | | | | The new test server image will not have a SMTP service installed, and the network self test does not check for that either. Change-Id: I1063777832148e184de4ddf21d9154364f644e1e Reviewed-by: Richard J. Moore <rich@kde.org>
* | Add QT_NO_PROCESS guards in tests where they are missingAndrew Knight2013-09-031-0/+4
| | | | | | | | | | | | | | | | | | | | A handful of tests lack QT_NO_PROCESS guards, making them non-compilable on Qt builds with no QProcess support. This commit does not change QProcess-specific tests, which should be left out of the build using the .pro file mechanism. Change-Id: Iac8562428abc1f59ccbb23bf5c3a919785e41f12 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Include sockLib header to enable usage of socket functions on VxWorksPasi Petäjäjärvi2013-08-061-0/+4
| | | | | | | | | | | | | | | | Functions normally found from <sys/socket.h> are available on VxWorks from <sockLib.h> header. Change-Id: I2263ec40ba9f37bc95755b633fb43d66ceb2777c Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-07-231-3/+57
|\| | | | | | | | | | | | | Conflicts: tests/auto/dbus/qdbusabstractinterface/tst_qdbusabstractinterface.cpp Change-Id: I18a9d83fc14f4a9afdb1e40523ec51e3fa1d7754
| * Ignore or suppress warning and debug messages in tst_QLocalSocketThiago Macieira2013-07-201-3/+6
| | | | | | | | | | | | | | | | | | | | | | The one in tst_QLocalSocket::writeToClientAndDisconnect just needed proper ordering: that's what waitForDisconnect is for. At the same time, we need to make sure we get the same message from all three implementations of QLocalSocket::waitForDisconnect (and without the useless space at the end). Change-Id: I21364263cf908df022df814a6a39fcb5783e84e6 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
| * Fix incomplete override of QIODevice::open in QProcess and QLocalSocketThiago Macieira2013-07-201-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rule for a new override is that it must still work if the old implementation is called. The catch is that any class that derives from QProcess and isn't recompiled will still have QIODevice::open in its virtual table. That is equivalent to overriding open() and calling QIODevice::open() (like the tests). In Qt 5.0, QProcess::start() called QIODevice::open directly, not the virtual open(), so there's no expectation that a user-overridden open() be called. With that in mind, simply fix QProcess::start to not call the virtual open at all. Similarly with QLocalSocket, the calls to open were always non-virtual. Task-number: QTBUG-32284 Change-Id: I88925f0ba08bc23c849658b54582744997e69a4c Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
| * Add a test for QLocalSocket::openThiago Macieira2013-07-201-0/+23
| | | | | | | | | | | | | | | | This should have been done in the commit that introduced open (953255abab0f99afe7559da93ba18a876805d78d), but was missing. Change-Id: I1c2de4ad5fa42aa5b90646e7d4d7d1b1570a0f87 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | QTcpSocket bind() auto test: return instead of QSKIPPeter Hartmann2013-04-051-1/+1
|/ | | | | | | | | ... because SkipSingle was removed in Qt5, and a QSKIP would result in the SSL tests not being executed. This can be reverted once QTBUG-29972 is fixed. Change-Id: I3663ee52f00c3f4391ce78cf63bd444656d79cb3 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Whitespace cleanup: remove trailing whitespaceAxel Waggershauser2013-03-164-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove all trailing whitespace from the following list of files: *.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README excluding 3rdparty, test-data and auto generated code. Note A): the only non 3rdparty c++-files that still have trailing whitespace after this change are: * src/corelib/codecs/cp949codetbl_p.h * src/corelib/codecs/qjpunicode.cpp * src/corelib/codecs/qbig5codec.cpp * src/corelib/xml/qxmlstream_p.h * src/tools/qdoc/qmlparser/qqmljsgrammar.cpp * src/tools/uic/ui4.cpp * tests/auto/other/qtokenautomaton/tokenizers/* * tests/benchmarks/corelib/tools/qstring/data.cpp * util/lexgen/tokenizer.cpp Note B): in about 30 files some overlapping 'leading tab' and 'TAB character in non-leading whitespace' issues have been fixed to make the sanity bot happy. Plus some general ws-fixes here and there as asked for during review. Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Fix warnings about overloaded virtuals in tests (CLANG).Friedemann Kleint2013-03-121-2/+2
| | | | | | Change-Id: I2f96073c4aaf4b11221b98cc6c7031b253a3b45c Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Fix warnings about unused field variables (CLANG).Friedemann Kleint2013-03-061-1/+0
| | | | | Change-Id: I488ad18eb0389d1e9b8b695b7a02eca47bee687e Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Return -1 as the API documents it for socket issuesLaszlo Papp2013-03-051-1/+1
| | | | | | Task-number: QTBUG-30024 Change-Id: I51498e6d74ab139134abfb94f35647e995319ee8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-1815-15/+15
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix incorrectly disabled autotestShane Kearns2013-01-111-1/+1
| | | | | | | | One of the IPv6 autotests was always disabled instead of being disabled only when the system has no IPv6 support. Change-Id: I34dffbeae6ba85a706bfeb0cc4750a4514b73a65 Reviewed-by: Peter Hartmann <phartmann@rim.com>
* Network: Remove declaration of built-in and automatic metatypes.Stephen Kelly2013-01-032-5/+0
| | | | | | | | | These types are either built-in or 'automatically declared' and so don't need to be explicitly declared as metatypes. Change-Id: Ifdce72af844901665c4ebab11507216ba5f00fc1 Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Remove metatype registration of built-in types.Stephen Kelly2013-01-031-1/+0
| | | | | | | | As they are built-in, they are effectively registered at compile-time already. Change-Id: I7ae6ba16088eab5d19213fa7b07c2a7760988a86 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* speed up tst_QLocalSocket::readBufferOverflowJoerg Bornemann2012-11-021-0/+9
| | | | | | | | Ifdef out waitForBytesWritten on Windows. See comment in source. Change-Id: I7a2268d2634c2524cd8291c72dd9708e430e314e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* test: Don't fail if the network test server is not set upSergio Ahumada2012-10-252-2/+4
| | | | | | | | Not having access to a network test server is not a failure per se but rather an enviromental condition not met at run-time. Change-Id: Ie7d10ca5fbf2df45fb1fd1ac19718c9fae855c03 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* fix flakiness of tst_qlocalsocket::processConnectionJoerg Bornemann2012-10-251-14/+20
| | | | | | | | | QSystemSemaphore is persistent after a crash and we'd have to toggle the Open/Create flag. Waiting for the server being available by trying to connect is much more reliable. Change-Id: I510814cef189b43658911f8ade3cf831ae6c7e58 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* tst_qlocalsocket: get rid of QtScript dependencyJoerg Bornemann2012-10-199-384/+197
| | | | | | | | | | | | | | | Removing the lackey executable that needs QtScript to be built. This was a qscript bastard that was able to run a client and a server script. It's replaced by a C++ version with the same functionality. Nice side effect: the two second wait per test row could be removed. The client executable is now waiting for the server to be created. Task-number: QTBUG-24142 Change-Id: I135b75abf6620d3b0af50dc226ea8c81c2bf4149 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* typo fixed in tst_QLocalSocket::verifyListenWithDescriptor_dataJoerg Bornemann2012-10-021-1/+1
| | | | | Change-Id: Ic549c8fa7f98052a45b391d6a9bfef3d2557c709 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* remove tests/auto/network/socket/qlocalsocket/exampleJoerg Bornemann2012-10-026-196/+0
| | | | | | | | | | The programs in the example isn't used in the test. Examples should be in the right directory and be of a certain quality. Change-Id: Id77bd1295efb3387fa54c379eb9c882cdc5b88bd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* make tst_QLocalSocket::listenAndConnect fasterJoerg Bornemann2012-10-021-4/+2
| | | | | | | Replaced qWait/QCOMPARE with QTRY_COMPARE. Change-Id: Ic534443c187f791c75fe9528251bf47e54f33eed Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Fix MinGW/gcc warning about NOMINMAX being redefinedKai Koehne2012-09-262-2/+2
| | | | | | | | | Commit 5230d62fe added a #define NOMINMAX, which conflicts with a NOMINMAX definition in the MinGW headers. Just use the same definition as in MinGW to fix the gcc warning. Change-Id: Ib21dd323ebbdca5d143e394c7631303e0c72541a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* If accept fails, stop accepting new connections and emit error signal.Jonas M. Gastal2012-09-261-0/+21
| | | | | | Task-number: QTBUG-24778 Change-Id: I6c5b685b3f861a0fafc1475c41bb35cede17d712 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2217-408/+408
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Remove old troll test servers' references.Leonard Lee2012-09-101-15/+15
| | | | | | | | | | | | Replaced with qt-project.org test domain. The connectToMultiIP auto test is still disabled due to lack of test infrastructure. Task-number: QTBUG-23294 Change-Id: Icf01aabb0ae503291abdda4e8f773f8e0a08931a Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* test: Check for null string comparisonSergio Ahumada2012-09-051-6/+6
| | | | | | | Do not compare a QString to QString(). Instead use the .isEmpty() method. Change-Id: I8bb5e64563bf173abe7288bb9e35375bee1fe445 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Fix spelling errorsSergio Ahumada2012-08-171-1/+1
| | | | | Change-Id: Ibae8d10183f6b15a16b1499daa2df8802dbb014e Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
* tst_QUdpSocket: Remove unneeded ./ in application name printingMarc Mutz2012-08-151-2/+2
| | | | | | | Reported-by: Shane Kearns <shane.kearns@accenture.com> Change-Id: I12f2a23b98c3b0161a2961a9117c196cd7d72a6d Reviewed-by: Shane Kearns <shane.kearns@accenture.com>