From: =?utf-8?b?UGV0ciDFoHBhxI1law==?= <pspacek@isc.org>
Date: Wed, 29 May 2024 18:28:58 +0200
Subject: masterformat: rename zone names to reflect intended meaning

(cherry picked from commit d34bfb1eeaa2f8faab80b1620b992b5495e6f88c)
---
 bin/tests/system/masterformat/ns1/255types.db.in   | 22 +++++++++++++++++
 bin/tests/system/masterformat/ns1/compile.sh       |  8 +++----
 bin/tests/system/masterformat/ns1/huge.db.in       | 22 -----------------
 bin/tests/system/masterformat/ns1/large.db.in      | 22 -----------------
 bin/tests/system/masterformat/ns1/many.db.in       | 22 -----------------
 bin/tests/system/masterformat/ns1/named.conf.in    | 16 ++++++-------
 bin/tests/system/masterformat/ns1/on-limit.db.in   | 22 +++++++++++++++++
 bin/tests/system/masterformat/ns1/over-limit.db.in | 22 +++++++++++++++++
 bin/tests/system/masterformat/ns1/uber.db.in       | 22 -----------------
 .../system/masterformat/ns1/under-limit.db.in      | 22 +++++++++++++++++
 bin/tests/system/masterformat/ns2/named.conf.in    | 12 +++++-----
 bin/tests/system/masterformat/setup.sh             | 22 ++++++++++-------
 bin/tests/system/masterformat/tests.sh             | 28 +++++++++++-----------
 13 files changed, 133 insertions(+), 129 deletions(-)
 create mode 100644 bin/tests/system/masterformat/ns1/255types.db.in
 delete mode 100644 bin/tests/system/masterformat/ns1/huge.db.in
 delete mode 100644 bin/tests/system/masterformat/ns1/large.db.in
 delete mode 100644 bin/tests/system/masterformat/ns1/many.db.in
 create mode 100644 bin/tests/system/masterformat/ns1/on-limit.db.in
 create mode 100644 bin/tests/system/masterformat/ns1/over-limit.db.in
 delete mode 100644 bin/tests/system/masterformat/ns1/uber.db.in
 create mode 100644 bin/tests/system/masterformat/ns1/under-limit.db.in

diff --git a/bin/tests/system/masterformat/ns1/255types.db.in b/bin/tests/system/masterformat/ns1/255types.db.in
new file mode 100644
index 0000000..5a81863
--- /dev/null
+++ b/bin/tests/system/masterformat/ns1/255types.db.in
@@ -0,0 +1,22 @@
+; 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.
+
+$TTL 1D
+
+@			IN SOA	ns hostmaster (
+				1
+				3600
+				1800
+				1814400
+				3
+				)
+			NS	ns
+ns			A	10.53.0.1
diff --git a/bin/tests/system/masterformat/ns1/compile.sh b/bin/tests/system/masterformat/ns1/compile.sh
index 7e6931e..7eee7cc 100755
--- a/bin/tests/system/masterformat/ns1/compile.sh
+++ b/bin/tests/system/masterformat/ns1/compile.sh
@@ -26,12 +26,12 @@ $CHECKZONE -D -F raw=0 -o example.db.compat example-compat \
   example.db >/dev/null 2>&1
 $CHECKZONE -D -F raw -L 3333 -o example.db.serial.raw example \
   example.db >/dev/null 2>&1
-$CHECKZONE -D -F raw -o large.db.raw large large.db >/dev/null 2>&1
+$CHECKZONE -D -F raw -o under-limit.db.raw under-limit under-limit.db >/dev/null 2>&1
 $CHECKZONE -D -F map -o example.db.map example-map \
   example.db >/dev/null 2>&1
