qt6-bb10/tests/auto/network/kernel
Thiago Macieira c2df419edf tst_QDnsLookup: add the ability to specify an alternate default server
For people running this test who are burdened with a broken DNS server
and for whom the check added in the previous commit fails, skipping the
test.

Incidentally, this is useful for developing QDnsLookup itself, because
some otherwise-reasonable servers are known to fail for some queries.
For example, dnsmasq doesn't like queries of type ANY:

SKIP   : tst_QDnsLookup::lookup(any-a-single) Server refused or was unable to answer query; a-single type ANY: Server failure
SKIP   : tst_QDnsLookup::lookup(any-a-plus-aaaa) Server refused or was unable to answer query; a-plus-aaaa type ANY: Server failure
SKIP   : tst_QDnsLookup::lookup(any-multi) Server refused or was unable to answer query; multi type ANY: Server failure

Now I can get it to pass with QTEST_DNS_SERVER='[2001:4860:4860::8888]':

PASS   : tst_QDnsLookup::lookup(any-a-single)
PASS   : tst_QDnsLookup::lookup(any-a-plus-aaaa)
PASS   : tst_QDnsLookup::lookup(any-multi)

Note for the future: setting a non-default server may exercise different
code paths inside QDnsLookup, so this is not a replacement for having
proper DNS servers in the CI.

Fixes: QTBUG-129335
Change-Id: I81dcd4834972efa84c9ffffdd8aaafb68f20560b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 10fea78bdcad2086c980fa1c1bbcd5bb543e4366)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-10-03 03:43:01 +00:00
..
qauthenticator Change license for tests files 2024-02-04 09:56:42 +01:00
qdnslookup tst_QDnsLookup: add the ability to specify an alternate default server 2024-10-03 03:43:01 +00:00
qdnslookup_appless Change license for tests files 2024-02-04 09:56:42 +01:00
qhostaddress Change license for tests files 2024-02-04 09:56:42 +01:00
qhostinfo tst_QHostInfo: increase the timeout to 15s 2024-03-13 18:29:12 -07:00
qnetworkaddressentry Change license for tests files 2024-02-04 09:56:42 +01:00
qnetworkdatagram Change license for tests files 2024-02-04 09:56:42 +01:00
qnetworkinformation Change license for tests files 2024-02-04 09:56:42 +01:00
qnetworkinformation_appless Change license for tests files 2024-02-04 09:56:42 +01:00
qnetworkinterface Android: prefer wlan IPv6 connection over other interfaces 2024-05-23 10:26:20 +03:00
qnetworkproxy Change license for tests files 2024-02-04 09:56:42 +01:00
qnetworkproxyfactory Change license for tests files 2024-02-04 09:56:42 +01:00
CMakeLists.txt tst_QHostInfo: re-enable back the test on macOS 2024-09-26 18:10:35 +00:00