Commit 5fd2cd93a6 for bind
commit 5fd2cd93a6db8328cfe9d902ce3eb7569d816267
Author: Nicki Křížek <nicki@isc.org>
Date: Thu Sep 24 15:28:36 2026 +0000
Fold the rpzrecurse setup.sh into bootstrap()
The only thing left in it was the loop writing the 64 policy zones for
the maximum-zones test, which now sits next to the other generated
zones; the output is byte-identical.
Assisted-by: Claude:claude-opus-5-5
diff --git a/bin/tests/system/rpzrecurse/common.py b/bin/tests/system/rpzrecurse/common.py
index 545b6edfd6..07b48610cb 100644
--- a/bin/tests/system/rpzrecurse/common.py
+++ b/bin/tests/system/rpzrecurse/common.py
@@ -87,3 +87,9 @@ def bootstrap():
write_case(templates, "6a", 0, [[]], qname_wait_recurse=True)
write_case(templates, "6b", 0, [["nsdname"]], qname_wait_recurse=True, serial=2)
write_case(templates, "6c", 0, [[]], qname_wait_recurse=True, serial=3)
+
+ # policy zones for the 64-zone test (named.max.conf)
+ for num in range(1, 65):
+ templates.render(
+ f"ns2/db.max{num}.local", {"num": num}, template="ns2/max.db.j2.manual"
+ )
diff --git a/bin/tests/system/rpzrecurse/ns2/max.db.j2.manual b/bin/tests/system/rpzrecurse/ns2/max.db.j2.manual
new file mode 100644
index 0000000000..45ffe48339
--- /dev/null
+++ b/bin/tests/system/rpzrecurse/ns2/max.db.j2.manual
@@ -0,0 +1,12 @@
+{#
+ Policy zone max<num> for the 64-zone test: name1 to name<num> all point
+ at 10.53.0.<num>, so the answer to name<num> identifies the zone it
+ came from.
+#}
+$TTL 60
+{% raw %}@{% endraw %} IN SOA root.ns ns 1996072700 3600 1800 86400 60
+ NS ns
+ns A 127.0.0.1
+{% for j in range(1, num + 1) %}
+name@j@ A 10.53.0.@num@
+{% endfor %}
diff --git a/bin/tests/system/rpzrecurse/setup.sh b/bin/tests/system/rpzrecurse/setup.sh
deleted file mode 100644
index 5362e0d82c..0000000000
--- a/bin/tests/system/rpzrecurse/setup.sh
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/sh
-
-# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-#
-# SPDX-License-Identifier: MPL-2.0
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, you can obtain one at https://mozilla.org/MPL/2.0/.
-#
-# See the COPYRIGHT file distributed with this work for additional
-# information regarding copyright ownership.
-
-set -e
-
-. ../conf.sh
-
-# setup policy zones for a 64-zone test
-i=1
-while test $i -le 64; do
- echo "\$TTL 60" >ns2/db.max$i.local
- echo "@ IN SOA root.ns ns 1996072700 3600 1800 86400 60" >>ns2/db.max$i.local
- echo " NS ns" >>ns2/db.max$i.local
- echo "ns A 127.0.0.1" >>ns2/db.max$i.local
-
- j=1
- while test $j -le $i; do
- echo "name$j A 10.53.0.$i" >>ns2/db.max$i.local
- j=$((j + 1))
- done
- i=$((i + 1))
-done