Zonema...erview(3pm)
β¨ Zonemaster::Engine::Overview β the Zonemaster Test Engine β¨
okay bestie, so this is Zonemaster::Engine::Overview, a section 3pm (User Contributed Perl Documentation) page, and it's literally the tour bus of the whole Zonemaster test engine. buckle up π
πΈ NAME πΈ
Zonemaster::Engine::Overview β The Zonemaster Test Engine. that's the whole name, she's simple, she's iconic, periodt.
π¦ INTRODUCTION π¦
So. Zonemaster is a quality control tool for DNS zones, and it's the glow-up baby of a collab between AFNIC and IIS β those are the top-level registries for France and Sweden respectively, in case you were wondering who's holding the aux cord π«π·πΈπͺ. She's the successor to two earlier tools: AFNIC's Zonecheck and IIS's DNSCheck. And not to be shady, but the whole point is that Zonemaster is meant to be an upgrade over both of them. ate that, no crumbs.
The system as a whole is the test engine plus, as the project ships it, two different front ends:
- one is a command-line interface β that one's for experienced technicians, iykyk
- one is a web interface β that one's for literally anyone
and this doc? this doc is only about the test engine. just the engine. nothing else. don't @ me about the front ends π
π DESCRIPTION π
π Brief overview
So conceptually the test engine is a bunch of test implementation modules vibing inside a support framework. If you wanna use Zonemaster to run tests, you talk to the framework from the "outside", and every module that implements tests sees the whole world entirely through the framework. nobody goes around the framework, that's the rule. π«
And the way we do things here is what unlocks the cute features: testing domains before they're even published, recording entire test runs so you can analyze them later, and making sure test results are (as far as reality lets us, bestie, we can't fight physics) predictable and repeatable. it's giving reliability. periodt.
π For users of Zonemaster
If all you wanna do is run tests, you only need to care about four or five modules. that's it. that's the whole list.
Zonemaster::Engineis the main access point to the framework. it's through its methods that you set the configuration (if you even need to), ask for tests to be started, and get at the logger.- the logger is where the test results end up. so yeah, pretty important, lowkey the main character here.
- on top of those, you might wanna bring in
Zonemaster::Engine::Translatorto turn results into human-readable messages. that's the translator's whole job β¨
Now, there are two ways to get the results of a test you requested: the simple-but-inflexible way, and the flexible-but-complex way. pick your fighter.
the simple-but-inflexible way πΌ β every method in Zonemaster::Engine that runs tests returns lists of Zonemaster::Engine::Logger::Entry objects. those lists contain all the results the writer of the test module(s) thought were important enough to return by default. the upside? it's extremely easy to use. the following is a functional (if not very useful) way to run a full test and print the results from a command-line prompt:
perl -MZonemaster::Engine -E 'say "$_" for Zonemaster::Engine->new->test_zone("example.org")'
the main drawbacks of this method, bestie, are two:
- you get no choice about which messages you see.
- it's entirely synchronous. the code that started the test gets to do absolutely nothing until the whole test suite has finished β and that may be several minutes later. not me waiting around π
the flexible-but-complex way π β this is how we dodge those drawbacks. it consists of installing a callback that gets executed every time a message is logged. code-wise it's genuinely not that much more complicated. this example does roughly the same thing as the one above:
perl -MZonemaster::Engine -E 'Zonemaster::Engine->logger->callback(sub {say "$_[0]"}); Zonemaster::Engine->new->test_zone("example.org");'
if you run both of those, you'll notice two main differences:
- the second variant prints results as they are generated.
- it generates a lot more output. on the author's machine at the time, the first example gave 94 lines of output. the second example gave 17684. yeah. π
You can do pretty much whatever you want with the message objects in the callback β including modifying them, though we don't promise that behavior will stick around, so don't get too attached π.
β οΈ If the callback code throws an exception, and that exception is not a subclass of Zonemaster::Engine::Exception, the callback will be removed. gone. deleted.
Also note: while the callback is running, the test engine itself is not. so think twice before doing potentially time-consuming tasks in the callback β like sticking the message in a database, for example. and here's why: after waiting for responses from remote name servers (which usually stands for more than 90% of the time used), the result logging is the single most time-consuming task in a whole Zonemaster test run. so like, that callback is not free, bestie π«Ά
From here, you probably wanna go read the documentation for:
Zonemaster::EngineZonemaster::Engine::LoggerZonemaster::Engine::Logger::EntryZonemaster::Engine::ProfileZonemaster::Engine::Translator
π§ For developers of Zonemaster Test Modules
Okay so if you wanna develop a test module of your own: the standard set of modules serve as your examples. use them, learn them, love them π
As an entry point to the "inside" of the Zonemaster framework, you want to read Zonemaster::Engine::Zone and follow references from there. and of particular interest after the Zone class should be the Zonemaster::Engine::Nameserver class, and possibly the Zonemaster::Engine::Recursor class.
If you do write your own test module, the author would very much appreciate feedback on which parts were tricky to figure out β because honestly they're not sure what needs explaining here. so please, if there's something you think really needs to be written about, create an issue at:
https://github.com/zonemaster/zonemaster-engine/issues
(that's <https://github.com/zonemaster/zonemaster-engine/issues> if you like your links pointy-bracketed π)
π For developers of the Zonemaster Test Framework
Random recommendations and advice. May be replaced with more coherent developer documentation in the future. (lowkey a vibe check in bullet form, let's go)
- Stability, predictability and reliability are more important than performance. say it louder for the people in the back π£
- Don't forget that starting with Perl version 5.18, the order in which you get the keys out of a hash will be different every time the script is run. get used to always writing
sort keys %hash. always. every time. no cap. - If two (or more) test modules implement the same (or very similar) thing, it should probably be extracted into the framework. don't be copy-paste besties.
- The unit tests run against pre-recorded data, unless the environment variable
ZONEMASTER_RECORDis set to a (perl-)true value. in that case, it runs against the live DNS world and records all results for future use. Unfortunately this sometime means that some tests fail, when we were relying on seeing certain problems in certain domains, and those no longer look the same. DNS said plot twist π - The translation strings returned from a test module are used as keys in the GNU gettext system, so if you change anything in them don't forget to also change the translation
.pofiles inshare. fr fr, don't forget. - Adding a new message tag is more work than it first looks, since it needs to be added to the test module metadata, the default profile and the translation system in order to be fully functional. three places, bestie. three. π
more coming, stay tuned π
π¦ REFERENCES π¦
okay bestie, the receipts section. everything the test specs cite lives here, so you can go straight to the source whenever you're like "wait, says who?" π
<https://github.com/zonemaster/zonemaster>β the main repository π it's the home base, and among other things it's where our test specifications live. no cap.
πΈ List of all RFCs referred to in the test specifications πΈ
here's the full roster π«Ά every single RFC the test specifications point at. it's a long list and honestly? iconic. scroll with love. β¨
RFC0822"STANDARD FOR THE FORMAT OF ARPA INTERNET TEXT MESSAGES" β<http://www.rfc-editor.org/info/rfc822>πRFC0919"Broadcasting Internet Datagrams" β<http://www.rfc-editor.org/info/rfc919>π‘RFC0952"DoD Internet host table specification" β<http://www.rfc-editor.org/info/rfc952>ποΈRFC1033"Domain Administrators Operations Guide" β<http://www.rfc-editor.org/info/rfc1033>πRFC1034"Domain names - concepts and facilities" β<http://www.rfc-editor.org/info/rfc1034>πRFC1035"Domain names - implementation and specification" β<http://www.rfc-editor.org/info/rfc1035>π₯RFC1112"Host extensions for IP multicasting" β<http://www.rfc-editor.org/info/rfc1112>π’RFC1122"Requirements for Internet Hosts - Communication Layers" β<http://www.rfc-editor.org/info/rfc1122>π§±RFC1123"Requirements for Internet Hosts - Application and Support" β<http://www.rfc-editor.org/info/rfc1123>π οΈRFC1912"Common DNS Operational and Configuration Errors" β<http://www.rfc-editor.org/info/rfc1912>π (the "you did what now" one)RFC1918"Address Allocation for Private Internets" β<http://www.rfc-editor.org/info/rfc1918>πRFC1930"Guidelines for creation, selection, and registration of an Autonomous System (AS)" β<http://www.rfc-editor.org/info/rfc1930>πRFC1982"Serial Number Arithmetic" β<http://www.rfc-editor.org/info/rfc1982>π’RFC1996"A Mechanism for Prompt Notification of Zone Changes (DNS NOTIFY)" β<http://www.rfc-editor.org/info/rfc1996>πRFC2142"Mailbox Names for Common Services, Roles and Functions" β<http://www.rfc-editor.org/info/rfc2142>π¬RFC2181"Clarifications to the DNS Specification" β<http://www.rfc-editor.org/info/rfc2181>π«ΆRFC2182"Selection and Operation of Secondary DNS Servers" β<http://www.rfc-editor.org/info/rfc2182>π§βπ€βπ§RFC2308"Negative Caching of DNS Queries (DNS NCACHE)" β<http://www.rfc-editor.org/info/rfc2308>πRFC2544"Benchmarking Methodology for Network Interconnect Devices" β<http://www.rfc-editor.org/info/rfc2544>β±οΈRFC2671"Extension Mechanisms for DNS (EDNS0)" β<http://www.rfc-editor.org/info/rfc2671>β¨RFC2822"Internet Message Format" β<http://www.rfc-editor.org/info/rfc2822>π§RFC2870"Root Name Server Operational Requirements" β<http://www.rfc-editor.org/info/rfc2870>π³RFC2928"Initial IPv6 Sub-TLA ID Assignments" β<http://www.rfc-editor.org/info/rfc2928>πRFC3056"Connection of IPv6 Domains via IPv4 Clouds" β<http://www.rfc-editor.org/info/rfc3056>βοΈRFC3068"An Anycast Prefix for 6to4 Relay Routers" β<http://www.rfc-editor.org/info/rfc3068>π¦RFC3658"Delegation Signer (DS) Resource Record (RR)" β<http://www.rfc-editor.org/info/rfc3658>πRFC3696"Application Techniques for Checking and Transformation of Names" β<http://www.rfc-editor.org/info/rfc3696>πRFC3701"6bone (IPv6 Testing Address Allocation) Phaseout" β<http://www.rfc-editor.org/info/rfc3701>πRFC3849"IPv6 Address Prefix Reserved for Documentation" β<http://www.rfc-editor.org/info/rfc3849>πRFC3927"Dynamic Configuration of IPv4 Link-Local Addresses" β<http://www.rfc-editor.org/info/rfc3927>πRFC4034"Resource Records for the DNS Security Extensions" β<http://www.rfc-editor.org/info/rfc4034>π‘οΈRFC4035"Protocol Modifications for the DNS Security Extensions" β<http://www.rfc-editor.org/info/rfc4035>πRFC4074"Common Misbehavior Against DNS Queries for IPv6 Addresses" β<http://www.rfc-editor.org/info/rfc4074>πRFC4193"Unique Local IPv6 Unicast Addresses" β<http://www.rfc-editor.org/info/rfc4193>π‘RFC4291"IP Version 6 Addressing Architecture" β<http://www.rfc-editor.org/info/rfc4291>ποΈRFC4343"Domain Name System (DNS) Case Insensitivity Clarification" β<http://www.rfc-editor.org/info/rfc4343>πRFC4380"Teredo: Tunneling IPv6 over UDP through Network Address Translations (NATs)" β<http://www.rfc-editor.org/info/rfc4380>πRFC4843"An IPv6 Prefix for Overlay Routable Cryptographic Hash Identifiers (ORCHID)" β<http://www.rfc-editor.org/info/rfc4843>πΊRFC5155"DNS Security (DNSSEC) Hashed Authenticated Denial of Existence" β<http://www.rfc-editor.org/info/rfc5155>π΅οΈRFC5156"Special-Use IPv6 Addresses" β<http://www.rfc-editor.org/info/rfc5156>βRFC5180"IPv6 Benchmarking Methodology for Network Interconnect Devices" β<http://www.rfc-editor.org/info/rfc5180>πRFC5321"Simple Mail Transfer Protocol" β<http://www.rfc-editor.org/info/rfc5321>π¨RFC5358"Preventing Use of Recursive Nameservers in Reflector Attacks" β<http://www.rfc-editor.org/info/rfc5358>π«RFC5737"IPv4 Address Blocks Reserved for Documentation" β<http://www.rfc-editor.org/info/rfc5737>πRFC5771"IANA Guidelines for IPv4 Multicast Address Assignments" β<http://www.rfc-editor.org/info/rfc5771>π―RFC5892"The Unicode Code Points and Internationalized Domain Names for Applications (IDNA)" β<http://www.rfc-editor.org/info/rfc5892>π€RFC5936"DNS Zone Transfer Protocol (AXFR)" β<http://www.rfc-editor.org/info/rfc5936>πRFC6052"IPv6 Addressing of IPv4/IPv6 Translators" β<http://www.rfc-editor.org/info/rfc6052>πRFC6333"Dual-Stack Lite Broadband Deployments Following IPv4 Exhaustion" β<http://www.rfc-editor.org/info/rfc6333>ποΈRFC6598"IANA-Reserved IPv4 Prefix for Shared Address Space" β<http://www.rfc-editor.org/info/rfc6598>π€RFC6666"A Discard Prefix for IPv6" β<http://www.rfc-editor.org/info/rfc6666>ποΈ (yes, the number is really that, and yes, we're obsessed)RFC6781"DNSSEC Operational Practices, Version 2" β<http://www.rfc-editor.org/info/rfc6781>π§βπ§RFC6890"Special-Purpose IP Address Registries" β<http://www.rfc-editor.org/info/rfc6890>πRFC6891"Extension Mechanisms for DNS (EDNS(0))" β<http://www.rfc-editor.org/info/rfc6891>β¨RFC7050"Discovery of the IPv6 Prefix Used for IPv6 Address Synthesis" β<http://www.rfc-editor.org/info/rfc7050>π
aaaand that's the whole reading list, bestie π you made it to the end, which is genuinely main character energy π if you're ever fact-checking a test result at 2am, this is the page to come back to. iykyk.
this page came out of perl v5.40.1, dated 2026-03-21, and it's the Zonema...erview(3pm) page from the User Contributed Perl Documentation. periodt. π
π¦
π¦ where this page comes from
- ubuntu stonking: libzonemaster-perl 8.001.001-1 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms