Skip to content

Do not retry in resolution_fails() on timeout

At the time of test number (19), there were 10 "sending packet to" lines in the "legacy/ns1/" file; usually, only seven are present:

I:legacy:checking recursive lookup to edns 512 + no tcp server does not cause query loops (19)
I:legacy:ns1 sent 10 queries to ns7, expected less than 10

Those three can be attributed to tests "8", "10", and "18", where the dig of "resolution_fails()" retried after a timeout to succeed with "status: SERVFAIL" subsequently, as seen in each of dig.out.test{8,10,18} files.

;; communications error to timed out

; <<>> DiG 9.19.12-dev <<>> -p 13093 +tcp @ edns512-notcp. TXT
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 5368
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

This retry is unnecessary because "resolution_fails()" considers timeout a positive result.

I ran this change in several 1-hour-long loops of the legacy system test, and they all passed (as in CI timeout kicked in before the test failed):

Closes #3916 (closed)

Edited by Michal Nowak

Merge request reports