Commit 490665aa69 for bind
commit 490665aa696678026532b03b0dc78162e7b16a4b
Author: Štěpán Balážik <stepan@isc.org>
Date: Wed Nov 25 21:56:33 2026 +0100
Mark the custom servers' self-checks with asyncserver_test
A test that queries an ansN directly checks what the reproducer sends,
not what named does with it. The new mark says so, in a way a run can
select or deselect.
Assisted-by: Claude:claude-opus-5-5
diff --git a/bin/tests/system/dnssec_nsec3/tests_dnssec_nsec3_delegation.py b/bin/tests/system/dnssec_nsec3/tests_dnssec_nsec3_delegation.py
index 3ed720b25a..4df2b442b0 100644
--- a/bin/tests/system/dnssec_nsec3/tests_dnssec_nsec3_delegation.py
+++ b/bin/tests/system/dnssec_nsec3/tests_dnssec_nsec3_delegation.py
@@ -94,6 +94,7 @@ def _has_forged_optout_nsec3(response):
return False
+@pytest.mark.asyncserver_test
def test_forged_bogus_inner_nsec3():
cut_ds = _query(AUTH, CUT, "DS")
isctest.check.noerror(cut_ds)
diff --git a/bin/tests/system/dnssec_nsec3/tests_nsec3_wrong_zone.py b/bin/tests/system/dnssec_nsec3/tests_nsec3_wrong_zone.py
index 47ee6fe5a9..d41903a4df 100644
--- a/bin/tests/system/dnssec_nsec3/tests_nsec3_wrong_zone.py
+++ b/bin/tests/system/dnssec_nsec3/tests_nsec3_wrong_zone.py
@@ -100,6 +100,7 @@ def _check_rrsig(response, section, owner, rdtype, signer, labels=None):
assert rrsig[0].labels == labels, response.to_text()
+@pytest.mark.asyncserver_test
def test_forged_response():
response = _query(AUTH, ATTACK, "A")
isctest.check.noerror(response)
diff --git a/bin/tests/system/dnssec_wildcard/tests_dnssec_wildcard_additional.py b/bin/tests/system/dnssec_wildcard/tests_dnssec_wildcard_additional.py
index 55b5fb26a8..f4b1f984d8 100644
--- a/bin/tests/system/dnssec_wildcard/tests_dnssec_wildcard_additional.py
+++ b/bin/tests/system/dnssec_wildcard/tests_dnssec_wildcard_additional.py
@@ -77,6 +77,7 @@ def _check_rrsig(response, section, owner, rdtype, signer, labels=None):
assert rrsig[0].labels == labels, response.to_text()
+@pytest.mark.asyncserver_test
def test_direct_fromwildcard_additional_fixture():
carrier = _query(AUTH, QUERY, "MX")
isctest.check.noerror(carrier)
diff --git a/bin/tests/system/dnssec_wildcard/tests_replayed_parent_wildcard.py b/bin/tests/system/dnssec_wildcard/tests_replayed_parent_wildcard.py
index f297a9996c..b58cf4908f 100644
--- a/bin/tests/system/dnssec_wildcard/tests_replayed_parent_wildcard.py
+++ b/bin/tests/system/dnssec_wildcard/tests_replayed_parent_wildcard.py
@@ -99,6 +99,7 @@ def prime_parent_soa():
_check_signed_rrset(response, response.answer, PARENT, dns.rdatatype.SOA, PARENT)
+@pytest.mark.asyncserver_test
def test_malicious_replay():
# Trigger query.
response = _query(AUTH, QUERY, "MX")
diff --git a/bin/tests/system/isctest/asyncserver/tests/dnssec/tests_asyncserver_dnssec.py b/bin/tests/system/isctest/asyncserver/tests/dnssec/tests_asyncserver_dnssec.py
index 5f0ac2507e..9f6b2848b5 100644
--- a/bin/tests/system/isctest/asyncserver/tests/dnssec/tests_asyncserver_dnssec.py
+++ b/bin/tests/system/isctest/asyncserver/tests/dnssec/tests_asyncserver_dnssec.py
@@ -15,11 +15,14 @@ AsyncDnsServer responses built from zone data
import dns.message
import dns.rdatatype
+import pytest
from isctest.template import ANS1
import isctest
+pytestmark = pytest.mark.asyncserver_test
+
def query(qname: str, qtype: str, dnssec: bool = False) -> dns.message.Message:
msg = isctest.query.create(qname, qtype, dnssec=dnssec, rd=False)
diff --git a/bin/tests/system/isctest/asyncserver/tests/dnssec/tests_empty_non_terminal.py b/bin/tests/system/isctest/asyncserver/tests/dnssec/tests_empty_non_terminal.py
index 832698cdf9..73c1d3f3f7 100644
--- a/bin/tests/system/isctest/asyncserver/tests/dnssec/tests_empty_non_terminal.py
+++ b/bin/tests/system/isctest/asyncserver/tests/dnssec/tests_empty_non_terminal.py
@@ -41,13 +41,16 @@ from isctest.template import ANS1, NS2
import isctest
import isctest.zone
-pytestmark = pytest.mark.extra_artifacts(
- [
- "ans*/dsset-*",
- "ans*/zones/*.db",
- "ans*/zones/*.db.signed",
- ]
-)
+pytestmark = [
+ pytest.mark.asyncserver_test,
+ pytest.mark.extra_artifacts(
+ [
+ "ans*/dsset-*",
+ "ans*/zones/*.db",
+ "ans*/zones/*.db.signed",
+ ]
+ ),
+]
NSEC_ZONE = "nsec.test."
NSEC3_ZONE = "nsec3.test."
diff --git a/bin/tests/system/isctest/asyncserver/tests/duplicate_root_zone/tests_duplicate_root_zone.py b/bin/tests/system/isctest/asyncserver/tests/duplicate_root_zone/tests_duplicate_root_zone.py
index 304245b021..fd3ee0d9b4 100644
--- a/bin/tests/system/isctest/asyncserver/tests/duplicate_root_zone/tests_duplicate_root_zone.py
+++ b/bin/tests/system/isctest/asyncserver/tests/duplicate_root_zone/tests_duplicate_root_zone.py
@@ -9,6 +9,10 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
+import pytest
+
+pytestmark = pytest.mark.asyncserver_test
+
def test_two_zone_files_with_the_same_origin_are_refused(ans1):
with ans1.watch_log_from_start() as watcher:
diff --git a/bin/tests/system/isctest/asyncserver/tests/response_handling/tests_response_handling.py b/bin/tests/system/isctest/asyncserver/tests/response_handling/tests_response_handling.py
index 1196085eec..7efc6dc1fe 100644
--- a/bin/tests/system/isctest/asyncserver/tests/response_handling/tests_response_handling.py
+++ b/bin/tests/system/isctest/asyncserver/tests/response_handling/tests_response_handling.py
@@ -23,6 +23,8 @@ from isctest.template import ANS1
import isctest
+pytestmark = pytest.mark.asyncserver_test
+
def query(qname: str) -> dns.message.Message:
msg = isctest.query.create(qname, "A", dnssec=False, rd=False)
diff --git a/bin/tests/system/isctest/asyncserver/tests/transport/tests_transport.py b/bin/tests/system/isctest/asyncserver/tests/transport/tests_transport.py
index 8a098aaaa6..87d37bae2e 100644
--- a/bin/tests/system/isctest/asyncserver/tests/transport/tests_transport.py
+++ b/bin/tests/system/isctest/asyncserver/tests/transport/tests_transport.py
@@ -23,6 +23,8 @@ from isctest.template import ANS1, ANS2, Nameserver
import isctest
+pytestmark = pytest.mark.asyncserver_test
+
TIMEOUT = 3
GARBAGE = b"\x00\x03\x00\x01\x02" # three bytes of nonsense, framed for TCP
diff --git a/bin/tests/system/isctest/asyncserver/tests/zone_data/tests_zone_data.py b/bin/tests/system/isctest/asyncserver/tests/zone_data/tests_zone_data.py
index 9aed0714e3..866ce69340 100644
--- a/bin/tests/system/isctest/asyncserver/tests/zone_data/tests_zone_data.py
+++ b/bin/tests/system/isctest/asyncserver/tests/zone_data/tests_zone_data.py
@@ -11,11 +11,14 @@
import dns.message
import dns.rdatatype
+import pytest
from isctest.template import ANS1
import isctest
+pytestmark = pytest.mark.asyncserver_test
+
def query(qname: str, qtype: str) -> dns.message.Message:
msg = isctest.query.create(qname, qtype, dnssec=False, rd=False)
diff --git a/bin/tests/system/nsec3_impersonation/tests_nsec3_impersonation.py b/bin/tests/system/nsec3_impersonation/tests_nsec3_impersonation.py
index 6bfc1e5691..1b6e72fda7 100644
--- a/bin/tests/system/nsec3_impersonation/tests_nsec3_impersonation.py
+++ b/bin/tests/system/nsec3_impersonation/tests_nsec3_impersonation.py
@@ -86,6 +86,7 @@ def check_ds_response(zone):
), response
+@pytest.mark.asyncserver_test
def test_attack_responses():
check_dnskey_response("tld.test.")
check_dnskey_response(ATTACKER)
diff --git a/bin/tests/system/nsec_grandparent/tests_nsec_grandparent.py b/bin/tests/system/nsec_grandparent/tests_nsec_grandparent.py
index 0a3cb3ea6e..def9f26f2c 100644
--- a/bin/tests/system/nsec_grandparent/tests_nsec_grandparent.py
+++ b/bin/tests/system/nsec_grandparent/tests_nsec_grandparent.py
@@ -174,6 +174,7 @@ def _check_refusal_logged(server, qname, expected_log):
watcher.wait_for_line(f"validating {qname.rstrip('.')}/A: {expected_log}")
+@pytest.mark.asyncserver_test
def test_auth_serves_forged_grandparent_nsec(ans1):
"""
Check the attacker's server, not the resolver.
@@ -265,6 +266,7 @@ def test_resolver_rejects_sibling_zone_nsec3(ns2):
_check_refusal_logged(ns2, ATTACK3_SIBLING, IGNORED_NSEC3_LOG)
+@pytest.mark.asyncserver_test
def test_auth_serves_mixed_signer_grandparent_nsec(ans1):
"""
Premise check for the #6321 reproducers below, again against ans1
@@ -370,6 +372,7 @@ def test_resolver_rejects_mixed_signer_nsec_from_cache(ns2, ans1):
assert _ans_query_count(ans1, ATTACK_DUMMY_FIRST_CACHED, "DS") == 0
+@pytest.mark.asyncserver_test
def test_auth_serves_many_rrsig_grandparent_nsec(ans1):
"""
Premise check for the RRSIG-count tests below, against ans1 directly.
diff --git a/bin/tests/system/nsec_synthesis/tests_nsec_child_next.py b/bin/tests/system/nsec_synthesis/tests_nsec_child_next.py
index ff0d032247..9415bb8966 100644
--- a/bin/tests/system/nsec_synthesis/tests_nsec_child_next.py
+++ b/bin/tests/system/nsec_synthesis/tests_nsec_child_next.py
@@ -9,6 +9,8 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
+import pytest
+
from nsec_synthesis.common import (
F023_ZONE,
SIGNED_ZONE_MARKS,
@@ -48,6 +50,7 @@ def _prime_parent_for_aggressive_nsec(resolver):
isctest.check.adflag(nsec)
+@pytest.mark.asyncserver_test
def test_direct_insecure_child_nsec_next_fixture(ans4, f023_key_tags):
poison = isctest.query.tcp(isctest.query.create(POISON, "NSEC"), ans4.ip)
isctest.check.noerror(poison)
diff --git a/bin/tests/system/nsec_wildcard_wrong_zone/tests_nsec_wildcard_wrong_zone.py b/bin/tests/system/nsec_wildcard_wrong_zone/tests_nsec_wildcard_wrong_zone.py
index cdfe5ca5df..6dc2914166 100644
--- a/bin/tests/system/nsec_wildcard_wrong_zone/tests_nsec_wildcard_wrong_zone.py
+++ b/bin/tests/system/nsec_wildcard_wrong_zone/tests_nsec_wildcard_wrong_zone.py
@@ -49,6 +49,7 @@ def autouse_flush_resolver_cache(ns2):
ns2.rndc("flush")
+@pytest.mark.asyncserver_test
def test_forged_response_contains_cross_zone_nsec(ans1):
response = isctest.query.tcp(isctest.query.create(ATTACK, "A"), ans1.ip)
isctest.check.nxdomain(response)
diff --git a/bin/tests/system/pytest.ini b/bin/tests/system/pytest.ini
index fce4abff24..653867c74a 100644
--- a/bin/tests/system/pytest.ini
+++ b/bin/tests/system/pytest.ini
@@ -22,3 +22,4 @@ markers =
requires_zones_loaded: ensures the test does not start until the specified named instances load all configured zones
algorithm_set: use to select desired algorithms from isctest/vars/algorithms.py
extra_artifacts: list of files (globs) that are expected to appear in the test directory after the test is run
+ asyncserver_test: the test checks what a custom server (ansN) sends, not what named does