mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 03:05:51 +03:00
[PR #2385] [MERGED] [RFC] (temporarily) add tests that rely on public DNS infrastructure #3003
Labels
No labels
blocked
breaking-change
bug
bug:critical
bug:tests
cleanup
compliance
compliance
compliance
crate:all
crate:client
crate:native-tls
crate:proto
crate:recursor
crate:resolver
crate:resolver
crate:rustls
crate:server
crate:util
dependencies
docs
duplicate
easy
easy
enhance
enhance
enhance
feature:dns-over-https
feature:dns-over-quic
feature:dns-over-tls
feature:dnsssec
feature:global_lb
feature:mdns
feature:tsig
features:edns
has workaround
ops
perf
platform:WASM
platform:android
platform:fuchsia
platform:linux
platform:macos
platform:windows
pull-request
question
test
tools
tools
trust
unclear
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hickory-dns#3003
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hickory-dns/hickory-dns/pull/2385
Author: @japaric
Created: 8/26/2024
Status: ✅ Merged
Merged: 8/30/2024
Merged by: @djc
Base:
main← Head:ja-test-against-ede-dot-com📝 Commits (2)
dc44a69dns-test: allow testing against the public DNS infradf38ce6add ede-dot-com test suite📊 Changes
10 files changed (+1218 additions, -7 deletions)
View changed files
📝
.github/workflows/conformance.yml(+3 -0)📝
conformance/packages/dns-test/src/container/network.rs(+13 -6)📝
conformance/packages/dns-test/src/trust_anchor.rs(+22 -1)📝
conformance/packages/dns-test/src/zone_file/mod.rs(+8 -0)📝
justfile(+30 -0)➕
tests/ede-dot-com/Cargo.lock(+703 -0)➕
tests/ede-dot-com/Cargo.toml(+12 -0)➕
tests/ede-dot-com/README.md(+5 -0)➕
tests/ede-dot-com/src/lib.rs(+395 -0)➕
tests/ede-dot-com/src/sanity_check.rs(+27 -0)📄 Description
Background
Recently, @justahero found this great resource: https://extended-dns-errors.com/
Most of its 63 subdomains are made of incorrectly configured authoritative name servers with the goal of serving as a testbed for the implementation of RFC8914 (AKA Extended DNS Errors AKA EDE)
I originally thought it would be great to port the test cases under that domain into
conformance-teststo serve as tests for the (not yet implemented) EDE feature but after some local testing against the subdomains they uncovered what seem to be DNSSEC bugs in hickory.Proposal
I would like to add tests that hit these 63 subdomains for the purpose of local testing. The new tests will live in the
public-dns-testspackage.These tests will serve as a TODO list of failures that need to be investigated. Once a test failure has been confirmed to be a DNSSEC bug, the test will be rewritten to not rely on public DNS resources (i.e. to use the local / private
dns_test::{Resolver,Nameserver}containers) and moved intoconformance-tests(or intoe2e-testsif necessary).Once all the observed test failures have been investigated and fixed, the
public-dns-testspackage can be removed.Alternatively, we could walk the extra mile and port all the tests / subdomains, including the ones that pass today, and only after that remove the package.
Details
Because this test suite is for local development, the tests won't run in CI. CI will only check that the test code compiles. The rationale for this is that tests that rely on internet access are inherently flaky so I'd rather not add spurious failures to the CI checks. People running the tests locally can determine if a test is flaky and re-run it if needed.
The tests are set up to spin up local unbound and hickory resolvers configured with DNSSEC enabled and root hints and trust anchors that work with the public DNS infra. A query about an incorrectly configured subdomain is sent to both local resolvers and the test checks that both resolvers produce the same answer. What's being check is that the RCODE matches (e.g. NOERROR or SERVFAIL) and that the flags match (the Authenticated Data one is particularly important). To focus on DNSSEC bugs, the EDE codes in the responses are not compared; also because that would make a lot more tests fail because hickory does not implement EDE yet
The tests are set up using a
tests!macro inpublic-dns-teststhat indicates the "state" (or I guess category) of the test. A PASS(ing) test serves as a regression test and it's expected to pass. A FIXME test is a known failure that needs to be investigated and fixed. PORTED is for tests that have been ported toconformance-tests. The first test to be added to this category is going to be the one for theunsigned.domain (PR #2380)PS 29 of the 63 tests are in the FIXME category. There seem to be some common themes (e.g. lack of KSK or DS validation) that may indicate that the same bug is triggering multiple test failures.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.