Skip to content

Fix Consistency06 test scenario MULT-SOA-MNAMES-NO-DEL-UNDEL-2#1414

Merged
marc-vanderwal merged 3 commits into
zonemaster:developfrom
marc-vanderwal:bugfix/consistency06-test-data
Oct 8, 2025
Merged

Fix Consistency06 test scenario MULT-SOA-MNAMES-NO-DEL-UNDEL-2#1414
marc-vanderwal merged 3 commits into
zonemaster:developfrom
marc-vanderwal:bugfix/consistency06-test-data

Conversation

@marc-vanderwal

@marc-vanderwal marc-vanderwal commented Jul 28, 2025

Copy link
Copy Markdown
Contributor

Purpose

This PR fixes a handful of minor errors in a test scenario for Consistency06, in the specification and the configuration files that implement it. Together, they prevented the correct operation of scenario MULT-SOA-MNAMES-NO-DEL-UNDEL-2.

Context

Refactoring of Zonemaster-Engine unit tests.

Changes

  • Fix the test scenario specification;
  • Fix the test scenario implementation (CoreDNS configuration and zone files);
  • Update the sample zonemaster-cli output.

How to test this PR

N/A.

@marc-vanderwal marc-vanderwal added this to the v2025.2 milestone Jul 28, 2025
@marc-vanderwal marc-vanderwal added the A-Documentation Area: Documentation only. label Jul 28, 2025
marc-vanderwal added a commit to marc-vanderwal/zonemaster-engine that referenced this pull request Jul 28, 2025
Another rewrite of a unit test that led me to uncover a typo in the
original unit test. Actually, this time, the specification was
incorrect (see zonemaster/zonemaster#1414).
@matsduf

matsduf commented Jul 28, 2025

Copy link
Copy Markdown
Contributor

The specification says ns1 and ns2, seems to use ns3 and ns4. The specification needs an update.

@marc-vanderwal

Copy link
Copy Markdown
Contributor Author

Yes indeed, there is another problem in that scenario specification.

The first bullet point says “NS are out-of-bailiwick, "ns3.mult-soa-mnames-no-del-undel-2.consistency06.xb" and "ns4.mult-soa-mnames-no-del-undel-2.consistency06.xb"”. But the next bullet points talk about “ns1” and “ns2”.

All we really need is for ns3 and ns4 to return SOA records that differ in their MNAME fields.

In the specification for test scenarios for Consistency06, scenario
MULT-SOA-MNAMES-NO-DEL-UNDEL-2 erroneously lists
ns3.mult-soa-mnames-no-del-undel-2.consistency06.xb twice in the
undelegated data. The second occurrence should be ns4, not ns3.

Right above, the description of what SOA MNAME field values appear
mention name servers named ns1 and ns2, where ns3 and ns4 was probably
meant.

Unfortunately for us, fixing the first discrepancy does not fix the
underlying problem: it instead underscores that there is a bug in the
current implementation of Consistency06.
@marc-vanderwal marc-vanderwal force-pushed the bugfix/consistency06-test-data branch from 5b0d94b to aef6a7d Compare July 29, 2025 06:29
@marc-vanderwal marc-vanderwal changed the title Fix typo in undelegated data in Consistency06 test scenario Fix minor errors in Consistency06 test scenario specification Jul 29, 2025
@marc-vanderwal

Copy link
Copy Markdown
Contributor Author

After checking the implementation (i.e. the test zone files and CoreDNS configuration), I’ve brought the spec in line with how it was actually implemented. It doesn’t change the core idea of the scenario, however.

marc-vanderwal added a commit to marc-vanderwal/zonemaster-engine that referenced this pull request Jul 29, 2025
Another rewrite of a unit test that led me to uncover a typo in the
original unit test. Actually, this time, the specification was
incorrect (see zonemaster/zonemaster#1414).
marc-vanderwal added a commit to marc-vanderwal/zonemaster-engine that referenced this pull request Jul 30, 2025
Another rewrite of a unit test that led me to uncover a typo in the
original unit test. Actually, this time, the specification was
incorrect (see zonemaster/zonemaster#1414).
marc-vanderwal added a commit to marc-vanderwal/zonemaster-engine that referenced this pull request Jul 30, 2025
Another rewrite of a unit test that led me to uncover a typo in the
original unit test. Actually, this time, the specification was
incorrect (see zonemaster/zonemaster#1414).
Comment thread test-zone-data/Consistency-TP/consistency06/README.md Outdated
matsduf
matsduf previously approved these changes Jul 30, 2025
@marc-vanderwal

Copy link
Copy Markdown
Contributor Author

I noticed another oddity: in the CoreDNS configuration for this scenario, there are template blocks like this:

    template IN ANY ns1.mult-soa-mnames-no-del-undel-2.consistency06.xa {
        rcode NXDOMAIN
	authority "mult-soa-mnames-no-del-undel-2.consistency06.xa. 3600 SOA ns3.mult-soa-mnames-no-del-undel-2.consistency06.xb. admin.mail.xa. 2023092000 21600 3600 604800 86400"
    }
    template IN ANY ns2.mult-soa-mnames-no-del-undel-2.consistency06.xa {
        rcode NXDOMAIN
	authority "mult-soa-mnames-no-del-undel-2.consistency06.xa. 3600 SOA ns3.mult-soa-mnames-no-del-undel-2.consistency06.xb. admin.mail.xa. 2023092000 21600 3600 604800 86400"
    }

Shouldn’t these template blocks refer to ns3 and ns4 respectively, instead of ns1 and ns2?

I’m not sure if this is an error, because making the changes on my local setup does not change the messages that my runs of zonemaster-cli generate.

@marc-vanderwal marc-vanderwal changed the title Fix minor errors in Consistency06 test scenario specification Fix Consistency06 test scenario MULT-SOA-MNAMES-NO-DEL-UNDEL-2 Jul 31, 2025
@marc-vanderwal

Copy link
Copy Markdown
Contributor Author

All is well. It turns out I needed to hunt down typos in more places that I thought. Now the scenario works again.

I’ll make a PR that rerecords t/Test-consistency06.data in Zonemaster-Engine and marks the scenario as testable.

marc-vanderwal added a commit to marc-vanderwal/zonemaster-engine that referenced this pull request Jul 31, 2025
Scenario MULT-SOA-MNAMES-NO-DEL-UNDEL-2 was marked as not testable, but
it turned out that it was due to errors in the test scenario
implementation (i.e. the zone files and CoreDNS configuration).

After fixing the problem (see zonemaster/zonemaster#1414), we can enable
the scenario in Zonemaster-Engine’s test suite. The test data is also
rerecorded.
@matsduf

matsduf commented Aug 1, 2025

Copy link
Copy Markdown
Contributor

Shouldn’t these template blocks refer to ns3 and ns4 respectively, instead of ns1 and ns2?

No. "ns1" and "ns2" are IB names in the thought delegation not present in the undelegated zone. Note NXDOMAIN. "ns3" and "ns4" are OOB and cannot belong to the zone.

Comment thread test-zone-data/Consistency-TP/consistency06/consistency06.cfg Outdated
Comment thread test-zone-data/Consistency-TP/consistency06/consistency06.cfg Outdated
Comment thread test-zone-data/Consistency-TP/consistency06/consistency06.cfg Outdated
Comment thread test-zone-data/Consistency-TP/consistency06/consistency06.cfg Outdated
Looking carefully at the logs generated by CoreDNS shows that there were
some issues with the zone files and the configuration that prevented
that scenario from actually working correctly.

Fortunately, fixing these typos now fixes the zonemaster-cli run.
Caught a few more typos in Consistency06 test scenario specifications.
@marc-vanderwal marc-vanderwal force-pushed the bugfix/consistency06-test-data branch from b3b7dbf to f383f69 Compare August 4, 2025 06:04
marc-vanderwal added a commit to marc-vanderwal/zonemaster-engine that referenced this pull request Aug 4, 2025
Scenario MULT-SOA-MNAMES-NO-DEL-UNDEL-2 was marked as not testable, but
it turned out that it was due to errors both in the test scenario
implementation (i.e. the zone files and CoreDNS configuration: see
zonemaster/zonemaster#1414) and a small typo in the .t file.

In the .t file, scenario MULT-SOA-MNAMES-NO-DEL-UNDEL-2 erroneously
listed ns3.mult-soa-mnames-no-del-undel-2.consistency06.xb twice in its
undelegated data. The second instance should be ns4, not ns3.

After fixing these problems, we can enable the scenario in
Zonemaster-Engine’s test suite and rerecord the test data.
marc-vanderwal added a commit to marc-vanderwal/zonemaster-engine that referenced this pull request Aug 7, 2025
Another rewrite of a unit test that led me to uncover a typo in the
original unit test. Actually, this time, the specification was
incorrect (see zonemaster/zonemaster#1414).
marc-vanderwal added a commit to marc-vanderwal/zonemaster-engine that referenced this pull request Aug 7, 2025
Another rewrite of a unit test that led me to uncover a typo in the
original unit test. Actually, this time, the specification was
incorrect (see zonemaster/zonemaster#1414).
@matsduf matsduf added the RC-None Release category: Not to be included in Changes file. label Aug 10, 2025
@marc-vanderwal marc-vanderwal merged commit 9fa7a8f into zonemaster:develop Oct 8, 2025
marc-vanderwal added a commit to marc-vanderwal/zonemaster-engine that referenced this pull request Oct 15, 2025
Another rewrite of a unit test that led me to uncover a typo in the
original unit test. Actually, this time, the specification was
incorrect (see zonemaster/zonemaster#1414).
marc-vanderwal added a commit to marc-vanderwal/zonemaster-engine that referenced this pull request Oct 15, 2025
Another rewrite of a unit test that led me to uncover a typo in the
original unit test. Actually, this time, the specification was
incorrect (see zonemaster/zonemaster#1414).
marc-vanderwal added a commit to marc-vanderwal/zonemaster-engine that referenced this pull request Oct 16, 2025
Another rewrite of a unit test that led me to uncover a typo in the
original unit test. Actually, this time, the specification was
incorrect (see zonemaster/zonemaster#1414).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Documentation Area: Documentation only. RC-None Release category: Not to be included in Changes file.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants