From: Evan Hunt Date: Fri, 7 Aug 2026 02:03:37 +0000 (-0700) Subject: fold rollover_algo_csk test into rollover X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8cd77dfb7d5e6f638ceeb53bd7e91ae98d35fed7;p=thirdparty%2Fbind9.git fold rollover_algo_csk test into rollover "rollover" and related tests share a lot of common files. they could be a single system test directory with modules using config files rendered by jinja2. this commit merges the "rollover_algo_csk" test into "rollover". --- diff --git a/bin/tests/system/rollover_algo_csk/ns3/named.conf.j2 b/bin/tests/system/rollover/ns3/named-algo-csk.conf.j2 similarity index 92% rename from bin/tests/system/rollover_algo_csk/ns3/named.conf.j2 rename to bin/tests/system/rollover/ns3/named-algo-csk.conf.j2 index 0ab2d22439a..6042c098785 100644 --- a/bin/tests/system/rollover_algo_csk/ns3/named.conf.j2 +++ b/bin/tests/system/rollover/ns3/named-algo-csk.conf.j2 @@ -1,5 +1,5 @@ {% set csk_roll = csk_roll | default(False) %} -{% set _csk_file = "csk1.conf" if not csk_roll else "csk2.conf" %} +{% set _csk_file = "policy/csk1.conf" if not csk_roll else "policy/csk2.conf" %} {% set zones = ["kasp", "manual"] %} include "@_csk_file@"; diff --git a/bin/tests/system/rollover/ns3/named-rollover.conf.j2 b/bin/tests/system/rollover/ns3/named-rollover.conf.j2 new file mode 100644 index 00000000000..ef7b30883cb --- /dev/null +++ b/bin/tests/system/rollover/ns3/named-rollover.conf.j2 @@ -0,0 +1,12 @@ +include "kasp.conf"; +include "named.common.conf"; + +{% for zone in ['manual-rollover.kasp', 'manual-rollover-zrrsig-rumoured.kasp'] %} +zone "@zone@" { + type primary; + file "@zone@.db"; + dnssec-policy "manual-rollover"; + notify no; +}; + +{% endfor %} diff --git a/bin/tests/system/rollover/ns3/named.conf.j2 b/bin/tests/system/rollover/ns3/named.conf.j2 index ef7b30883cb..27598c4c7c1 100644 --- a/bin/tests/system/rollover/ns3/named.conf.j2 +++ b/bin/tests/system/rollover/ns3/named.conf.j2 @@ -1,12 +1 @@ -include "kasp.conf"; -include "named.common.conf"; - -{% for zone in ['manual-rollover.kasp', 'manual-rollover-zrrsig-rumoured.kasp'] %} -zone "@zone@" { - type primary; - file "@zone@.db"; - dnssec-policy "manual-rollover"; - notify no; -}; - -{% endfor %} +include "named-@testconf@.conf"; diff --git a/bin/tests/system/rollover_algo_csk/ns3/csk1.conf b/bin/tests/system/rollover/ns3/policy/csk1.conf similarity index 100% rename from bin/tests/system/rollover_algo_csk/ns3/csk1.conf rename to bin/tests/system/rollover/ns3/policy/csk1.conf diff --git a/bin/tests/system/rollover_algo_csk/ns3/csk2.conf b/bin/tests/system/rollover/ns3/policy/csk2.conf similarity index 100% rename from bin/tests/system/rollover_algo_csk/ns3/csk2.conf rename to bin/tests/system/rollover/ns3/policy/csk2.conf diff --git a/bin/tests/system/rollover/setup.py b/bin/tests/system/rollover/setup.py index 97bed7e1e88..ddf07b2df48 100644 --- a/bin/tests/system/rollover/setup.py +++ b/bin/tests/system/rollover/setup.py @@ -158,7 +158,9 @@ def configure_algo_csk(tld: str, policy: str, reconfig: bool = False) -> list[Zo TsbmN = "now-161h" csktimes = f"-P {TactN} -A {TactN}" # Key generation. - csk_name = keygen(f"-l csk1.conf {csktimes} {zonename}", cwd="ns3").out.strip() + csk_name = keygen( + f"-l policy/csk1.conf {csktimes} {zonename}", cwd="ns3" + ).out.strip() # Key state timing metadata. timings = SettimeOptions( g="OMNIPRESENT", @@ -182,8 +184,12 @@ def configure_algo_csk(tld: str, policy: str, reconfig: bool = False) -> list[Zo csktimes = f"-P {TactN} -A {TactN} -P sync {TsbmN} -I now" newtimes = f"-P {TpubN1} -A {TpubN1}" # Key generation. - csk1_name = keygen(f"-l csk1.conf {csktimes} {zonename}", cwd="ns3").out.strip() - csk2_name = keygen(f"-l csk2.conf {newtimes} {zonename}", cwd="ns3").out.strip() + csk1_name = keygen( + f"-l policy/csk1.conf {csktimes} {zonename}", cwd="ns3" + ).out.strip() + csk2_name = keygen( + f"-l policy/csk2.conf {newtimes} {zonename}", cwd="ns3" + ).out.strip() # Key state timing metadata. timings = SettimeOptions( g="HIDDEN", @@ -215,8 +221,12 @@ def configure_algo_csk(tld: str, policy: str, reconfig: bool = False) -> list[Zo csktimes = f"-P {TactN} -A {TactN} -P sync {TsbmN} -I {TsbmN1}" newtimes = f"-P {TpubN1} -A {TpubN1} -P sync {TsbmN1}" # Key generation. - csk1_name = keygen(f"-l csk1.conf {csktimes} {zonename}", cwd="ns3").out.strip() - csk2_name = keygen(f"-l csk2.conf {newtimes} {zonename}", cwd="ns3").out.strip() + csk1_name = keygen( + f"-l policy/csk1.conf {csktimes} {zonename}", cwd="ns3" + ).out.strip() + csk2_name = keygen( + f"-l policy/csk2.conf {newtimes} {zonename}", cwd="ns3" + ).out.strip() # Key state timing metadata. timings = SettimeOptions( g="HIDDEN", @@ -248,8 +258,12 @@ def configure_algo_csk(tld: str, policy: str, reconfig: bool = False) -> list[Zo csktimes = f"-P {TactN} -A {TactN} -P sync {TsbmN} -I {TsbmN1}" newtimes = f"-P {TpubN1} -A {TpubN1} -P sync {TsbmN1}" # Key generation. - csk1_name = keygen(f"-l csk1.conf {csktimes} {zonename}", cwd="ns3").out.strip() - csk2_name = keygen(f"-l csk2.conf {newtimes} {zonename}", cwd="ns3").out.strip() + csk1_name = keygen( + f"-l policy/csk1.conf {csktimes} {zonename}", cwd="ns3" + ).out.strip() + csk2_name = keygen( + f"-l policy/csk2.conf {newtimes} {zonename}", cwd="ns3" + ).out.strip() # Key state timing metadata. timings = SettimeOptions( g="HIDDEN", @@ -283,8 +297,12 @@ def configure_algo_csk(tld: str, policy: str, reconfig: bool = False) -> list[Zo csktimes = f"-P {TactN} -A {TactN} -P sync {TsbmN} -I {TsbmN1}" newtimes = f"-P {TpubN1} -A {TpubN1} -P sync {TsbmN1}" # Key generation. - csk1_name = keygen(f"-l csk1.conf {csktimes} {zonename}", cwd="ns3").out.strip() - csk2_name = keygen(f"-l csk2.conf {newtimes} {zonename}", cwd="ns3").out.strip() + csk1_name = keygen( + f"-l policy/csk1.conf {csktimes} {zonename}", cwd="ns3" + ).out.strip() + csk2_name = keygen( + f"-l policy/csk2.conf {newtimes} {zonename}", cwd="ns3" + ).out.strip() # Key state timing metadata. timings = SettimeOptions( g="HIDDEN", @@ -316,8 +334,12 @@ def configure_algo_csk(tld: str, policy: str, reconfig: bool = False) -> list[Zo csktimes = f"-P {TactN} -A {TactN} -P sync {TsbmN} -I {TsbmN1}" newtimes = f"-P {TpubN1} -A {TpubN1} -P sync {TsbmN1}" # Key generation. - csk1_name = keygen(f"-l csk1.conf {csktimes} {zonename}", cwd="ns3").out.strip() - csk2_name = keygen(f"-l csk2.conf {newtimes} {zonename}", cwd="ns3").out.strip() + csk1_name = keygen( + f"-l policy/csk1.conf {csktimes} {zonename}", cwd="ns3" + ).out.strip() + csk2_name = keygen( + f"-l policy/csk2.conf {newtimes} {zonename}", cwd="ns3" + ).out.strip() # Key state timing metadata. timings = SettimeOptions( g="HIDDEN", diff --git a/bin/tests/system/rollover_algo_csk/tests_rollover_algo_csk_initial.py b/bin/tests/system/rollover/tests_rollover_algo_csk_initial.py similarity index 98% rename from bin/tests/system/rollover_algo_csk/tests_rollover_algo_csk_initial.py rename to bin/tests/system/rollover/tests_rollover_algo_csk_initial.py index 7126f21766d..6d0216373b4 100644 --- a/bin/tests/system/rollover_algo_csk/tests_rollover_algo_csk_initial.py +++ b/bin/tests/system/rollover/tests_rollover_algo_csk_initial.py @@ -26,6 +26,7 @@ def bootstrap(): data = { "tlds": [], "trust_anchors": [], + "testconf": "algo-csk", } tlds = [] diff --git a/bin/tests/system/rollover_algo_csk/tests_rollover_algo_csk_reconfig.py b/bin/tests/system/rollover/tests_rollover_algo_csk_reconfig.py similarity index 99% rename from bin/tests/system/rollover_algo_csk/tests_rollover_algo_csk_reconfig.py rename to bin/tests/system/rollover/tests_rollover_algo_csk_reconfig.py index e83763e6012..f0d1f0e65bb 100644 --- a/bin/tests/system/rollover_algo_csk/tests_rollover_algo_csk_reconfig.py +++ b/bin/tests/system/rollover/tests_rollover_algo_csk_reconfig.py @@ -42,6 +42,7 @@ def bootstrap(): data = { "tlds": [], "trust_anchors": [], + "testconf": "algo-csk", } tlds = [] @@ -70,7 +71,7 @@ def after_servers_start(ns3, templates): isctest.kasp.wait_keymgr_done(ns3, "step1.csk-algorithm-roll.kasp") - templates.render("ns3/named.conf", {"csk_roll": True}) + templates.render("ns3/named-algo-csk.conf", {"csk_roll": True}) start_time = KeyTimingMetadata.now() ns3.reconfigure() diff --git a/bin/tests/system/rollover/tests_rollover_manual.py b/bin/tests/system/rollover/tests_rollover_manual.py index 004cc1c9013..9a9012c0a97 100644 --- a/bin/tests/system/rollover/tests_rollover_manual.py +++ b/bin/tests/system/rollover/tests_rollover_manual.py @@ -118,6 +118,7 @@ def bootstrap(): data = { "tlds": [], "trust_anchors": [], + "testconf": "rollover", } tld = configure_tld("kasp", zones) data["tlds"].append("kasp") diff --git a/bin/tests/system/rollover_algo_csk/ns1 b/bin/tests/system/rollover_algo_csk/ns1 deleted file mode 120000 index 76608beaedd..00000000000 --- a/bin/tests/system/rollover_algo_csk/ns1 +++ /dev/null @@ -1 +0,0 @@ -../rollover/ns1 \ No newline at end of file diff --git a/bin/tests/system/rollover_algo_csk/ns2 b/bin/tests/system/rollover_algo_csk/ns2 deleted file mode 120000 index 41a09bb648b..00000000000 --- a/bin/tests/system/rollover_algo_csk/ns2 +++ /dev/null @@ -1 +0,0 @@ -../rollover/ns2 \ No newline at end of file diff --git a/bin/tests/system/rollover_algo_csk/ns3/named.common.conf.j2 b/bin/tests/system/rollover_algo_csk/ns3/named.common.conf.j2 deleted file mode 120000 index 5dc26178cb1..00000000000 --- a/bin/tests/system/rollover_algo_csk/ns3/named.common.conf.j2 +++ /dev/null @@ -1 +0,0 @@ -../../rollover/ns3/named.common.conf.j2 \ No newline at end of file diff --git a/bin/tests/system/rollover_algo_csk/ns3/template.db.j2.manual b/bin/tests/system/rollover_algo_csk/ns3/template.db.j2.manual deleted file mode 120000 index 38619a01b24..00000000000 --- a/bin/tests/system/rollover_algo_csk/ns3/template.db.j2.manual +++ /dev/null @@ -1 +0,0 @@ -../../rollover/ns3/template.db.j2.manual \ No newline at end of file diff --git a/bin/tests/system/rollover_algo_csk/ns3/trusted.conf.j2 b/bin/tests/system/rollover_algo_csk/ns3/trusted.conf.j2 deleted file mode 120000 index 3e7d850edf4..00000000000 --- a/bin/tests/system/rollover_algo_csk/ns3/trusted.conf.j2 +++ /dev/null @@ -1 +0,0 @@ -../../rollover/ns3/trusted.conf.j2 \ No newline at end of file