summaryrefslogtreecommitdiffstats
path: root/tests/auto/network/socket/qlocalsocket
Commit message (Collapse)AuthorAgeFilesLines
...
* Skip unstable autotests in QtBase.Morten Johan Sørvig2014-07-021-0/+4
| | | | | | | | | | | | | | | | 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>
* QtNetwork tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0Sergio Ahumada2014-02-251-1/+0
| | | | | Change-Id: If1cc5fafddc41ed19dd818caf294c69cd4969216 Reviewed-by: Richard J. Moore <rich@kde.org>
* 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>
* 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>
* Whitespace cleanup: remove trailing whitespaceAxel Waggershauser2013-03-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-182-2/+2
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@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>
* 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>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-224-96/+96
| | | | | | | | 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>
* 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>
* Remove some dead code wrapped in Q_WS_QWS.Stephen Kelly2012-08-031-6/+0
| | | | | Change-Id: Ie1ee8c4af603b924abe40145041357981d174445 Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* Set the Qt API level to compatibility mode in all tests.Thiago Macieira2012-08-014-0/+4
| | | | | | | | | | | Qt 5.0 beta requires changing the default to the 5.0 API, disabling the deprecated code. However, tests should test (and often do) the compatibility API too, so turn it back on. Task-number: QTBUG-25053 Change-Id: I8129c3ef3cb58541c95a32d083850d9e7f768927 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* fixed unittest builds for winceBjoern Breitmeyer2012-07-061-14/+0
| | | | | | | | | | removed printsupport tests for wince as there is no print support on wince and removed the special handling for wince from 4.8 on some tests as the dependent modules are not part of qt base anymore Change-Id: I4ffb22da11f98beee1013f775cb5ce4b936d3211 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Don't use obsolete qVariantValue, qVariantCanConvert, etc.Debao Zhang2012-05-021-5/+5
| | | | | | | | | | qVariantValue and qVariantCanConvert are Compatibility members, while in Qt4.8 they are marked as Qt 3 Support Members. qVariantFromValue and qVariantSetValue are Obsolete members. Change-Id: Ie8505cad1e0950e40c6f6710fde9f6fb2ac670fd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Using QLatin1String instead of QLatin1LiteralDebao Zhang2012-04-251-1/+1
| | | | | | | | QLatin1Literal is just a typedef of QLatin1String. Change-Id: If20ca225e57a7fb45a7775f0fc81aedb6da88c96 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fix some compiler warnings in tests.Friedemann Kleint2012-03-271-1/+1
| | | | | | | | - Unused variables - Deprecated conversion from const char * to char *. Change-Id: Iea0b9c4613ea74cead6d95ba12ad1028f531cbff Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* clean up qmake-generated projectsOswald Buddenhagen2012-02-242-14/+0
| | | | | | | | remove "header" and assignmets which are defaults or bogus, reorder some assignments. Change-Id: I67403872168c890ca3b696753ceb01c605d19be7 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* compile fix: missing #include <unistd.h>sMarc Mutz2012-02-231-0/+1
| | | | | Change-Id: I3bd34f67033fb921c49da97419c107811d8da6ff Reviewed-by: David Faure <faure@kde.org>
* Fix the qlocalsocket testAndrew Stanley-Jones2012-02-211-1/+3
| | | | | | | | | | | | | | | | | This test is broken in a couple of ways. A few one line fixes combined into a single patch. 1. Linux is the only OS that does abstract unix domain sockets by prepending a null as the first character. Don't test this on non-Linux platforms and expect it to pass. 2. Change QVERIFY2 to QCOMPARE so we can see why this fails in CI but no on the local system. Use QCOMPARE where possible. Change-Id: Ic3d2cf9696730dc4d6589539fdfe8a48ccf28de5 Reviewed-by: Alex <alex.blasche@nokia.com>
* Allow the QLocalServer to listen to a native descriptorAndrew Stanley-Jones2012-02-151-4/+100
| | | | | | | | | | | | | QLocalServer could only listen to sockets it created. Thi is not always possible as sockets may be passed by socketpair() or have to be created locally by other means. This adds a similar feature to QLocalSocket where a native descriptor maybe used. Change-Id: I43b0af179b3b868dd164d4e1fd312ff4546cf9ff Reviewed-by: Michalina Ziemba <michalina.ziemba@nokia.com> Reviewed-by: Tapani Mikola <tapani.mikola@nokia.com> Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
* Add socketOptions flags to QLocalServerAndrew Stanley-Jones2012-02-101-0/+55
| | | | | | | | | | QLocalServer had no way to set socket options that more complicated servers require. The first set of options allow setting of access control on the sockets. Change-Id: If4268c66462fc2e6cf1e70b1d5f56c76d2c69228 Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
* Fix qlocalsocket autotestHarald Fernengel2012-02-081-19/+11
| | | | | | | | | Lackey is currently not built due to a qscript dependency. Mark the test as an expected failure, so we can resume testing QLocalSocket again. See QTBUG-24142 Change-Id: I2642ed30cf7a2068f30f63801c632fea7dae7691 Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-304-4/+4
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-234-4/+4
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Make socket descriptors qintptr.Jonas M. Gastal2012-01-051-2/+2
| | | | | | | | | | Windows x64 uses 64 bits integer for sockets, to ensure compatibility we should use ptr sized integers for our socket descriptors. Task-number: QTBUG-19004 Change-Id: I4b56023874a4f1bad107c66c054fecfedde33d88 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-054-4/+4
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* fix QMutex warning in tst_QLocalSocket::threadedConnectionJoerg Bornemann2011-12-151-0/+1
| | | | | Change-Id: I5728af1944e44bd976e51d4f0c0a923deacbeea0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Remove TESTED_CLASS/TESTED_FILES comments from tests.Jason McDonald2011-12-061-3/+0
| | | | | | | | | These comments were mostly empty or inaccurate. Appropriate naming of tests and appropriate placement of tests within the directory tree provide more reliable indicators of what is being tested. Change-Id: Ib6bf373d9e79917e4ab1417ee5c1264a2c2d7027 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove debug code from QLocalSocket autotest.Jason McDonald2011-10-311-7/+1
| | | | | | | | | Any test diagnostics that are useful should be part of the regular test output, as the CI system cannot switch on commented-out code when there is a test failure. Change-Id: Ie44b6ea8dd496857ea264f730148d3dc4f5c8324 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* all remaining tests: eliminated usage of qttest_p4.prfRohan McGovern2011-10-251-2/+2
| | | | | | | | | qttest_p4.prf was added as a convenience for Qt's own autotests in Qt4. It enables various crufty undocumented magic, of dubious value. Stop using it, and explicitly enable the things from it which we want. Change-Id: I02fe27b2c1800f929250fa8694ca2976c9661a12 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Move QTRY_VERIFY/QTRY_COMPARE into testlib.Jason McDonald2011-10-191-1/+0
| | | | | | | | These functions have lived in tests/shared/util.h for a long time, but they really belong in qtestlib. Change-Id: I60d569d002dea220b51563931d8b7aa77a20b98b Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Avoid using QSKIP in lieu of compile-time checksJason McDonald2011-10-041-4/+4
| | | | | | | | | | | | | | | | QSKIP is intended to be used to skip test functions that are found at run-time to be inapplicable or unsafe. If a test function can be determined to be inapplicable at compile-time, the entire test function should be omitted instead of replacing the body of the test function with a QSKIP, which only serves to slow down test runs and to inflate test run-rates with empty, inapplicable tests. Task-number: QTQAINFRA-278 Change-Id: I21664d8d92b27c26c64789fc08d0ec7b8988456a Reviewed-on: http://codereview.qt-project.org/5941 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove Symbian-specific code from tests.Jason McDonald2011-09-294-106/+6
| | | | | | | | | Symbian is not a supported platform for Qt5, so this code is no longer required. Change-Id: I1172e6a42d518490e63e9599bf10579df08259aa Reviewed-on: http://codereview.qt-project.org/5657 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Moved network autotests into new directory structureJo Asplin2011-09-0913-0/+1749
Task-number: QTBUG-21223 Change-Id: I55dbf5c42a1c5d938b9e0c9bf7d90457a6c26bbc Reviewed-on: http://codereview.qt-project.org/4259 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>