resolver tests: retry an answer missing the record type read (closes #218) #232

Merged
clawbot merged 1 commits from issue-218-resolver-tests-retry-missing-type into next 2026-10-02 07:52:45 +02:00
Collaborator

Closes #218.

QueryNameserver sends one query per record type. When only one of those queries is lost, the answer still has status ok. liveQueryNameserver therefore took it as final, and a test reading that type found no records.

liveQueryNameserver now takes, after the hostname, the record types the test reads. An answer holding records of none of them is retried through livednstest.Retry, as a timeout already is. TestQueryNameserver_BasicA (A or CNAME), TestQueryNameserver_AAAA, TestQueryNameserver_MX and TestQueryNameserver_TXT name theirs. No other resolver test reads one record type from a QueryNameserver answer, so the other callers are unchanged.

Not visible in the diff:

  • Several types mean any of them, not all: BasicA accepts A or CNAME records, matching its assertion.
  • A resolver that really stopped returning a type still fails these tests, after the third attempt instead of the first.

Disclosures:

  • Partly covered: TestQueryNameserver_TXT also needs the SPF record. When the TCP retry of a truncated TXT reply fails, the resolver keeps the 7 of 17 records that fit, which do not include the SPF record, so that case is not retried. The resolver side is #231.

Model: opus-5-5

Closes https://git.eeqj.de/sneak/dnswatcher/issues/218. `QueryNameserver` sends one query per record type. When only one of those queries is lost, the answer still has status `ok`. `liveQueryNameserver` therefore took it as final, and a test reading that type found no records. `liveQueryNameserver` now takes, after the hostname, the record types the test reads. An answer holding records of none of them is retried through `livednstest.Retry`, as a timeout already is. `TestQueryNameserver_BasicA` (A or CNAME), `TestQueryNameserver_AAAA`, `TestQueryNameserver_MX` and `TestQueryNameserver_TXT` name theirs. No other resolver test reads one record type from a `QueryNameserver` answer, so the other callers are unchanged. Not visible in the diff: - Several types mean any of them, not all: `BasicA` accepts A or CNAME records, matching its assertion. - A resolver that really stopped returning a type still fails these tests, after the third attempt instead of the first. Disclosures: - Partly covered: `TestQueryNameserver_TXT` also needs the SPF record. When the TCP retry of a truncated TXT reply fails, the resolver keeps the 7 of 17 records that fit, which do not include the SPF record, so that case is not retried. The resolver side is https://git.eeqj.de/sneak/dnswatcher/issues/231. Model: opus-5-5
clawbot added the needs-review label 2026-10-02 07:37:06 +02:00
clawbot self-assigned this 2026-10-02 07:37:06 +02:00
clawbot added 1 commit 2026-10-02 07:37:06 +02:00
QueryNameserver sends one query per record type. When only the AAAA or
MX query was lost, the answer still had status ok, liveQueryNameserver
did not retry it, and the test found no AAAA or MX records.
liveQueryNameserver now takes the record types a test reads and, through
livednstest, retries an answer that holds records of none of them. The
A, AAAA, MX and TXT tests name theirs. A resolver that loses a type for
good still fails, after the last attempt instead of the first.

Model: opus-5-5
Author
Collaborator

Review passed on bfc91f3.

Model: opus-5-5

Review passed on bfc91f3. Model: opus-5-5
clawbot merged commit a18803ff28 into next 2026-10-02 07:52:45 +02:00
clawbot deleted branch issue-218-resolver-tests-retry-missing-type 2026-10-02 07:52:45 +02:00
clawbot removed the needs-review label 2026-10-02 07:52:45 +02:00
Sign in to join this conversation.