summaryrefslogtreecommitdiffstats
path: root/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2024-01-26 12:06:46 -0800
committerThiago Macieira <thiago.macieira@intel.com>2024-01-30 13:28:19 -0800
commit4d7b64cd2f927ac2413ed4d8fcb8be042fa083c5 (patch)
tree7fcc75842ad059c799f0da9a22f278d545943b96 /tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp
parent7b981a4f1a60d8bda22f7f1d21cb2c72ec843ea0 (diff)
tst_QHostInfo: enable the IPv6 reverse lookups in more systems
I've noticed that on some Windows systems, the resolver refuses to resolve IPv6-only addresses. But it can still do reverse resolution from IPv6. Change-Id: I5dd50a1a7ca5424d9e7afffd17adfe739ded932e Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp')
-rw-r--r--tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp b/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp
index 5875ae716c..61d929d03d 100644
--- a/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp
+++ b/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp
@@ -398,8 +398,10 @@ void tst_QHostInfo::reverseLookup_data()
QTest::newRow("dns.google") << QString("8.8.8.8") << reverseLookupHelper("8.8.8.8") << 0 << false;
QTest::newRow("one.one.one.one") << QString("1.1.1.1") << reverseLookupHelper("1.1.1.1") << 0 << false;
- QTest::newRow("dns.google IPv6") << QString("2001:4860:4860::8888") << reverseLookupHelper("2001:4860:4860::8888") << 0 << true;
- QTest::newRow("cloudflare IPv6") << QString("2606:4700:4700::1111") << reverseLookupHelper("2606:4700:4700::1111") << 0 << true;
+ if (QStringList hostNames = reverseLookupHelper("2001:4860:4860::8888"); !hostNames.isEmpty())
+ QTest::newRow("dns.google IPv6") << QString("2001:4860:4860::8888") << std::move(hostNames) << 0 << true;
+ if (QStringList hostNames = reverseLookupHelper("2606:4700:4700::1111"); !hostNames.isEmpty())
+ QTest::newRow("cloudflare IPv6") << QString("2606:4700:4700::1111") << std::move(hostNames) << 0 << true;
QTest::newRow("bogus-name IPv6") << QString("1::2::3::4") << QStringList() << 1 << true;
}
@@ -408,10 +410,6 @@ void tst_QHostInfo::reverseLookup()
QFETCH(QString, address);
QFETCH(QStringList, hostNames);
QFETCH(int, err);
- QFETCH(bool, ipv6);
-
- if (ipv6 && !ipv6LookupsAvailable)
- QSKIP("IPv6 reverse lookups are not supported on this platform");
QHostInfo info = QHostInfo::fromName(address);