Update Connectivity04 implementation#1393
Conversation
matsduf
left a comment
There was a problem hiding this comment.
When zonemaster/zonemaster#1298 has been fixed I will update zonemaster/zonemaster#1299 and test this implementation.
…() of the TestUtil module
If that scenario is run by a separate |
|
Should there be double space between tag and argument? |
|
I tested a domain that does not exist and got errors from Perl. It is not a big problem, but better if we can avoid it. |
|
Tag without argument, but with two trailing space characters, |
There was a problem hiding this comment.
| Scenario name | Mandatory message tag | Forbidden message tags |
|---|---|---|
| ERROR-PREFIX-DATABASE-6 | CN04_IPV4_DIFFERENT_PREFIX, CN04_IPV6_DIFFERENT_PREFIX, CN04_ERROR_PREFIX_DATABASE | 2) |
$ zonemaster-cli --hint=hintfile.zone --test=connectivity04 --level=info --show-testcase --raw ERROR-PREFIX-DATABASE-6.connectivity04.xa
0.00 INFO Unspecified GLOBAL_VERSION version=v6.0.0
0.15 INFO Connectivity04 CN04_IPV4_DIFFERENT_PREFIX ns_list=dns1.connectivity04.xa/127.100.101.1;dns25.connectivity04.xa/127.100.125.1
0.15 INFO Connectivity04 CN04_IPV6_DIFFERENT_PREFIX ns_list=dns1.connectivity04.xa/fda1:b2:c3:0:127:100:101:1;dns25.connectivity04.xa/fda1:b2:c3:0:127:100:125:1
--> Unexpected
Two TXT are returned and one of them does not have a prefix matching the queried IP address.
;; ANSWER SECTION:
1.125.100.127.origin.asnlookup.zonemaster.net. 3600 IN TXT "64512 | 127.100.125.0/24 | NA | NA | NA"
1.125.100.127.origin.asnlookup.zonemaster.net. 3600 IN TXT "64512 | 127.100.255.0/24 | NA | NA | NA"
- Check for definedness before looping over name servers This can happen with the new methods (TestMethodsV2), for example when a domain does not exist - Move test scenario ERROR-PREFIX-DATABASE-3 to a separate unit test file Since queries for this scenario time out (no response), this is needed as to avoid the blacklisting of subsequent queries
Yes, I will do that.
Unless I misunderstand, this is unrelated to this PR. This is also the case for other Test cases.
I agree, fixed.
I don't see the issue. Could you provide an example? I get:
I believe this one is a bit tricky from a specification standpoint. We have both a valid and invalid record. Shouldn't we care more about returning the correct one? Moreover the network mask is the same in both cases, which makes it even more of an edge case. Finally, for this scenario this will lead to output of message tags CN04_IPV{4,6}_SINGLE_PREFIX. |
Not an issue for this PR.
Just trailing spaces I observed. Nothing important.
If more than one ASN TXT record is returned then I think it is reasonable to see that as a set. If one is more specific than the other, and both are compatible with the address, that is fine. If one record is not compatible with address, but the other is, then I think it is reasonable to say that the set is broken. That is what I think the specification says, and is meant to say:
|
I do not understand why the size of the mask matters. One prefix covers the address, the other does not. |
- Fix logic when outputting of CN04_IPV{4,6}_SINGLE_PREFIX
- Update mandatory message tags in test scenario ERROR-PREFIX-DATABASE-6
|
@marc-vanderwal, @MichaelTimbert, @mattias-p, please review. |
marc-vanderwal
left a comment
There was a problem hiding this comment.
Looks good to me.
|
Release testing for 2024.2: No issues. |
Purpose
This PR proposes an update to the implementation of Connectivity04 following a specification update. As a drive by change, this also updates the
t/TestUtil.pmmodule to add support for dynamic scenario testing for test cases.Note that this is the first implementation to make use of MethodsV2.
Context
Test case specification update: zonemaster/zonemaster#1298
Test zones specification: zonemaster/zonemaster#1299
Changes
lib/Zonemaster/Engine/ASNLookup.pmlib/Zonemaster/Engine/Test/Connectivity.pmt/Test-connectivity04.tt/Test-connectivity04.datat/Test-connectivity04-A.tt/Test-connectivity04-A.datat/TestUtil.pmHow to test this PR
Unit tests are updated (based on zonemaster/zonemaster#1299) and should pass.