summaryrefslogtreecommitdiffstats
path: root/tests/auto/network/kernel/qhostinfo
Commit message (Collapse)AuthorAgeFilesLines
* Regenerate projects one last time before mergewip/cmakeAlexandru Croitor2020-02-121-3/+1
| | | | | | Change-Id: Ia24cf56b79ca6dacd370a7e397024e9b663e0167 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Regenerate tests/auto/network/kernelAlexandru Croitor2019-11-131-2/+5
| | | | | Change-Id: I770fce0f0a369204178ea0dfa7bbd8b210dd3585 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge branch 'wip/qt6' into wip/cmakeAlexandru Croitor2019-08-151-1/+16
|\ | | | | | | Change-Id: I50ac36b8803c296998149e98cc61e38687cdd14b
| * Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-07-301-1/+16
| |\ | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/win32/mingw_make.cpp Change-Id: I2f790bc8572bd22fea01edf7ca74595b29f063eb
| | * Merge "Merge remote-tracking branch 'origin/5.12' into 5.13"Qt Forward Merge Bot2019-07-291-0/+13
| | |\
| | | * QHostInfo: Always post results through the event loop to the receiverVolker Hilsheimer2019-07-261-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Lookups performed via QHostInfoRunnable must not synchronously call the user-code's receiver objects, as that would execute user-code in the wrong thread. Instead, post a metacall event through the event loop of the receiver object, or the thread that initiated the lookup. This was done correctly for the trivial cases of empty host name or cached results, so the code generally existed. By moving it from a global function into a member function of QHostInfoResult, we can simply access the required data to construct and post the event. As we process that posted event, we need to check that the context object (which is already guarded via QPointer) is still alive, if we had one in the first place. If we had one, and it's deleted, then abort. [ChangeLog][QtNetwork][QHostInfo] Functors used in the lookupHost overloads are now called correctly in the thread of the context object. When used without context object, the thread that initiates the lookup will run the functor, and is required to run an event loop. Change-Id: I9b38d4f9a23cfc4d9e07bc72de2d2cefe5d0d033 Fixes: QTBUG-76276 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| | * | Add IPv6 data to the reverseLookup testVolker Hilsheimer2019-07-291-1/+3
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Passes locally, and there is no reason why it shoulnd't. Use IPv6 addresses for Google and Cloudflare DNS servers, and as with the IPv4 tests, rely on Python and (as a fallback) nslookup to produce the reference. Change-Id: I584f8ae9bc89c66a1f59d7b1e7493d0ed8033e8a Fixes: QTBUG-22287 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | / cmake: Enable network testLiang Qi2019-07-291-0/+30
|/ / | | | | | | | | | | | | Task-number: QTBUG-74146 Change-Id: Ib29d1531f89676afb2b4df5032529b731ace029d Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Migrate Windows system libs to external dependenciesJoerg Bornemann2019-05-081-1/+1
| | | | | | | | | | | | Started-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Change-Id: I211ce3252b836894aeeac1c85eb316d9596bca57 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-04-102-4/+66
|\| | | | | | | | | | | | | | | Conflicts: mkspecs/win32-clang-msvc/qmake.conf src/gui/image/qpnghandler.cpp Change-Id: Ied79d02912ffb3a307a99483df7db08c7f9d0cd8
| * Populate test data for reverse lookups using system toolsVolker Hilsheimer2019-04-052-4/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardcoding IP addresses and their respective DNS records is fragile. We care about Qt producing the same result as other DNS querying tools, so testing that instead. Running a python script for this is easiest, and assumed to be quite reliable. In case where python fails/is not present, fall back to nslookup. That tool is available on Linux, macOS, and Windows, although the output it produces varies. This change implements very basic line-parsing that can interpret the various results encountered during testing on those platforms. This also reverts commit bbaceff253fae13d8e56691bc9de7e1981db5118, which blacklisted the tests that failed due to changes in DNS records. Use the opportunity to replace usage of gitorious.org. Change-Id: I967de226bd603c805df7fe3ed4e871d92d2d0750 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-03-311-0/+2
|\| | | | | | | | | | | | | Conflicts: src/corelib/configure.json Change-Id: I93ac67f3bf4844bc7c691183e94bceb922b7b919
| * Blacklist the reverse lookup of 8.8.8.8 to unblock integrationsVolker Hilsheimer2019-03-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | The DNS entry for the host has changed, dig answers with dns.google, not with google-public-dns-a.google.com. While developing a proper fix to the test, blacklisting this particular lookup allows integrations to pass in the meantime. Change-Id: Id37da6b24554803bf4e2c84be5b949ded40566e8 Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | tst_qhostinfo: remove dependency on network test serverMårten Nordheim2019-03-151-3/+0
|/ | | | | | Change-Id: Ic66a60bfe80d3ec05e9826939e3739bb5549749d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-11-281-1/+1
|\ | | | | | | Change-Id: Iede384644c3df5ee01b701806dfdb586dd6bb138
| * Stop depending on test.macieira.orgThiago Macieira2017-11-271-1/+1
| | | | | | | | | | | | | | We have had test.qt-project.org for close to 3 years now. Change-Id: I71488efd29b645f7b228fffd14fadf4627288243 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* | Remove failing QVERIFY on bearer managementThiago Macieira2017-10-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | It fails for me on Windows 10. Therefore, this is wrong. FAIL! : tst_QHostInfo::initTestCase() 'networkSession->waitForOpened(30000)' returned FALSE. () S:\qt\qt5-msvc2017-x64\qtbase\tests\auto\network\kernel\qhostinfo\tst_qhostinfo.cpp(194) : failure location Change-Id: Ib17dde1a1dbb49a7bba8fffd14ed5691472a4760 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | MinGW: Globally define WINVER and _WIN32_WINNT to enable Windows 7 APIOrgad Shaneh2017-10-191-3/+0
| | | | | | | | | | Change-Id: I637b33ba6d05f40486d8da927ae5cc5148299348 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | QHostInfo: Make getaddrinfo() mandatoryThiago Macieira2017-10-182-11/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | All systems must implement it by now. If there's any system still without it, that means it has no IPv6 support, so they can disable QtNetwork entirely. [ChangeLog][Deprecation Notice] Starting with Qt 5.10, IPv6 support is mandatory for all platforms. Systems without proper IPv6 support, such as the getaddrinfo() function or the proper socket address structures, will not be able to build QtNetwork anymore. Change-Id: I3868166e5efc45538544fffd14d8c28046f9191b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Add swap and move operator to QHostInfoJesus Fernandez2017-05-161-0/+25
|/ | | | | | | | | | Also mark as shared-come-qt6, [ChangeLog][QtNetwork][QHostInfo] Added swap() and move operator. Change-Id: I8f422868f0487a37aeba3bc74685dc4912e9b3a4 Coverity-Id: 168204 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-131-1/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Use QT_CONFIG(library) instead of QT_NO_LIBRARYUlf Hermann2017-03-061-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | For the windows file system engine, we add an extra macro to use library loading if configured to do so, but avoid it on WinRT, as none of the symbols would be found. We also QT_REQUIRE_CONFIG(library) in the library headers and exclude the sources from the build if library loading is disabled. This, in turn, makes it necessary to clean up some header inclusions. Change-Id: I2b152cb5b47a2658996b6f4702b038536a5704ec Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Add QHostInfo::lookupHost overload with modern connect syntaxJesus Fernandez2017-01-241-0/+72
|/ | | | | | Task-number: QTBUG-56424 Change-Id: I49053ac2859e6c6c07e4a704b8b5f0d6a2d0b8a4 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Use qtConfig throughout in qtbaseLars Knoll2016-08-191-1/+1
| | | | | | | | | | | 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>
* QtNetwork: Remove Windows CE.Friedemann Kleint2016-03-292-13/+1
| | | | | | | | | Remove #ifdef sections for Q_OS_WINCE and wince .pro file clauses in library, examples and tests. Task-number: QTBUG-51673 Change-Id: I3706336395620522ceda414d7437295d9ec64f16 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Add Intel copyright to files that Intel has had non-trivial contributionThiago Macieira2016-01-211-0/+1
| | | | | | | | | I wrote a script to help find the files, but I reviewed the contributions manually to be sure I wasn't claiming copyright for search & replace, adding Q_DECL_NOTHROW or adding "We mean it" headers. Change-Id: I7a9e11d7b64a4cc78e24ffff142b506368fc8842 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Updated license headersJani Heikkinen2016-01-211-17/+12
| | | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into devFrederik Gladhorn2016-01-081-0/+2
|\ | | | | | | | | | | Based on merge done by Liang Qi Change-Id: Id566e5b9f284d29bff2199f13f9417c660f5b26f
| * winrt: Use winsock2 API for hostname resolution on WinRT/WinPhoneOliver Wolff2016-01-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That API has been available for WinRT and Windows Phone for some time now. By using it to get the machine name and for hostname resolution we can get rid of some winrt-only code and use qhostinfo_win.cpp on WinRT and Windows phone as well. Additionally the required capability was added to tst_qhostinfo so that this auto test can be run without any manual editing. Change-Id: I63fa5521bf8cdb0c919bd5a0100ea977c865622a Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* | Tests: Remove empty init/cleanup slots, constructors and destructors.Friedemann Kleint2015-12-101-21/+1
|/ | | | | | | | Move some code (like registrations of meta types) from init() to initTestCase() in the process. Change-Id: I57db5156647cfadab554fbed853b2e68b2815f3b Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Tests: Replace Q[TRY]_VERIFY(v == true|false) by QVERIFY(v)|QVERIFY(!v).Friedemann Kleint2015-07-271-3/+3
| | | | | | | | Preparing the replacement of Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) for non-boolean types. Change-Id: Iab6ec2f0a89a3adc79e18304573994965013dab5 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* fix usage of wince scopeOswald Buddenhagen2015-06-051-1/+1
| | | | | | | Fix style issues along the way. Change-Id: Ic6a6de28e198eb0b14c198b802e78845703909b9 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Tests: Remove tst_QHostInfo::abortHostLookupInDifferentThread() testCaroline Chao2015-05-132-24/+0
| | | | | | | | | | This test has been initially blacklisted. However it is racy by design and cannot be fixed. Removing it. Change-Id: I6c386a12e54d8a382f17c4fc033428f56eb03f02 Task-number: QTBUG-23837 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Tests: Blacklist tst_QHostInfo::abortHostLookupInDifferentThreadCaroline Chao2015-04-272-2/+3
| | | | | | | | | | Remove the insignificant_test CONFIG option in favor of a BLACKLIST file. This test has been found failing on OpenSuse in CI. Change-Id: Ibc6af3c30277fec7e422e8bbeccd9437de2a61ce Task-number: QTBUG-23837 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Oswald Buddenhagen2015-03-021-1/+1
|\ | | | | | | Change-Id: I95b3a87c5068c6b8068b30a35655b4c2419e7f9e
| * Revert "Update the DNS and name-resolver tests to the official zone"Thiago Macieira2015-03-011-1/+1
| | | | | | | | | | | | | | | | | | | | This reverts commit 24c52bd44b700725d4feec0d2e05a7e382e59c4e and makes the Qt unit tests requiring DNS zones to use the temporary test zone in macieira.org (Thiago's domain). Change-Id: Ia0aac2f09e9245339951ffff13c6d3752c83b773 Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com> Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
* | Update copyright headersJani Heikkinen2015-02-111-7/+7
|/ | | | | | | | | | | | | | | | | | 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>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@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>
* 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_qhostinfo requires `private_tests' setSergio Ahumada2014-01-151-0/+1
| | | | | | | | | | | | | | | | | | Otherwise you get: undefined reference to `qt_qhostinfo_clear_cache()' Change-Id: I32313f290b9e4236440ae01afe12285d4539be60 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>
* | WinRT: Fix various test compilationsAndrew Knight2013-10-021-1/+1
|/ | | | | | | | | | | | | - Remove irrelevant test subdirs via .pro files - Follow WinCE codepaths where applicable - Replace unsupported Win32 APIs with WinRT equivalents This does not aim to fix any failures in the tests themselves; it only makes them compile. Change-Id: Ia82bc0cc402891f8f6238d4c261ee9152b51be80 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Update the DNS and name-resolver tests to the official zoneThiago Macieira2013-06-071-1/+1
| | | | | Change-Id: I02feb8029461383f38bcbdca138789b119a58b5a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Autotest: Use the new test zone in all name-lookup unit testsThiago Macieira2013-05-071-23/+27
| | | | | | | | | | I also modified tst_QDnsLookup the test to use ';' as a separator as opposed to spaces because I added MX and SRV records with multiple RRs. Change-Id: I62c7b6ad342c1bb23c4d9ac9730e35ab422e3ea2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add support for getaddrinfo using MinGW in tst_qhostinfoJonathan Liu2012-11-222-8/+5
| | | | | | | Change-Id: Ief9ddd22171ec2b852ca504957e0e11b90badccb Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use qt-project.org in tst_hostinfo - qt.nokia.com changed IP address.Janne Anttila2012-10-311-7/+7
| | | | | | | | | qt.nokia.com is also going to disapper in future, so I think it is better to use qt-project.org. Change-Id: Ice550fe657a33609472b8e4b8630d7649f9c9fb5 Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* normalise signal/slot signatures [QtNetwork tests]Marc Mutz2012-10-191-5/+5
| | | | | Change-Id: I2491cfe421a811d00759224da03580b3dcc2a091 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Fix MinGW/gcc warning about NOMINMAX being redefinedKai Koehne2012-09-261-1/+1
| | | | | | | | | 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>