Basic01 (basic01)

Status: Final

Purpose

  • Determine whether the child zone exists and whether a parent zone can be identified from iterative authoritative responses.
  • Detect inconsistent delegation or alias outcomes while traversing from the root toward the child zone.

Preconditions And Inputs

  • Preconditions:
    • A zone.Zone is provided with a non-empty name.
    • A recursor is available on the zone object.
  • Required inputs:
    • Child zone name (z.Name).
    • Root server set from Recursor.RootServers().
  • Profile/config knobs that affect behavior:
    • net.ipv4: enables or disables IPv4 queries.
    • net.ipv6: enables or disables IPv6 queries.
    • Undelegated mode via fake addresses (Recursor.HasFakeAddresses(child)).

Algorithm And Decision Flow

  1. Emit TEST_CASE_START.
  2. If child is root (.), emit B01_CHILD_FOUND and B01_ROOT_HAS_NO_PARENT, then emit TEST_CASE_END and return.
  3. If child has fake addresses (undelegated context), emit B01_CHILD_FOUND and B01_PARENT_DISREGARDED, then emit TEST_CASE_END and return.
  4. Start from root servers and iteratively probe with SOA/NS (and DNAME when needed), extending the intermediate name toward the child.
  5. For each probed nameserver address:
    • Emit transport enable/disable tags (IPV4_*, IPV6_*) per rrtype (SOA, NS, DNAME) and skip queries on disabled transports.
    • Emit B01_SERVER_ZONE_ERROR when response requirements fail.
  6. Collect parent/delegation observations and emit:
    • B01_PARENT_FOUND for discovered parents.
    • B01_PARENT_UNDETERMINED when multiple parent candidates exist.
    • B01_PARENT_NOT_FOUND when none exists.
  7. Emit child/delegation status:
    • B01_CHILD_FOUND when delegation or authoritative SOA evidence exists.
    • B01_INCONSISTENT_DELEGATION for inconsistent parent-side results.
    • B01_NO_CHILD (normal mode) or B01_CHILD_NOT_EXIST (fake-address mode) when child evidence is absent.
  8. Emit alias findings:
    • B01_CHILD_IS_ALIAS per detected DNAME target.
    • B01_INCONSISTENT_ALIAS when multiple alias targets are found.
  9. Emit TEST_CASE_END.

Emitted Tags (Possible Set)

TagEmitted when
B01_CHILD_NOT_EXISTNo delegation/SOA evidence exists and child is in fake-address mode.
B01_CHILD_IS_ALIASChild is identified as alias via DNAME evidence.
B01_CHILD_FOUNDChild existence is confirmed (root, undelegated, delegation, or authoritative SOA path).
B01_INCONSISTENT_ALIASMore than one DNAME target was observed for child aliasing.
B01_INCONSISTENT_DELEGATIONParent-side responses for child delegation are inconsistent.
B01_NO_CHILDNo delegation/SOA evidence exists in normal mode (non-fake-address).
B01_PARENT_DISREGARDEDFake-address (undelegated) mode is active, so parent search is skipped.
B01_PARENT_FOUNDAt least one parent zone candidate is identified.
B01_PARENT_NOT_FOUNDNo parent zone candidate was identified from any probed nameserver response.
B01_PARENT_UNDETERMINEDMultiple parent zone candidates were identified.
B01_ROOT_HAS_NO_PARENTChild zone is root (.).
B01_SERVER_ZONE_ERRORSOA/NS response validation fails for a probed server/query name.
IPV4_DISABLEDIPv4 transport is disabled for queried rrtype.
IPV4_ENABLEDIPv4 transport is enabled for queried rrtype.
IPV6_DISABLEDIPv6 transport is disabled for queried rrtype.
IPV6_ENABLEDIPv6 transport is enabled for queried rrtype.
LOOP_PROTECTIONInternal traversal loop protection threshold is hit.
TEST_CASE_ENDTestcase completion marker is emitted.
TEST_CASE_STARTTestcase start marker is emitted.

Tag Arguments

