Syntax01 (syntax01)

Status: Final

Purpose

  • Validate that the tested domain name contains only allowed DNS hostname characters.

Preconditions And Inputs

  • Preconditions:
    • A zone.Zone object is available.
  • Required inputs:
    • Child zone name (z.Name).
  • Profile/config knobs that affect behavior:
    • None inside this testcase.

Algorithm And Decision Flow

  1. Emit TEST_CASE_START.
  2. Evaluate all labels in the child zone name with nameHasOnlyLegalCharacters.
  3. If all labels pass, emit ONLY_ALLOWED_CHARS; otherwise emit NON_ALLOWED_CHARS.
  4. Emit TEST_CASE_END.

Emitted Tags (Possible Set)

TagEmitted when
ONLY_ALLOWED_CHARSAll domain labels contain only A-Z, a-z, 0-9, and -.
NON_ALLOWED_CHARSAt least one domain label contains a disallowed character.
TEST_CASE_ENDTestcase completion marker is emitted.
TEST_CASE_STARTTestcase start marker is emitted.

Tag Arguments

TagArgument keyTypeMeaning
ONLY_ALLOWED_CHARSdomainstringTested domain name.
NON_ALLOWED_CHARSdomainstringTested domain name.
TEST_CASE_ENDtestcasestringTestcase display name (Syntax01).
TEST_CASE_STARTtestcasestringTestcase display name (Syntax01).

Severity Levels Per Tag

TagLevelNotes
ONLY_ALLOWED_CHARSINFODefault from share/profile.json (test_levels.SYNTAX).
NON_ALLOWED_CHARSERRORDefault from share/profile.json (test_levels.SYNTAX).
TEST_CASE_ENDDEBUGDefault from share/profile.json (test_levels.SYNTAX).
TEST_CASE_STARTDEBUGDefault from share/profile.json (test_levels.SYNTAX).

Differences From Upstream

  • Upstream reference: syntax01.md
  • Differences (Upstream vs Gonemaster):
    • Upstream: No material behavioral difference identified. Gonemaster: Matches upstream behavior for this testcase.
  • Potential upstream report:
    • no

Edge Cases And Limitations

  • For the root name (.), label iteration is empty and the testcase emits ONLY_ALLOWED_CHARS.
  • This testcase does not validate label length or full-name length; it only validates character set.