summaryrefslogtreecommitdiffstats
path: root/tests/auto/network/kernel/qhostinfo
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2017-08-07 20:52:11 -0700
committerEdward Welbourne <edward.welbourne@qt.io>2017-10-18 09:26:43 +0000
commit3fe74b76fd0eaf39d4c6681e2edca5adbf107883 (patch)
treeb49225508f84dec0a755d6f2f8a7be0f4edd68b7 /tests/auto/network/kernel/qhostinfo
parent3760bc759045c58c548b8f6b8a0a9c1efaa90cd4 (diff)
QHostInfo: Make getaddrinfo() mandatory
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>
Diffstat (limited to 'tests/auto/network/kernel/qhostinfo')
-rw-r--r--tests/auto/network/kernel/qhostinfo/BLACKLIST6
-rw-r--r--tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp15
2 files changed, 10 insertions, 11 deletions
diff --git a/tests/auto/network/kernel/qhostinfo/BLACKLIST b/tests/auto/network/kernel/qhostinfo/BLACKLIST
new file mode 100644
index 0000000000..87c5fe991f
--- /dev/null
+++ b/tests/auto/network/kernel/qhostinfo/BLACKLIST
@@ -0,0 +1,6 @@
+# These tests fail due to a DNS server issue
+# (this is not a Qt bug)
+[lookupIPv6:a-plus-aaaa]
+windows ci
+[blockingLookup:a-plus-aaaa]
+windows ci
diff --git a/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp b/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp
index cb7e66bad4..caf8145c19 100644
--- a/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp
+++ b/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp
@@ -64,14 +64,10 @@
#include <qhostinfo.h>
#include "private/qhostinfo_p.h"
-#if !defined(QT_NO_GETADDRINFO)
-# include <sys/types.h>
-# if defined(Q_OS_UNIX)
+#include <sys/types.h>
+#if defined(Q_OS_UNIX)
# include <sys/socket.h>
-# endif
-# if !defined(Q_OS_WIN)
# include <netdb.h>
-# endif
#endif
#include "../../../network-settings.h"
@@ -204,15 +200,13 @@ void tst_QHostInfo::initTestCase()
ipv6Available = true;
}
-// HP-UX 11i does not support IPv6 reverse lookups.
-#if !defined(QT_NO_GETADDRINFO) && !(defined(Q_OS_HPUX) && defined(__ia64))
// check if the system getaddrinfo can do IPv6 lookups
struct addrinfo hint, *result = 0;
memset(&hint, 0, sizeof hint);
hint.ai_family = AF_UNSPEC;
-# ifdef AI_ADDRCONFIG
+#ifdef AI_ADDRCONFIG
hint.ai_flags = AI_ADDRCONFIG;
-# endif
+#endif
int res = getaddrinfo("::1", "80", &hint, &result);
if (res == 0) {
@@ -224,7 +218,6 @@ void tst_QHostInfo::initTestCase()
ipv6LookupsAvailable = true;
}
}
-#endif
// run each testcase with and without test enabled
QTest::addColumn<bool>("cache");