summaryrefslogtreecommitdiffstats
path: root/tests/auto/network/socket
Commit message (Collapse)AuthorAgeFilesLines
...
* Removing QHttpHeader and QHttpResponseHeader.Jonas M. Gastal2012-01-191-1/+1
| | | | | | | | | QAuthenticator used it for the convinience of QHttpSocketEngine only. QHttpSocketEngine has now been ported to use QHttpNetworkReply to parse HTTP responses. Change-Id: Idf6e70aa76613aad6e3d789d81ca1b4fd73575c2 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* Fixed build break when bearer is disabled.Xizhi Zhu2012-01-161-0/+2
| | | | | Change-Id: I29e88b046f6502c84acc9c6f566ecc328cf24e38 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* Fixes examples/tests to use qinptr in QTcpServer::incomingConnection.Jonas M. Gastal2012-01-132-2/+2
| | | | | | | | This is a fix for problems introduced by bf7f170. Change-Id: If5dd8e031ef2efea578b3efb188c2e950e1ba41a Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Flag test as expected failure for Ubuntu 11.10 x64.Toby Tomkins2012-01-122-0/+4
| | | | | Change-Id: I05ff434581f48d4d3ede7ecb59208821a2ab3e7d Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Removing QHttp class, its tests and its usage in examples.Jonas M. Gastal2012-01-062-2/+0
| | | | | | Task-number: QTBUG-22750 Change-Id: I161fad772bfb26797e6ee9d69da925b6747c371f Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Make socket descriptors qintptr.Jonas M. Gastal2012-01-054-13/+13
| | | | | | | | | | 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-0517-17/+17
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* tests: use contains(QT_CONFIG,private_tests) consistentlySergio Ahumada2012-01-021-5/+4
| | | | | | | | | | | | | | These tests used requires(contains(QT_CONFIG,private_tests)) in their .pro file, but did not subtract themselves from their parent project SUBDIRS when private_tests weren't enabled. In the best case, this wastes a little time as qmake iterates over these projects which won't be built. In some worse esoteric cases, this may break compilation or packaging. Change-Id: If36b1b8f69c3509128786fec67899ae18ffaa2bc Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Flag udpTest as insignificant, fails on Ubuntu 11.10 x64.Toby Tomkins2011-12-301-0/+3
| | | | | | | | | | This testcase fails on the Ubuntu 11.10 x64 platform, add flag to .pro file so test is ignored on this platform. Task-number: QTBUG-23380 Change-Id: I51831df8c8e9bfcf63d3689e37552ca1a62691cd Reviewed-by: Thiago Macieira <thiago.macieira@intel.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 QtWidgets dependency from QTcpSocket autotestShane Kearns2011-12-093-33/+12
| | | | | | | | | | | | | | QMessageBox was being used to test nested event loops. This has been changed to use QEventLoop directly. Also, there was an unnecessary use of QPushButton to trigger a test case, which has been removed. As a result, 3 test cases can be run on VXWORKS, and one more test case on Windows that were previously skipped. Change-Id: Ic65ed441cd37d242f89df3ef3b8638a1458d9cf3 Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Fix unstable test caseShane Kearns2011-12-092-2/+1
| | | | | | | | | | | | | tst_QTcpSocket::disconnectWhileLookingUp required the host lookup + connect + disconnect procedure to complete in <50ms, which is not always true. When disconnecting (rather than aborting with close()), wait for the disconnection to complete with a timeout of 5 seconds. Task-number: QTBUG-21043 Change-Id: I3b59abf9a8eb2c6d99416e1a8ec6b528885b656e Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Fix failing setSocketDescriptor test in QTcpSocketShane Kearns2011-12-091-0/+1
| | | | | | | | | | setSocketDescriptor fails because socket is in the wrong state. This is timing dependent, if qt-test-server is still in the DNS cache then the test failed. - clear the DNS cache to avoid the host lookup state being skipped. Change-Id: If159d514b1aa9b62a4834f6352d5e7b0a00a5724 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* Skip untestable interfaces in QTcpSocket::bind autotestShane Kearns2011-12-061-1/+5
| | | | | | | | | | | | | | | bind() test failed if there is an autoconfigured IPv4 address. e.g. bluetooth adaptor that is not attached to a network. Or WLAN adaptor in peer-peer mode. - solved by skipping the autoconfigured IPv4 addresses in the same way as IPv6 addresses are already skipped bind() test fails for proxy - skipped, QTBUG-22964 created Change-Id: I9a799ae8db421783f474e97cf876d6e265516397 Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
* Remove TESTED_CLASS/TESTED_FILES comments from tests.Jason McDonald2011-12-066-16/+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>
* Fix QTcpServer::serverAddress() for dual stack socketsShane Kearns2011-12-012-1/+39
| | | | | | | | | | When listening on QHostAddress::Any, serverAddress() should return QHostAddress::Any too, assuming that setting the socket options was successful. Task-number: QTBUG-22899 Change-Id: I50a9ff1b4ad0c1c1905e2952c595d7068df2627d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix sanity check of network test serverJason McDonald2011-11-286-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of Qt's autotests depend on access to a test server. For each test that used the test server, tests/auto/network-settings.h created a global object to verify at startup that host lookups to the test server will succeed (and abort the test otherwise). There are two problems with that approach: First, the sanity check happens before main(), and thus before the test framework has started logging test results. This means that if the sanity check aborts the test, the failure message will not be visible in the test output if logging to a file or will cause the output to be malformed if logging to the console in XML format. Second, since Qt 4.7, the host lookup uses a class that connects to the QCoreApplication instance, which doesn't exist before main(), and this caused all tests that included network-settings.h to output an error message from QObject::connect() at the beginning of the test. Both of these problems are solved by removing the global object from network-settings.h and instead performing the sanity check in the initTestCase() function of each test. Task-number: QTBUG-22876 Change-Id: Id49c1826906327bf571686cc11527f0265e5af44 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Don't depend on moc to disable test functions.Jason McDonald2011-11-183-43/+34
| | | | | | | | | | | | | | | | | | | | | The moc tool is not aware of all defines (particularly those that are compiler builtins) and does not correctly evaluate others that depend on compiler builtins, such as Q_OS_FOO. This commit reverts parts of the following commits, but is not a complete fix as there were many instances of this problem in the tests prior to those commits: 924d810dbdcd5b5b0fa860922b2487ea9062d002 8aaff6751038b88d17e23be6fcee945771297c5b 338d3f11973412047c2c9cd41cbd0c961d738ef3 a55034062ba2bf73a9f1ed3d9cf31745b38149e3 253497b7446c7d723aa3bdd7152e25d6852f2604 7cfad460c56319ba89c4a3a0bbcb2e54ab1cdbc6 9d2ff58f3642828e494e7e9b2df7dbb8e2cd408f 0cf6baa2d61ebaad2a2a0530c37f27e719b68f4b Change-Id: I947d797fe3ec76139ba1b55561cea569895662c5 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Move support for socket binding from QUdpSocket upstream to QAbstractSocket.Robin Burchell2011-10-311-0/+61
| | | | | | | | | This should be API-compatible with Qt 4, but is not ABI-compatible, due to removing the enum from QUdpSocket. Task-number: QTBUG-121 Change-Id: I967968c6cb6f96d3ab1d6300eadd5bde6154b300 Reviewed-by: Thiago Macieira <thiago.macieira@intel.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>
* Re-enabled testsJo Asplin2011-10-261-2/+0
| | | | | | | | | | | | This commit re-enables tests that are assumed to be ok by now, since they: - Have been passing in CI for a long time recently (more precisely, not failed once in pulse run range 730-829). - Did not have any known issues associated with them. Note that not all of these tests were disabled as a result of QTBUG-21402. Task-number: QTBUG-21402 Change-Id: I80bbf8b351bd9165aa968e98f4dc17e8be6bc7c3 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* all remaining tests: eliminated usage of qttest_p4.prfRohan McGovern2011-10-258-16/+20
| | | | | | | | | 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>
* Remove SkipMode parameter from QSKIP calls.Jason McDonald2011-10-213-48/+35
| | | | | | | | | The previous commit removed SkipMode from the testlib APi. This commit removes the parameter from all calls to QSKIP. Task-number: QTBUG-21851, QTBUG-21652 Change-Id: I21c0ee6731c1bc6ac6d962590d9b31d7459dfbc5 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Move QTRY_VERIFY/QTRY_COMPARE into testlib.Jason McDonald2011-10-192-2/+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>
* Fix platformsocketengine test failuresShane Kearns2011-10-121-4/+17
| | | | | | | | | | | | The platformsocketengine autotest uses the native socket engine directly rather than through QAbstractSocket. The bind tests were failing because the autotest was creating a socket with IPv4 (AF_INET) and then binding with QHostAddress::Any (AF_INET6). A linux kernel update caused this to start failing on the test machines. Change-Id: Iea62f3d56dbfb35fcb952dcf00313578eb2bd764 Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
* Avoid using QSKIP in lieu of compile-time checksJason McDonald2011-10-071-6/+3
| | | | | | | | | | | | | | | | 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: I95feba3edbfa092c0ef4d85bb8c6877bd6be698e Reviewed-on: http://codereview.qt-project.org/6128 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Avoid using QSKIP in lieu of compile-time checksJason McDonald2011-10-045-50/+54
| | | | | | | | | | | | | | | | 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-2923-392/+22
| | | | | | | | | 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>
* Disabled tests for refactor->master integrationJo Asplin2011-09-131-2/+1
| | | | | | | | | | | | | | | | | | | | | | | This change disables failing tests to increase the likelihood that 'make check' terminates with a zero exit status. This is done to prevent the CI system from blocking further commits once qtbase#refactor is merged into qtbase#master. Failing tests are marked as insignificant (by putting 'CONFIG += insignificant_test' in the .pro file). Note: This is a temporary measure that needs to be cleaned up once the refactor->master integration is complete. Ideally all disabled tests need to be enabled and passing. All changes will be marked by the string QTBUG-21402 in a comment for easy location. Task-number: QTBUG-21402 Change-Id: Ic4400671671f6d9b75b106a6aa4755b20e74378d Reviewed-on: http://codereview.qt-project.org/4678 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Moved network autotests into new directory structureJo Asplin2011-09-0949-0/+10082
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>