qt5base-lts/tests/auto/network
Thiago Macieira 432d67b43f QDnsLookup: add TimeoutError for timeouts
We were getting InvalidReplyError because it was simply unknown, which
is not very useful. Previously, the Unix code used res_nquery(), which
does not return timeouts as a condition. It returns -1 if a timeout did
happen, but the content in errno could be a left-over from a previous
timeout (see the "Not a typewriter"[1] problem).

With the rewrite to using res_nmkquery() and res_nsend() from the
previous commits, we can rely on errno being set properly by
res_nsend().

$ $objdir/tests/manual/qdnslookup/qdnslookup @0.0.0.1
; <<>> QDnsLookup 6.6.0 <<>> qdnslookup @0.0.0.1
;; status: TimeoutError (Request timed out)
;; QUESTION:
;qt-project.org                 IN A

;; Query time: 10008 ms
;; SERVER: 0.0.0.1#53

Tested on FreeBSD, Linux, macOS, and Windows.

[1] https://en.wikipedia.org/wiki/Not_a_typewriter

Change-Id: I3e3bfef633af4130a03afffd175e31958247f9b1
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-05-26 06:46:33 -07:00
..
access Hsts: match header names case insensitively 2023-05-08 20:28:46 +02:00
kernel QDnsLookup: add TimeoutError for timeouts 2023-05-26 06:46:33 -07:00
selftest Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
socket Network tests: drop testing ftp proxy server 2023-04-20 16:10:03 +02:00
ssl Skip diffie-hellman parameter test when not supported 2023-05-24 13:08:34 +02:00
CMakeLists.txt Rid of 'special case' markers 2023-04-13 18:30:58 +02:00