-$CHECKZONE -D -F raw -o huge.db.raw huge huge.db >/dev/null 2>&1
-$CHECKZONE -D -F raw -o uber.db.raw uber uber.db >/dev/null 2>&1
-$CHECKZONE -D -F raw -o many.db.raw many many.db >/dev/null 2>&1
+$CHECKZONE -D -F raw -o on-limit.db.raw on-limit on-limit.db >/dev/null 2>&1
+$CHECKZONE -D -F raw -o over-limit.db.raw over-limit over-limit.db >/dev/null 2>&1
+$CHECKZONE -D -F raw -o 255types.db.raw 255types 255types.db >/dev/null 2>&1
 
 $KEYGEN -q -a "$DEFAULT_ALGORITHM" -b "$DEFAULT_BITS" -f KSK signed >/dev/null 2>&1
 $KEYGEN -q -a "$DEFAULT_ALGORITHM" -b "$DEFAULT_BITS" signed >/dev/null 2>&1
diff --git a/bin/tests/system/masterformat/ns1/huge.db.in b/bin/tests/system/masterformat/ns1/huge.db.in
deleted file mode 100644
index 5a81863..0000000
--- a/bin/tests/system/masterformat/ns1/huge.db.in
+++ /dev/null
@@ -1,22 +0,0 @@
-; 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.
-
-$TTL 1D
-
-@			IN SOA	ns hostmaster (
-				1
-				3600
-				1800
-				1814400
-				3
-				)
-			NS	ns
-ns			A	10.53.0.1
diff --git a/bin/tests/system/masterformat/ns1/large.db.in b/bin/tests/system/masterformat/ns1/large.db.in
deleted file mode 100644
index 5a81863..0000000
--- a/bin/tests/system/masterformat/ns1/large.db.in
+++ /dev/null
@@ -1,22 +0,0 @@
-; 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.
-
-$TTL 1D
-
-@			IN SOA	ns hostmaster (
-				1
-				3600
-				1800
-				1814400
-				3
-				)
-			NS	ns
-ns			A	10.53.0.1
diff --git a/bin/tests/system/masterformat/ns1/many.db.in b/bin/tests/system/masterformat/ns1/many.db.in
deleted file mode 100644
index 5a81863..0000000
--- a/bin/tests/system/masterformat/ns1/many.db.in
+++ /dev/null
@@ -1,22 +0,0 @@
-; 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.
-
-$TTL 1D
-
-@			IN SOA	ns hostmaster (
-				1
-				3600
-				1800
-				1814400
-				3
-				)
-			NS	ns
-ns			A	10.53.0.1
diff --git a/bin/tests/system/masterformat/ns1/named.conf.in b/bin/tests/system/masterformat/ns1/named.conf.in
index 6d55dfb..85642a9 100644
--- a/bin/tests/system/masterformat/ns1/named.conf.in
+++ b/bin/tests/system/masterformat/ns1/named.conf.in
@@ -72,31 +72,31 @@ zone "transfer4" {
 };
 
 