TagArgument keyTypeMeaning
B01_CHILD_NOT_EXISTdomainstringChild zone name.
B01_CHILD_IS_ALIASdomain_childstringChild zone name.
B01_CHILD_IS_ALIASdomain_targetstringAlias target name from DNAME.
B01_CHILD_IS_ALIASserversarray<object>Structured nameserver list that returned the result.
B01_CHILD_FOUNDdomainstringChild zone name found.
B01_INCONSISTENT_ALIASdomainstringChild zone name with inconsistent alias targets.
B01_INCONSISTENT_DELEGATIONdomain_parentstringParent zone candidate showing inconsistency.
B01_INCONSISTENT_DELEGATIONdomain_childstringChild zone name.
B01_INCONSISTENT_DELEGATIONserversarray<object>Structured nameserver list tied to inconsistency.
B01_NO_CHILDdomain_childstringChild zone name.
B01_NO_CHILDdomain_superstringNext-higher domain suggested for testing.
B01_PARENT_DISREGARDED--No arguments.
B01_PARENT_FOUNDdomainstringParent zone name candidate.
B01_PARENT_FOUNDserversarray<object>Structured nameserver list returning parent evidence.
B01_PARENT_NOT_FOUND--No arguments.
B01_PARENT_UNDETERMINEDserversarray<object>Structured nameserver list across competing parents.
B01_ROOT_HAS_NO_PARENT--No arguments.
B01_SERVER_ZONE_ERRORquery_namestringQueried owner name that failed validation.
B01_SERVER_ZONE_ERRORrrtypestringQueried rrtype (SOA or NS).
B01_SERVER_ZONE_ERRORnsstringNameserver identity (ns name only; use address for IP).
B01_SERVER_ZONE_ERRORaddressstringNameserver IP address for the same endpoint.
IPV4_DISABLEDnsstringNameserver identity (ns name only; use address for IP).
IPV4_DISABLEDaddressstringNameserver IP address for the same endpoint.
IPV4_DISABLEDrrtypestringrrtype skipped due to transport disable.
IPV4_ENABLEDnsstringNameserver identity (ns name only; use address for IP).
IPV4_ENABLEDaddressstringNameserver IP address for the same endpoint.
IPV4_ENABLEDrrtypestringrrtype queried over enabled transport.
IPV6_DISABLEDnsstringNameserver identity (ns name only; use address for IP).
IPV6_DISABLEDaddressstringNameserver IP address for the same endpoint.
IPV6_DISABLEDrrtypestringrrtype skipped due to transport disable.
IPV6_ENABLEDnsstringNameserver identity (ns name only; use address for IP).
IPV6_ENABLEDaddressstringNameserver IP address for the same endpoint.
IPV6_ENABLEDrrtypestringrrtype queried over enabled transport.
LOOP_PROTECTIONcallerstringInternal caller name that hit loop protection.
LOOP_PROTECTIONchild_zone_namestringChild zone name under test.
LOOP_PROTECTIONzone_namestringCurrent loop zone name state.
LOOP_PROTECTIONintermediate_query_namestringIntermediate query name at stop point.
TEST_CASE_ENDtestcasestringTestcase display name (Basic01).
TEST_CASE_STARTtestcasestringTestcase display name (Basic01).

Severity Levels Per Tag

TagLevelNotes
B01_CHILD_NOT_EXISTINFODefault from share/profile.json.
B01_CHILD_IS_ALIASNOTICEDefault from share/profile.json.
B01_CHILD_FOUNDINFODefault from share/profile.json.
B01_INCONSISTENT_ALIASERRORDefault from share/profile.json.
B01_INCONSISTENT_DELEGATIONERRORDefault from share/profile.json.
B01_NO_CHILDERRORDefault from share/profile.json.
B01_PARENT_DISREGARDEDINFODefault from share/profile.json.
B01_PARENT_FOUNDINFODefault from share/profile.json.
B01_PARENT_NOT_FOUNDWARNINGDefault from share/profile.json.
B01_PARENT_UNDETERMINEDWARNINGDefault from share/profile.json.
B01_ROOT_HAS_NO_PARENTINFODefault from share/profile.json.
B01_SERVER_ZONE_ERRORDEBUGDefault from share/profile.json.
IPV4_DISABLEDDEBUGDefault from share/profile.json.
IPV4_ENABLEDDEBUGDefault from share/profile.json.
IPV6_DISABLEDDEBUGDefault from share/profile.json.
IPV6_ENABLEDDEBUGDefault from share/profile.json.
LOOP_PROTECTIONDEBUG2Default from share/profile.json.
TEST_CASE_ENDDEBUGDefault from share/profile.json.
TEST_CASE_STARTDEBUGDefault from share/profile.json.

Differences From Upstream

  • Upstream reference: basic01.md
  • Differences (Upstream vs Gonemaster):
    • Upstream: documents B01_NO_CHILD for the non-existing-child outcome. Gonemaster: also emits B01_CHILD_NOT_EXIST in fake-address mode.
    • Upstream: testcase summary does not list transport debug tags or LOOP_PROTECTION. Gonemaster: emits IPV4_*, IPV6_*, and LOOP_PROTECTION.
  • Potential upstream report:
    • yes
  • If yes, include:
    • Upstream expected behavior: Child-not-exist path is described with B01_NO_CHILD only, and summary does not include transport or loop-protection tags.
    • Gonemaster observed behavior: B01_CHILD_NOT_EXIST, transport tags, and LOOP_PROTECTION are possible emissions.
    • evidence: engine/test/basic/basic.go (Basic01, ipDisabledMessage, ipEnabledMessage).
    • report status: not filed

Implementation Notes

The following behaviors are implementation choices, not mandated by RFC 1034/1035:

  • Traversal strategy: The testcase probes iteratively from root servers using SOA, NS, and DNAME queries, extending the intermediate name toward the child zone at each step. The DNS protocol specifies the resolution model but does not define how a testcase tool should walk the hierarchy.
  • Sorted servers arguments: Nameserver lists passed in tag arguments are sorted before joining with ;. Deterministic ordering simplifies reproducible output but is not a protocol requirement.
  • Loop protection threshold: Traversal stops at a fixed internal limit and emits LOOP_PROTECTION. No DNS standard defines a specific iteration bound; the limit is a defensive implementation choice.

Edge Cases And Limitations

  • A missing recursor causes testcase execution error before completion.
  • Loop-protection fallback is defensive; when triggered it logs LOOP_PROTECTION and terminates the testcase early.
  • Child existence outcomes differ between normal and fake-address modes (B01_NO_CHILD vs B01_CHILD_NOT_EXIST).
  • Nameserver list argument order is deterministic because lists are sorted before join.