Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix abort condition for undelegated tests in the Basic module #1401

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

tgreenx
Copy link
Contributor

@tgreenx tgreenx commented Dec 3, 2024

Purpose

When running the full test suite (i.e. not a specific module nor test case), an evaluation of the results from the Basic module is made (specifically what is returned by Basic02) before continuing onto other Test modules. Due to an oversight in a previous refactoring, this abort condition was changed, which made all undelegated tests to never abort, even without any working name server. This PR fixes that.

Context

Release testing v2024.2

See zonemaster/zonemaster-cli#402 (comment)

Fixes zonemaster/zonemaster#1275

How to test this PR

Unit tests should pass. Running the full test suite for an undelegated test should now properly abort when no working name servers are found:

$ zonemaster-cli --show-testcase --no-ipv6 --raw --level info --ns d.nic.example fr
   0.10 ERROR    Unspecified    FAKE_DELEGATION_NO_IP  domain=fr; nsname=d.nic.example
   0.16 ERROR    Unspecified    FAKE_DELEGATION_NO_IP  domain=fr; nsname=d.nic.example
   0.00 INFO     Unspecified    GLOBAL_VERSION  version=v6.0.0
   0.00 INFO     Basic01        B01_CHILD_FOUND  domain=fr
   0.00 INFO     Basic01        B01_PARENT_DISREGARDED
   0.00 CRITICAL Basic02        B02_NO_WORKING_NS  domain="fr"
   0.00 ERROR    Basic02        B02_NS_NO_IP_ADDR  nsname=d.nic.example
   0.00 CRITICAL Unspecified    CANNOT_CONTINUE  domain=fr

$ zonemaster-cli --show-testcase --no-ipv6 --raw --level info --ns d.nic.fr/1.1.1.1 fr
   0.00 INFO     Unspecified    GLOBAL_VERSION  version=v6.0.0
   0.00 INFO     Basic01        B01_CHILD_FOUND  domain=fr
   0.00 INFO     Basic01        B01_PARENT_DISREGARDED
   0.00 CRITICAL Basic02        B02_NO_WORKING_NS  domain="fr"
   0.00 ERROR    Basic02        B02_UNEXPECTED_RCODE  ns=d.nic.fr/1.1.1.1; rcode=SERVFAIL
   0.02 CRITICAL Unspecified    CANNOT_CONTINUE  domain=fr

And in the normal case (working NS):

$ zonemaster-cli --show-testcase --no-ipv6 --raw --level info --ns d.nic.fr fr
   0.00 INFO     Unspecified    GLOBAL_VERSION  version=v6.0.0
   0.00 INFO     Basic01        B01_CHILD_FOUND  domain=fr
   0.00 INFO     Basic01        B01_PARENT_DISREGARDED
   0.00 INFO     Basic02        B02_AUTH_RESPONSE_SOA  domain="fr"; ns_list=d.nic.fr/194.0.9.1
   0.00 INFO     Unspecified    HAS_NAMESERVER_NO_WWW_A_TEST  zname="fr"
   0.01 INFO     Address01      NO_IP_PRIVATE_NETWORK
   2.27 INFO     Address02      NAMESERVERS_IP_WITH_REVERSE
   2.28 INFO     Address03      NAMESERVER_IP_PTR_MATCH
   2.28 NOTICE   Connectivity01 CN01_IPV6_DISABLED  ns_list=d.nic.fr/2001:678:c::1;f.ext.nic.fr/2001:67c:1010:11::53;g.ext.nic.fr/2001:678:4c::1
[ ... ]

$ zonemaster-cli --show-testcase --no-ipv6 --raw --level info --ns d.nic.fr/194.0.9.1 fr
   0.00 INFO     Unspecified    GLOBAL_VERSION  version=v6.0.0
   0.00 INFO     Basic01        B01_CHILD_FOUND  domain=fr
   0.00 INFO     Basic01        B01_PARENT_DISREGARDED
   0.00 INFO     Basic02        B02_AUTH_RESPONSE_SOA  domain="fr"; ns_list=d.nic.fr/194.0.9.1
   0.00 INFO     Unspecified    HAS_NAMESERVER_NO_WWW_A_TEST  zname="fr"
   0.57 INFO     Address01      NO_IP_PRIVATE_NETWORK
   2.84 INFO     Address02      NAMESERVERS_IP_WITH_REVERSE
   2.85 INFO     Address03      NAMESERVER_IP_PTR_MATCH
   2.85 NOTICE   Connectivity01 CN01_IPV6_DISABLED  ns_list=d.nic.fr/2001:678:c::1;f.ext.nic.fr/2001:67c:1010:11::53;g.ext.nic.fr/2001:678:4c::1
[...]

$ zonemaster-cli --show-testcase --no-ipv6 --raw --level info fr
   0.00 INFO     Unspecified    GLOBAL_VERSION  version=v6.0.0
   2.31 INFO     Basic01        B01_PARENT_FOUND  domain=.; ns_list=a.root-servers.net/198.41.0.4;b.root-servers.net/199.9.14.201;c.root-servers.net/192.33.4.12;d.root-servers.net/199.7.91.13;e.root-servers.net/192.203.230.10;f.root-servers.net/192.5.5.241;g.root-servers.net/192.112.36.4;h.root-servers.net/198.97.190.53;i.root-servers.net/192.36.148.17;j.root-servers.net/192.58.128.30;k.root-servers.net/193.0.14.129;l.root-servers.net/199.7.83.42;m.root-servers.net/202.12.27.33
   2.31 INFO     Basic01        B01_CHILD_FOUND  domain=fr
   2.77 INFO     Basic02        B02_AUTH_RESPONSE_SOA  domain="fr"; ns_list=d.nic.fr/194.0.9.1;f.ext.nic.fr/194.146.106.46;g.ext.nic.fr/194.0.36.1
   2.77 INFO     Unspecified    HAS_NAMESERVER_NO_WWW_A_TEST  zname="fr"
   2.80 INFO     Address01      NO_IP_PRIVATE_NETWORK
   5.05 INFO     Address02      NAMESERVERS_IP_WITH_REVERSE
   5.06 INFO     Address03      NAMESERVER_IP_PTR_MATCH
   5.06 NOTICE   Connectivity01 CN01_IPV6_DISABLED  ns_list=d.nic.fr/2001:678:c::1;f.ext.nic.fr/2001:67c:1010:11::53;g.ext.nic.fr/2001:678:4c::1
[ ... ]

@tgreenx tgreenx added the V-Patch Versioning: The change gives an update of patch in version. label Dec 3, 2024
@tgreenx tgreenx added this to the v2024.2 milestone Dec 3, 2024
@tgreenx tgreenx changed the title Remove special abort condition for undelegated tests in the Basic module Fix abort condition for undelegated tests in the Basic module Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
V-Patch Versioning: The change gives an update of patch in version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Strange result from Zonemaster when testing an undelegated domain against NS without IP address
3 participants