-zone "large" {
+zone "under-limit" {
 	type primary;
-	file "large.db.raw";
+	file "under-limit.db.raw";
 	masterfile-format raw;
 	allow-transfer { any; };
 };
 
-zone "huge" {
+zone "on-limit" {
 	type primary;
-	file "huge.db.raw";
+	file "on-limit.db.raw";
 	masterfile-format raw;
 	allow-transfer { any; };
 };
 
 
-zone "uber" {
+zone "over-limit" {
 	type primary;
-	file "uber.db.raw";
+	file "over-limit.db.raw";
 	masterfile-format raw;
 	allow-transfer { any; };
 };
 
-zone "many" {
+zone "255types" {
 	type primary;
-	file "many.db.raw";
+	file "255types.db.raw";
 	masterfile-format raw;
 	allow-transfer { any; };
 };
diff --git a/bin/tests/system/masterformat/ns1/on-limit.db.in b/bin/tests/system/masterformat/ns1/on-limit.db.in
new file mode 100644
index 0000000..5a81863
--- /dev/null
+++ b/bin/tests/system/masterformat/ns1/on-limit.db.in
@@ -0,0 +1,22 @@
+; 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.
+
+$TTL 1D
+
+@			IN SOA	ns hostmaster (
+				1
+				3600
+				1800
+				1814400
+				3
+				)
+			NS	ns
+ns			A	10.53.0.1
diff --git a/bin/tests/system/masterformat/ns1/over-limit.db.in b/bin/tests/system/masterformat/ns1/over-limit.db.in
new file mode 100644
index 0000000..5a81863
--- /dev/null
+++ b/bin/tests/system/masterformat/ns1/over-limit.db.in
@@ -0,0 +1,22 @@
+; 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.
+
+$TTL 1D
+
+@			IN SOA	ns hostmaster (
+				1
+				3600
+				1800
+				1814400
+				3
+				)
+			NS	ns
+ns			A	10.53.0.1
diff --git a/bin/tests/system/masterformat/ns1/uber.db.in b/bin/tests/system/masterformat/ns1/uber.db.in
deleted file mode 100644
index 5a81863..0000000
--- a/bin/tests/system/masterformat/ns1/uber.db.in
+++ /dev/null
@@ -1,22 +0,0 @@
-; 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.
-
-$TTL 1D
-
-@			IN SOA	ns hostmaster (
-				1
-				3600
-				1800
-				1814400
-				3
-				)
-			NS	ns
-ns			A	10.53.0.1
diff --git a/bin/tests/system/masterformat/ns1/under-limit.db.in b/bin/tests/system/masterformat/ns1/under-limit.db.in
new file mode 100644
index 0000000..5a81863
--- /dev/null
+++ b/bin/tests/system/masterformat/ns1/under-limit.db.in
@@ -0,0 +1,22 @@
+; 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.
+
+$TTL 1D
+
+@			IN SOA	ns hostmaster (
+				1
+				3600
+				1800
+				1814400
+				3
+				)
+			NS	ns
+ns			A	10.53.0.1
diff --git a/bin/tests/system/masterformat/ns2/named.conf.in b/bin/tests/system/masterformat/ns2/named.conf.in
index 64640cd..d4b2bb7 100644
--- a/bin/tests/system/masterformat/ns2/named.conf.in
+++ b/bin/tests/system/masterformat/ns2/named.conf.in
@@ -57,23 +57,23 @@ zone "transfer4" {
 	file "transfer.db.full";
 };
 
-zone "large" {
+zone "under-limit" {
 	type secondary;
 	primaries { 10.53.0.1; };
 	masterfile-format raw;
-	file "large.bk";
+	file "under-limit.bk";
 };
 
-zone "huge" {
+zone "on-limit" {
 	type secondary;
 	primaries { 10.53.0.1; };
 	masterfile-format raw;
-	file "huge.bk";
+	file "on-limit.bk";
 };
 
-zone "many" {
+zone "255types" {
 	type secondary;
 	primaries { 10.53.0.1; };
 	masterfile-format raw;
-	file "many.bk";
+	file "255types.bk";
 };
diff --git a/bin/tests/system/masterformat/setup.sh b/bin/tests/system/masterformat/setup.sh
index 737c590..272bd31 100755
--- a/bin/tests/system/masterformat/setup.sh
+++ b/bin/tests/system/masterformat/setup.sh
@@ -22,30 +22,34 @@ copy_setports ns3/named.conf.in ns3/named.conf
 
 cp ns1/example.db ns2/
 cp ns2/formerly-text.db.in ns2/formerly-text.db
-cp ns1/large.db.in ns1/large.db
+cp ns1/under-limit.db.in ns1/under-limit.db
+
+# counts are set with respect to these limits in named.conf:
+#	max-records-per-type 2050;
+#	max-types-per-name 500;
 awk 'END {
 	 for (i = 0; i < 500; i++ ) { print "500-txt TXT", i; }
 	 for (i = 0; i < 1000; i++ ) { print "1000-txt TXT", i; }
 	 for (i = 0; i < 2000; i++ ) { print "2000-txt TXT", i; }
-}' </dev/null >>ns1/large.db
-cp ns1/huge.db.in ns1/huge.db
+}' </dev/null >>ns1/under-limit.db
+cp ns1/on-limit.db.in ns1/on-limit.db
 awk 'END {
 	 for (i = 0; i < 500; i++ ) { print "500-txt TXT", i; }
 	 for (i = 0; i < 1000; i++ ) { print "1000-txt TXT", i; }
 	 for (i = 0; i < 2000; i++ ) { print "2000-txt TXT", i; }
 	 for (i = 0; i < 2050; i++ ) { print "2050-txt TXT", i; }
-}' </dev/null >>ns1/huge.db
-cp ns1/uber.db.in ns1/uber.db
+}' </dev/null >>ns1/on-limit.db
+cp ns1/over-limit.db.in ns1/over-limit.db
 awk 'END {
 	 for (i = 0; i < 500; i++ ) { print "500-txt TXT", i; }
 	 for (i = 0; i < 1000; i++ ) { print "1000-txt TXT", i; }
 	 for (i = 0; i < 2000; i++ ) { print "2000-txt TXT", i; }
 	 for (i = 0; i < 2050; i++ ) { print "2050-txt TXT", i; }
 	 for (i = 0; i < 2100; i++ ) { print "2100-txt TXT", i; }
-}' </dev/null >>ns1/uber.db
-cp ns1/many.db.in ns1/many.db
+}' </dev/null >>ns1/over-limit.db
+cp ns1/255types.db.in ns1/255types.db
 for ntype in $(seq 65280 65534); do
   echo "m TYPE${ntype} \# 0"
-done >>ns1/many.db
-echo "m TXT bunny" >>ns1/many.db
+done >>ns1/255types.db
+echo "m TXT bunny" >>ns1/255types.db
 cd ns1 && $SHELL compile.sh
diff --git a/bin/tests/system/masterformat/tests.sh b/bin/tests/system/masterformat/tests.sh
index bcf6dbb..029bf62 100755
--- a/bin/tests/system/masterformat/tests.sh
+++ b/bin/tests/system/masterformat/tests.sh
@@ -184,11 +184,11 @@ n=$((n + 1))
 [ $ret -eq 0 ] || echo_i "failed"
 status=$((status + ret))
 
-echo_i "checking that large rdatasets loaded ($n)"
+echo_i "checking that under-limit rdatasets loaded ($n)"
 for _attempt in 0 1 2 3 4 5 6 7 8 9; do
   ret=0
   for rrcount in 500-txt 1000-txt 2000-txt; do
-    $DIG +tcp txt "${rrcount}.large" @10.53.0.1 -p "${PORT}" >"dig.out.ns1.$rrcount.test$n"
+    $DIG +tcp txt "${rrcount}.under-limit" @10.53.0.1 -p "${PORT}" >"dig.out.ns1.$rrcount.test$n"
     grep "status: NOERROR" "dig.out.ns1.$rrcount.test$n" >/dev/null || ret=1
   done
   [ $ret -eq 0 ] && break
@@ -198,11 +198,11 @@ n=$((n + 1))
 [ $ret -eq 0 ] || echo_i "failed"
 status=$((status + ret))
 
-echo_i "checking that large rdatasets transfered ($n)"
+echo_i "checking that under-limit rdatasets transfered ($n)"
 for _attempt in 0 1 2 3 4 5 6 7 8 9; do
   ret=0
   for rrcount in 500-txt 1000-txt 2000-txt; do
-    $DIG +tcp txt "${rrcount}.large" @10.53.0.2 -p "${PORT}" >"dig.out.ns2.$rrcount.test$n"
+    $DIG +tcp txt "${rrcount}.under-limit" @10.53.0.2 -p "${PORT}" >"dig.out.ns2.$rrcount.test$n"
     grep "status: NOERROR" "dig.out.ns2.$rrcount.test$n" >/dev/null || ret=1
   done
   [ $ret -eq 0 ] && break
@@ -212,11 +212,11 @@ n=$((n + 1))
 [ $ret -eq 0 ] || echo_i "failed"
 status=$((status + ret))
 
-echo_i "checking that huge rdatasets loaded ($n)"
+echo_i "checking that on-limit rdatasets loaded ($n)"
 for _attempt in 0 1 2 3 4 5 6 7 8 9; do
   ret=0
   for rrcount in 500-txt 1000-txt 2000-txt 2050-txt; do
-    $DIG +tcp txt "${rrcount}.huge" @10.53.0.1 -p "${PORT}" >"dig.out.ns1.$rrcount.test$n"
+    $DIG +tcp txt "${rrcount}.on-limit" @10.53.0.1 -p "${PORT}" >"dig.out.ns1.$rrcount.test$n"
     grep "status: NOERROR" "dig.out.ns1.$rrcount.test$n" >/dev/null || ret=1
   done
   [ $ret -eq 0 ] && break
@@ -226,11 +226,11 @@ n=$((n + 1))
 [ $ret -eq 0 ] || echo_i "failed"
 status=$((status + ret))
 
-echo_i "checking that huge rdatasets not transfered ($n)"
+echo_i "checking that on-limit rdatasets not transfered ($n)"
 for _attempt in 0 1 2 3 4 5 6 7 8 9; do
   ret=0
   for rrcount in 500-txt 1000-txt 2000-txt 2050-txt; do
-    $DIG +tcp txt "${rrcount}.huge" @10.53.0.2 -p "${PORT}" >"dig.out.ns2.$rrcount.test$n"
+    $DIG +tcp txt "${rrcount}.on-limit" @10.53.0.2 -p "${PORT}" >"dig.out.ns2.$rrcount.test$n"
     grep "status: SERVFAIL" "dig.out.ns2.$rrcount.test$n" >/dev/null || ret=1
   done
   [ $ret -eq 0 ] && break
@@ -240,11 +240,11 @@ n=$((n + 1))
 [ $ret -eq 0 ] || echo_i "failed"
 status=$((status + ret))
 
-echo_i "checking that uber rdatasets not loaded ($n)"
+echo_i "checking that over-limit rdatasets not loaded ($n)"
 for _attempt in 0 1 2 3 4 5 6 7 8 9; do
   ret=0
   for rrcount in 500-txt 1000-txt 2000-txt 2050-txt 2100-txt; do
-    $DIG +tcp txt "${rrcount}.uber" @10.53.0.1 -p "${PORT}" >"dig.out.ns1.$rrcount.test$n"
+    $DIG +tcp txt "${rrcount}.over-limit" @10.53.0.1 -p "${PORT}" >"dig.out.ns1.$rrcount.test$n"
     grep "status: SERVFAIL" "dig.out.ns1.$rrcount.test$n" >/dev/null || ret=1
   done
   [ $ret -eq 0 ] && break
@@ -254,10 +254,10 @@ n=$((n + 1))
 [ $ret -eq 0 ] || echo_i "failed"
 status=$((status + ret))
 
-echo_i "checking that many types are loaded ($n)"
+echo_i "checking that 255 types are loaded ($n)"
 for _attempt in 0 1 2 3 4 5 6 7 8 9; do
   ret=0
-  $DIG +tcp TXT "m.many" @10.53.0.1 -p "${PORT}" >"dig.out.ns1.test$n"
+  $DIG +tcp TXT "m.255types" @10.53.0.1 -p "${PORT}" >"dig.out.ns1.test$n"
   grep "status: NOERROR" "dig.out.ns1.test$n" >/dev/null || ret=1
   [ $ret -eq 0 ] && break
   sleep 1
@@ -266,9 +266,9 @@ n=$((n + 1))
 [ $ret -eq 0 ] || echo_i "failed"
 status=$((status + ret))
 
-echo_i "checking that many types are not transfered ($n)"
+echo_i "checking that 255 types types are not transfered ($n)"
 for _attempt in 0 1 2 3 4 5 6 7 8 9; do
-  $DIG +tcp TXT "m.many" @10.53.0.2 -p "${PORT}" >"dig.out.ns2.test$n"
+  $DIG +tcp TXT "m.255types" @10.53.0.2 -p "${PORT}" >"dig.out.ns2.test$n"
   grep "status: SERVFAIL" "dig.out.ns2.test$n" >/dev/null || ret=1
   [ $ret -eq 0 ] && break
   sleep 1
