summaryrefslogtreecommitdiffstats
path: root/bin/tests/system/legacy
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 15:59:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 15:59:48 +0000
commit3b9b6d0b8e7f798023c9d109c490449d528fde80 (patch)
tree2e1c188dd7b8d7475cd163de9ae02c428343669b /bin/tests/system/legacy
parentInitial commit. (diff)
downloadbind9-3b9b6d0b8e7f798023c9d109c490449d528fde80.tar.xz
bind9-3b9b6d0b8e7f798023c9d109c490449d528fde80.zip
Adding upstream version 1:9.18.19.upstream/1%9.18.19
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--bin/tests/system/legacy.run.sh.in311
-rw-r--r--bin/tests/system/legacy/build.sh21
-rw-r--r--bin/tests/system/legacy/clean.sh31
-rw-r--r--bin/tests/system/legacy/ns1/named1.conf.in38
-rw-r--r--bin/tests/system/legacy/ns1/named2.conf.in31
-rw-r--r--bin/tests/system/legacy/ns1/root.db33
-rw-r--r--bin/tests/system/legacy/ns1/trusted.conf16
-rw-r--r--bin/tests/system/legacy/ns10/ednsrefused.db14
-rw-r--r--bin/tests/system/legacy/ns10/named.conf.in29
-rw-r--r--bin/tests/system/legacy/ns10/named.ednsrefused1
-rw-r--r--bin/tests/system/legacy/ns2/dropedns.db14
-rw-r--r--bin/tests/system/legacy/ns2/named.conf.in29
-rw-r--r--bin/tests/system/legacy/ns2/named.dropedns1
-rw-r--r--bin/tests/system/legacy/ns3/dropedns-notcp.db14
-rw-r--r--bin/tests/system/legacy/ns3/named.conf.in29
-rw-r--r--bin/tests/system/legacy/ns3/named.dropedns1
-rw-r--r--bin/tests/system/legacy/ns3/named.notcp1
-rw-r--r--bin/tests/system/legacy/ns4/named.args1
-rw-r--r--bin/tests/system/legacy/ns4/named.conf.in29
-rw-r--r--bin/tests/system/legacy/ns4/plain.db14
-rw-r--r--bin/tests/system/legacy/ns5/named.args1
-rw-r--r--bin/tests/system/legacy/ns5/named.conf.in29
-rw-r--r--bin/tests/system/legacy/ns5/named.notcp1
-rw-r--r--bin/tests/system/legacy/ns5/plain-notcp.db14
-rw-r--r--bin/tests/system/legacy/ns6/edns512.db.in15
-rw-r--r--bin/tests/system/legacy/ns6/edns512.db.signed226
-rw-r--r--bin/tests/system/legacy/ns6/named.args1
-rw-r--r--bin/tests/system/legacy/ns6/named.conf.in29
-rwxr-xr-xbin/tests/system/legacy/ns6/sign.sh30
-rw-r--r--bin/tests/system/legacy/ns7/edns512-notcp.db.in15
-rw-r--r--bin/tests/system/legacy/ns7/edns512-notcp.db.signed226
-rw-r--r--bin/tests/system/legacy/ns7/named.args1
-rw-r--r--bin/tests/system/legacy/ns7/named.conf.in29
-rw-r--r--bin/tests/system/legacy/ns7/named.notcp1
-rwxr-xr-xbin/tests/system/legacy/ns7/sign.sh33
-rw-r--r--bin/tests/system/legacy/ns8/ednsformerr.db14
-rw-r--r--bin/tests/system/legacy/ns8/named.conf.in29
-rw-r--r--bin/tests/system/legacy/ns8/named.ednsformerr1
-rw-r--r--bin/tests/system/legacy/ns9/ednsnotimp.db14
-rw-r--r--bin/tests/system/legacy/ns9/named.conf.in29
-rw-r--r--bin/tests/system/legacy/ns9/named.ednsnotimp1
-rw-r--r--bin/tests/system/legacy/setup.sh25
-rwxr-xr-xbin/tests/system/legacy/tests.sh269
-rw-r--r--bin/tests/system/legacy/tests_sh_legacy.py14
44 files changed, 1705 insertions, 0 deletions
diff --git a/bin/tests/system/legacy.run.sh.in b/bin/tests/system/legacy.run.sh.in
new file mode 100644
index 0000000..b523637
--- /dev/null
+++ b/bin/tests/system/legacy.run.sh.in
@@ -0,0 +1,311 @@
+#!/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.
+
+#
+# Run a system test.
+#
+
+top_builddir=@top_builddir@
+builddir=@abs_builddir@
+srcdir=@abs_srcdir@
+
+# shellcheck source=conf.sh
+. ${builddir}/conf.sh
+
+if [ "$CI_SERVER" != "yes" ] && [ "$(id -u)" -eq "0" ] && [ "@DEVELOPER_MODE@" != "yes" ]; then
+ echofail "Refusing to run test as root. Build with --enable-developer to override." >&2
+ exit 1
+fi
+
+export builddir
+export srcdir
+
+date_with_args() (
+ date "+%Y-%m-%dT%T%z"
+)
+
+stopservers=true
+# baseport == 0 means random
+baseport=0
+
+if [ "${SYSTEMTEST_NO_CLEAN:-0}" -eq 1 ]; then
+ clean=false
+else
+ clean=true
+fi
+
+do_run=false
+restart=false
+log_flags="-r"
+while getopts "sknp:r-:t" OPT; do
+ log_flags="$log_flags -$OPT$OPTARG"
+ if [ "$OPT" = "-" ] && [ -n "$OPTARG" ]; then
+ OPT="${OPTARG%%=*}"
+ OPTARG="${OPTARG#$OPT}"
+ OPTARG="${OPTARG#=}"
+ fi
+
+ # shellcheck disable=SC2214
+ case "$OPT" in
+ k | keep) stopservers=false ;;
+ n | noclean) clean=false ;;
+ p | port) baseport=$OPTARG ;;
+ r | run) do_run=true ;;
+ s | skip) exit 77 ;;
+ t | restart) restart=true ;;
+ -) break ;;
+ *) echo "invalid option" >&2; exit 1 ;;
+ esac
+done
+
+shift $((OPTIND-1))
+
+if ! $do_run; then
+ if [ "$baseport" -eq 0 ]; then
+ log_flags="$log_flags -p 5300"
+ fi
+ env - \
+ CYGWIN="$CYGWIN" \
+ SYSTEMTEST_FORCE_COLOR="$SYSTEMTEST_FORCE_COLOR" \
+ SYSTEMTEST_NO_CLEAN="$SYSTEMTEST_NO_CLEAN" \
+ SLOT="$SLOT" \
+ OPENSSL_CONF="$OPENSSL_CONF" \
+ SOFTHSM2_CONF="$SOFTHSM2_CONF" \
+ SOFTHSM2_MODULE="$SOFTHSM2_MODULE" \
+ PATH="$PATH" \
+ ${LD_LIBRARY_PATH:+"LD_LIBRARY_PATH=${LD_LIBRARY_PATH}"} \
+ TESTS="$*" \
+ TEST_SUITE_LOG=run.log \
+ LOG_DRIVER_FLAGS="--verbose yes --color-tests yes" \
+ LOG_FLAGS="$log_flags" \
+ TEST_LARGE_MAP="${TEST_LARGE_MAP}" \
+ CI_ENABLE_ALL_TESTS="${CI_ENABLE_ALL_TESTS}" \
+ ${VIRTUAL_ENV:+"VIRTUAL_ENV=${VIRTUAL_ENV}"} \
+ ${PERL5LIB:+"PERL5LIB=${PERL5LIB}"} \
+ make -e check
+ exit $?
+fi
+
+if [ $# -eq 0 ]; then
+ echofail "Usage: $0 [-k] [-n] [-p <PORT>] test-directory [test-options]" >&2;
+ exit 1
+fi
+
+systest=$(basename "${1%%/}")
+shift
+
+if [ ! -d "${srcdir}/$systest" ]; then
+ echofail "$0: $systest: no such test" >&2
+ exit 1
+fi
+
+if [ "${srcdir}" != "${builddir}" ]; then
+ if [ ! -d common ] || [ ! -r common/.prepared ]; then
+ cp -a "${srcdir}/common" "${builddir}"
+ fi
+ # Some tests require additional files to work for out-of-tree test runs.
+ for file in ckdnsrps.sh conftest.py digcomp.pl ditch.pl fromhex.pl get_core_dumps.sh kasp.sh packet.pl pytest_custom_markers.py start.pl stop.pl testcrypto.sh; do
+ if [ ! -r "${file}" ]; then
+ cp -a "${srcdir}/${file}" "${builddir}"
+ fi
+ done
+ if [ ! -d "$systest" ] || [ ! -r "$systest/.prepared" ]; then
+ mkdir -p "${builddir}/$systest"
+ cp -a "${srcdir}/$systest" "${builddir}/"
+ touch "$systest/.prepared"
+ fi
+fi
+
+if [ ! -d "${systest}" ]; then
+ echofail "$0: $systest: no such test" >&2
+ exit 1
+fi
+
+
+# Determine which ports to use for this system test.
+eval "$(cd "${srcdir}" && ./get_ports.sh -p "$baseport" -t "$systest")"
+
+# Start all servers used by the system test. Ensure all log files written
+# during a system test (tests.sh + potentially multiple *.py scripts) are
+# retained for each run by calling start.pl with the --restart command-line
+# option for all invocations except the first one.
+start_servers() {
+ echoinfo "I:$systest:starting servers"
+ if $restart || [ "$run" -gt 0 ]; then
+ restart_opt="--restart"
+ fi
+ if ! $PERL start.pl ${restart_opt} --port "$PORT" "$systest"; then
+ echoinfo "I:$systest:starting servers failed"
+ return 1
+ fi
+}
+
+stop_servers() {
+ if $stopservers; then
+ echoinfo "I:$systest:stopping servers"
+ if ! $PERL stop.pl "$systest"; then
+ echoinfo "I:$systest:stopping servers failed"
+ return 1
+ fi
+ fi
+}
+
+echostart "S:$systest:$(date_with_args)"
+echoinfo "T:$systest:1:A"
+echoinfo "A:$systest:System test $systest"
+echoinfo "I:$systest:PORTS:${PORT},${TLSPORT},${HTTPPORT},${HTTPSPORT},${EXTRAPORT1},${EXTRAPORT2},${EXTRAPORT3},${EXTRAPORT4},${EXTRAPORT5},${EXTRAPORT6},${EXTRAPORT7},${EXTRAPORT8},${CONTROLPORT}"
+
+$PERL ${srcdir}/testsock.pl -p "$PORT" || {
+ echowarn "I:$systest:Network interface aliases not set up. Skipping test."
+ echowarn "R:$systest:FAIL"
+ echoend "E:$systest:$(date_with_args)"
+ exit 1;
+}
+
+# Check for test-specific prerequisites.
+test ! -f "$systest/prereq.sh" || ( cd "${systest}" && $SHELL prereq.sh "$@" )
+result=$?
+
+if [ $result -eq 0 ]; then
+ : prereqs ok
+else
+ echowarn "I:$systest:Prerequisites missing, skipping test."
+ echowarn "R:$systest:SKIPPED";
+ echoend "E:$systest:$(date_with_args)"
+ exit 77
+fi
+
+# Clean up files left from any potential previous runs except when
+# started with the --restart option.
+if ! $restart; then
+ if test -f "$systest/clean.sh"; then
+ if ! ( cd "${systest}" && $SHELL clean.sh "$@" ); then
+ echowarn "I:$systest:clean.sh script failed"
+ echofail "R:$systest:FAIL"
+ echoend "E:$systest:$(date_with_args)"
+ exit 1
+ fi
+ fi
+fi
+
+# Set up any dynamically generated test data
+if test -f "$systest/setup.sh"
+then
+ if ! ( cd "${systest}" && $SHELL setup.sh "$@" ); then
+ echowarn "I:$systest:setup.sh script failed"
+ echofail "R:$systest:FAIL"
+ echoend "E:$systest:$(date_with_args)"
+ exit 1
+ fi
+fi
+
+status=0
+run=0
+# Run the tests
+if [ -r "$systest/tests.sh" ]; then
+ if start_servers; then
+ ( cd "$systest" && $SHELL tests.sh "$@" )
+ status=$?
+ run=$((run+1))
+ stop_servers || status=1
+ else
+ status=1
+ fi
+fi
+
+if [ $status -eq 0 ]; then
+ if [ -n "$PYTEST" ]; then
+ for test in $(cd "${systest}" && find . -name "tests*.py" ! -name "tests_sh_*.py"); do
+ rm -f "$systest/$test.status"
+ if start_servers; then
+ run=$((run+1))
+ test_status=0
+ (cd "$systest" && LEGACY_TEST_RUNNER=1 "$PYTEST" -rsxX -v "$test" "$@" || echo "$?" > "$test.status") | SYSTESTDIR="$systest" cat_d
+ if [ -f "$systest/$test.status" ]; then
+ if [ "$(cat "$systest/$test.status")" = "5" ]; then
+ echowarn "R:$systest:SKIPPED"
+ else
+ echo_i "FAILED"
+ test_status=$(cat "$systest/$test.status")
+ fi
+ fi
+ status=$((status+test_status))
+ stop_servers || status=1
+ else
+ status=1
+ fi
+ if [ $status -ne 0 ]; then
+ break
+ fi
+ done
+ rm -f "$systest/$test.status"
+ else
+ echoinfo "I:$systest:pytest not installed, skipping python tests"
+ fi
+fi
+
+if [ "$run" -eq "0" ]; then
+ echoinfo "I:$systest:No tests were found and run"
+ status=255
+fi
+
+if $stopservers
+then
+ :
+else
+ exit $status
+fi
+
+$SHELL get_core_dumps.sh "$systest" || status=1
+
+print_outstanding_files() {
+ if test -d ${srcdir}/../../../.git; then
+ git status -su --ignored "${systest}/" 2>/dev/null | \
+ sed -n -e 's|^?? \(.*\)|I:'"${systest}"':file \1 not removed|p' \
+ -e 's|^!! \(.*/named.run\)$|I:'"${systest}"':file \1 not removed|p' \
+ -e 's|^!! \(.*/named.memstats\)$|I:'"${systest}"':file \1 not removed|p'
+ fi
+}
+
+print_outstanding_files_oot() {
+ if test -d ${srcdir}/../../../.git; then
+ git -C "${srcdir}/${systest}" ls-files | sed "s|^|${systest}/|" > gitfiles.txt
+ find "${systest}/" -type f ! -name .prepared ! -name Makefile > testfiles.txt
+ grep -F -x -v -f gitfiles.txt testfiles.txt
+ rm -f gitfiles.txt testfiles.txt
+ fi
+}
+
+if [ $status -ne 0 ]; then
+ echofail "R:$systest:FAIL"
+else
+ echopass "R:$systest:PASS"
+ if $clean && ! $restart; then
+ ( cd "${systest}" && $SHELL clean.sh "$@" )
+ if [ "${srcdir}" = "${builddir}" ]; then
+ print_outstanding_files
+ else
+ print_outstanding_files_oot | xargs rm -f
+ find "${systest}/" \( -type d -empty \) -delete 2>/dev/null
+ fi
+ fi
+fi
+
+NAMED_RUN_LINES_THRESHOLD=200000
+find "${systest}" -type f -name "named.run" -exec wc -l {} \; | awk "\$1 > ${NAMED_RUN_LINES_THRESHOLD} { print \$2 }" | sort | while read -r LOG_FILE; do
+ echowarn "I:${systest}:${LOG_FILE} contains more than ${NAMED_RUN_LINES_THRESHOLD} lines, consider tweaking the test to limit disk I/O"
+done
+
+echoend "E:$systest:$(date_with_args)"
+
+exit $status
diff --git a/bin/tests/system/legacy/build.sh b/bin/tests/system/legacy/build.sh
new file mode 100644
index 0000000..fcde4e1
--- /dev/null
+++ b/bin/tests/system/legacy/build.sh
@@ -0,0 +1,21 @@
+#!/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.
+
+. ../conf.sh
+
+$SHELL clean.sh
+
+(cd ns6 && $SHELL -e sign.sh)
+(cd ns7 && $SHELL -e sign.sh)
+
+$SHELL clean.sh
diff --git a/bin/tests/system/legacy/clean.sh b/bin/tests/system/legacy/clean.sh
new file mode 100644
index 0000000..4c65a2d
--- /dev/null
+++ b/bin/tests/system/legacy/clean.sh
@@ -0,0 +1,31 @@
+#!/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.
+
+rm -f dig.out.*
+rm -f ns*/named.conf
+rm -f ns*/named.memstats
+rm -f ns*/named.run
+rm -f ns*/named.lock
+
+# build.sh
+rm -f ns1/named_dump.db*
+rm -f ns6/K*
+rm -f ns6/dsset-*
+rm -f ns6/edns512.db
+rm -f ns6/signer.err
+rm -f ns7/K*
+rm -f ns7/dsset-*
+rm -f ns7/edns512-notcp.db
+rm -f ns7/signer.err
+rm -f ns7/trusted.conf
+rm -f ns*/managed-keys.bind*
diff --git a/bin/tests/system/legacy/ns1/named1.conf.in b/bin/tests/system/legacy/ns1/named1.conf.in
new file mode 100644
index 0000000..5c4b1c4
--- /dev/null
+++ b/bin/tests/system/legacy/ns1/named1.conf.in
@@ -0,0 +1,38 @@
+/*
+ * 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.
+ */
+
+options {
+ query-source address 10.53.0.1;
+ notify-source 10.53.0.1;
+ transfer-source 10.53.0.1;
+ port @PORT@;
+ pid-file "named.pid";
+ listen-on { 10.53.0.1; };
+ listen-on-v6 { none; };
+ recursion yes;
+ dnssec-validation yes;
+};
+
+key rndc_key {
+ secret "1234abcd8765";
+ algorithm @DEFAULT_HMAC@;
+};
+
+controls {
+ inet 10.53.0.1 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
+};
+
+zone "." {
+ type primary;
+ file "root.db";
+};
diff --git a/bin/tests/system/legacy/ns1/named2.conf.in b/bin/tests/system/legacy/ns1/named2.conf.in
new file mode 100644
index 0000000..239e58f
--- /dev/null
+++ b/bin/tests/system/legacy/ns1/named2.conf.in
@@ -0,0 +1,31 @@
+/*
+ * 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.
+ */
+
+options {
+ query-source address 10.53.0.1;
+ notify-source 10.53.0.1;
+ transfer-source 10.53.0.1;
+ port @PORT@;
+ pid-file "named.pid";
+ listen-on { 10.53.0.1; };
+ listen-on-v6 { none; };
+ recursion yes;
+ dnssec-validation yes;
+};
+
+zone "." {
+ type primary;
+ file "root.db";
+};
+
+include "trusted.conf";
diff --git a/bin/tests/system/legacy/ns1/root.db b/bin/tests/system/legacy/ns1/root.db
new file mode 100644
index 0000000..175847a
--- /dev/null
+++ b/bin/tests/system/legacy/ns1/root.db
@@ -0,0 +1,33 @@
+; 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 60
+. SOA ns1. marka.isc.org 1 0 0 0 0
+. NS ns1.
+ns1. A 10.53.0.1
+dropedns. NS ns.dropedns.
+ns.dropedns. A 10.53.0.2
+dropedns-notcp. NS ns.dropedns-notcp.
+ns.dropedns-notcp. A 10.53.0.3
+plain. NS ns.plain.
+ns.plain. A 10.53.0.4
+plain-notcp. NS ns.plain-notcp.
+ns.plain-notcp. A 10.53.0.5
+edns512. NS ns.edns512.
+ns.edns512. A 10.53.0.6
+edns512-notcp. NS ns.edns512-notcp.
+ns.edns512-notcp. A 10.53.0.7
+ednsformerr. NS ns.ednsformerr.
+ns.ednsformerr. A 10.53.0.8
+ednsnotimp. NS ns.ednsnotimp.
+ns.ednsnotimp. A 10.53.0.9
+ednsrefused. NS ns.ednsrefused.
+ns.ednsrefused. A 10.53.0.10
diff --git a/bin/tests/system/legacy/ns1/trusted.conf b/bin/tests/system/legacy/ns1/trusted.conf
new file mode 100644
index 0000000..a54b6aa
--- /dev/null
+++ b/bin/tests/system/legacy/ns1/trusted.conf
@@ -0,0 +1,16 @@
+/*
+ * 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.
+ */
+
+trust-anchors {
+ "edns512-notcp." static-ds 8161 10 2 "19147C5BF59BED075AC26CE73DDA875438FB5AC61BCF31F081AD5BDA1AA7C236";
+};
diff --git a/bin/tests/system/legacy/ns10/ednsrefused.db b/bin/tests/system/legacy/ns10/ednsrefused.db
new file mode 100644
index 0000000..9aa3a4a
--- /dev/null
+++ b/bin/tests/system/legacy/ns10/ednsrefused.db
@@ -0,0 +1,14 @@
+; 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.
+
+@ 60 SOA ns marka.isc.org. 1 0 0 0 0
+@ 60 NS ns
+ns 60 A 10.53.0.8
diff --git a/bin/tests/system/legacy/ns10/named.conf.in b/bin/tests/system/legacy/ns10/named.conf.in
new file mode 100644
index 0000000..628c51a
--- /dev/null
+++ b/bin/tests/system/legacy/ns10/named.conf.in
@@ -0,0 +1,29 @@
+/*
+ * 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.
+ */
+
+options {
+ query-source address 10.53.0.10;
+ notify-source 10.53.0.10;
+ transfer-source 10.53.0.10;
+ port @PORT@;
+ pid-file "named.pid";
+ listen-on { 10.53.0.10; };
+ listen-on-v6 { none; };
+ recursion no;
+ dnssec-validation no;
+};
+
+zone "ednsrefused" {
+ type primary;
+ file "ednsrefused.db";
+};
diff --git a/bin/tests/system/legacy/ns10/named.ednsrefused b/bin/tests/system/legacy/ns10/named.ednsrefused
new file mode 100644
index 0000000..6b43ac0
--- /dev/null
+++ b/bin/tests/system/legacy/ns10/named.ednsrefused
@@ -0,0 +1 @@
+ednsrefused
diff --git a/bin/tests/system/legacy/ns2/dropedns.db b/bin/tests/system/legacy/ns2/dropedns.db
new file mode 100644
index 0000000..06c023c
--- /dev/null
+++ b/bin/tests/system/legacy/ns2/dropedns.db
@@ -0,0 +1,14 @@
+; 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.
+
+@ 60 SOA ns marka.isc.org. 1 0 0 0 0
+@ 60 NS ns
+ns 60 A 10.53.0.2
diff --git a/bin/tests/system/legacy/ns2/named.conf.in b/bin/tests/system/legacy/ns2/named.conf.in
new file mode 100644
index 0000000..e570ffe
--- /dev/null
+++ b/bin/tests/system/legacy/ns2/named.conf.in
@@ -0,0 +1,29 @@
+/*
+ * 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.
+ */
+
+options {
+ query-source address 10.53.0.2;
+ notify-source 10.53.0.2;
+ transfer-source 10.53.0.2;
+ port @PORT@;
+ pid-file "named.pid";
+ listen-on { 10.53.0.2; };
+ listen-on-v6 { none; };
+ recursion no;
+ dnssec-validation no;
+};
+
+zone "dropedns" {
+ type primary;
+ file "dropedns.db";
+};
diff --git a/bin/tests/system/legacy/ns2/named.dropedns b/bin/tests/system/legacy/ns2/named.dropedns
new file mode 100644
index 0000000..37dd9cf
--- /dev/null
+++ b/bin/tests/system/legacy/ns2/named.dropedns
@@ -0,0 +1 @@
+dropedns
diff --git a/bin/tests/system/legacy/ns3/dropedns-notcp.db b/bin/tests/system/legacy/ns3/dropedns-notcp.db
new file mode 100644
index 0000000..0ac44bc
--- /dev/null
+++ b/bin/tests/system/legacy/ns3/dropedns-notcp.db
@@ -0,0 +1,14 @@
+; 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.
+
+@ 60 SOA ns marka.isc.org. 1 0 0 0 0
+@ 60 NS ns
+ns 60 A 10.53.0.3
diff --git a/bin/tests/system/legacy/ns3/named.conf.in b/bin/tests/system/legacy/ns3/named.conf.in
new file mode 100644
index 0000000..3d89554
--- /dev/null
+++ b/bin/tests/system/legacy/ns3/named.conf.in
@@ -0,0 +1,29 @@
+/*
+ * 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.
+ */
+
+options {
+ query-source address 10.53.0.3;
+ notify-source 10.53.0.3;
+ transfer-source 10.53.0.3;
+ port @PORT@;
+ pid-file "named.pid";
+ listen-on { 10.53.0.3; };
+ listen-on-v6 { none; };
+ recursion no;
+ dnssec-validation no;
+};
+
+zone "dropedns-notcp" {
+ type primary;
+ file "dropedns-notcp.db";
+};
diff --git a/bin/tests/system/legacy/ns3/named.dropedns b/bin/tests/system/legacy/ns3/named.dropedns
new file mode 100644
index 0000000..37dd9cf
--- /dev/null
+++ b/bin/tests/system/legacy/ns3/named.dropedns
@@ -0,0 +1 @@
+dropedns
diff --git a/bin/tests/system/legacy/ns3/named.notcp b/bin/tests/system/legacy/ns3/named.notcp
new file mode 100644
index 0000000..e25c3a8
--- /dev/null
+++ b/bin/tests/system/legacy/ns3/named.notcp
@@ -0,0 +1 @@
+notcp
diff --git a/bin/tests/system/legacy/ns4/named.args b/bin/tests/system/legacy/ns4/named.args
new file mode 100644
index 0000000..4ccb648
--- /dev/null
+++ b/bin/tests/system/legacy/ns4/named.args
@@ -0,0 +1 @@
+-m record -c named.conf -d 99 -D legacy-ns4 -X named.lock -g -U 4 -T maxcachesize=2097152 -T noedns
diff --git a/bin/tests/system/legacy/ns4/named.conf.in b/bin/tests/system/legacy/ns4/named.conf.in
new file mode 100644
index 0000000..32bdb05
--- /dev/null
+++ b/bin/tests/system/legacy/ns4/named.conf.in
@@ -0,0 +1,29 @@
+/*
+ * 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.
+ */
+
+options {
+ query-source address 10.53.0.4;
+ notify-source 10.53.0.4;
+ transfer-source 10.53.0.4;
+ port @PORT@;
+ pid-file "named.pid";
+ listen-on { 10.53.0.4; };
+ listen-on-v6 { none; };
+ recursion no;
+ dnssec-validation no;
+};
+
+zone "plain" {
+ type primary;
+ file "plain.db";
+};
diff --git a/bin/tests/system/legacy/ns4/plain.db b/bin/tests/system/legacy/ns4/plain.db
new file mode 100644
index 0000000..2c20a70
--- /dev/null
+++ b/bin/tests/system/legacy/ns4/plain.db
@@ -0,0 +1,14 @@
+; 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.
+
+@ 60 SOA ns marka.isc.org. 1 0 0 0 0
+@ 60 NS ns
+ns 60 A 10.53.0.4
diff --git a/bin/tests/system/legacy/ns5/named.args b/bin/tests/system/legacy/ns5/named.args
new file mode 100644
index 0000000..0c5e17a
--- /dev/null
+++ b/bin/tests/system/legacy/ns5/named.args
@@ -0,0 +1 @@
+-m record -c named.conf -d 99 -D legacy-ns5 -X named.lock -g -U 4 -T maxcachesize=2097152 -T noedns
diff --git a/bin/tests/system/legacy/ns5/named.conf.in b/bin/tests/system/legacy/ns5/named.conf.in
new file mode 100644
index 0000000..92e754f
--- /dev/null
+++ b/bin/tests/system/legacy/ns5/named.conf.in
@@ -0,0 +1,29 @@
+/*
+ * 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.
+ */
+
+options {
+ query-source address 10.53.0.5;
+ notify-source 10.53.0.5;
+ transfer-source 10.53.0.5;
+ port @PORT@;
+ pid-file "named.pid";
+ listen-on { 10.53.0.5; };
+ listen-on-v6 { none; };
+ recursion no;
+ dnssec-validation no;
+};
+
+zone "plain-notcp" {
+ type primary;
+ file "plain-notcp.db";
+};
diff --git a/bin/tests/system/legacy/ns5/named.notcp b/bin/tests/system/legacy/ns5/named.notcp
new file mode 100644
index 0000000..e25c3a8
--- /dev/null
+++ b/bin/tests/system/legacy/ns5/named.notcp
@@ -0,0 +1 @@
+notcp
diff --git a/bin/tests/system/legacy/ns5/plain-notcp.db b/bin/tests/system/legacy/ns5/plain-notcp.db
new file mode 100644
index 0000000..9c1a96b
--- /dev/null
+++ b/bin/tests/system/legacy/ns5/plain-notcp.db
@@ -0,0 +1,14 @@
+; 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.
+
+@ 60 SOA ns marka.isc.org. 1 0 0 0 0
+@ 60 NS ns
+ns 60 A 10.53.0.5
diff --git a/bin/tests/system/legacy/ns6/edns512.db.in b/bin/tests/system/legacy/ns6/edns512.db.in
new file mode 100644
index 0000000..485ec8e
--- /dev/null
+++ b/bin/tests/system/legacy/ns6/edns512.db.in
@@ -0,0 +1,15 @@
+; 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.
+
+@ 60 SOA ns marka.isc.org. 1 0 0 0 0
+@ 60 NS ns
+@ 60 TXT a txt record
+ns 60 A 10.53.0.6
diff --git a/bin/tests/system/legacy/ns6/edns512.db.signed b/bin/tests/system/legacy/ns6/edns512.db.signed
new file mode 100644
index 0000000..f193a09
--- /dev/null
+++ b/bin/tests/system/legacy/ns6/edns512.db.signed
@@ -0,0 +1,226 @@
+; File written on Fri Oct 23 13:08:55 2020
+; dnssec_signzone version 9.17.6
+edns512. 60 IN SOA ns.edns512. marka.isc.org. (
+ 1 ; serial
+ 0 ; refresh (0 seconds)
+ 0 ; retry (0 seconds)
+ 0 ; expire (0 seconds)
+ 0 ; minimum (0 seconds)
+ )
+ 60 RRSIG SOA 10 1 60 (
+ 20501016010855 20201023010855 53333 edns512.
+ De3f+wPXopHUPSD2z6Ak5oWhk7AOqqCGU/Z7
+ iCHR+9SCTaDRyGQarIGoCrlc2hhrkxOsYWB1
+ X01E0Zx+iKrzjbK8aJi1JoigvWvi+XogBfWR
+ g7P2LnRnriJfBtsFdKEQSHFo3dmVX4XCqyJX
+ xkJZG2+if+HedaYkrW2izH6PRUsXf3sQWdm4
+ +k1jy+4m4m6bVM/QeHbX/u6KwEZlNuWy64lL
+ 2CXtRpjc2W0oX5Fqoz5GWKI6T038IEawLhP3
+ g/SnC021ub89U5sWRY3s3c1vNrZBjtdnGkOr
+ V5xqBkVwl9RVJwmrMZ4Sa4JaPbd6eV25d+R+
+ +yoCJu3mLwL3q7zBT/Du5N23sTeVeIQmmrj/
+ PxaaX8YIsGH8cCDaverEAJ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oc
+ U2X0sbZlYU0I6yq2zDh4oN98s2r1U4TJPf4G
+ Kc2A3107n5WHsavLF6DfV9bDU4/ozVE920/5
+ KocD
+ ) ; KSK; alg = RSASHA512 ; key id = 21624
+ 60 RRSIG DNSKEY 10 1 60 (
+ 20501016010855 20201023010855 53333 edns512.
+ VFBtgMd79vb3EKirSuX5adFdCVMCQQrQ6ANM
+ iAMhKSxo9Ic8ICZGANm7jvpg+IEG13+2ehyt
+ 3EpBIHQYp+Apa1j6lGUDbdmcqP0E34eVy8jJ
+ brP94Bpo0hP1E0P6pPuIqWrnWYG60bXNztc1
+ nJ0ACg7mbcbbnFKHwOcD+js74jGAQdCKpwo3
+ SCfjApUMQwLhHVa0MKcxKCtbCz0WJJwGoXOV
+ U4l0DY/wD/aXTXjguiycjrHEP1dT23JPICFl
+ ZsaVE/+ra999p8fCZ5Vqy3PRFGqUirrwj8hG
+ 93dK4R5GxY0OLfIxYVX5Nt1w6qDmpXbVtryU
+ wgzdO3ZO6+Fz7hltPB19bfCQZQIkqypaPkXT
+ ltk23Jax9EU1nQ1CXLPgMDd3jjlF/46R/CD0
+ H/69/ftwCUdmfX2TZmIWEca4sdj5Za1U1AY4
+ pby4uPUncEw4T4WtRxKmrXjd9H2Ml8KRCIPe
+ Iz/21cUoxdLzlomjnP967H/TR6UFxayQziv/
+ LL2R7LIQwQlz9ZCHHhedptCaK+0FUicWHqW4
+ SW7Y/AKavvFGkMO3KXkXto2oZQLRL4m1Auv7
+ M8rlStuEFBJ5/K0JIp4NCDKTayhXwwvf9jtn
+ WrsCaLRBJH2nCIO2/1w16G3D5mQdvt0QskM2
+ FRtEhi3a7TpwRvCGKw9PuVilH7qXIYpHF54= )
+ 60 RRSIG DNSKEY 10 1 60 (
+ 20501016010855 20201023010855 21624 edns512.
+ Nv7YHuTniNFoFtEeF53VG5ERUEBzKY6wTzUe
+ 34+5hD/GwdxqKq0qQ8VflACrP/JYonCejgj7
+ 6K4EWLBnZYk1K53NTetO19CCP9X7uQ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0IjTRpVrKjoTIl2/hUctsldNgZ/kjKhP+U
+ VrI3O0cBhUM4BPV01mAU8Cq0nhrkRt0ESgo3
+ Bulleb0NLQlhBgo0aiZYQLIA8cDLeAi/dIE= )
diff --git a/bin/tests/system/legacy/ns6/named.args b/bin/tests/system/legacy/ns6/named.args
new file mode 100644
index 0000000..3475121
--- /dev/null
+++ b/bin/tests/system/legacy/ns6/named.args
@@ -0,0 +1 @@
+-m record -c named.conf -d 99 -D legacy-ns6 -X named.lock -g -U 4 -T maxcachesize=2097152 -T maxudp512
diff --git a/bin/tests/system/legacy/ns6/named.conf.in b/bin/tests/system/legacy/ns6/named.conf.in
new file mode 100644
index 0000000..17f19d9
--- /dev/null
+++ b/bin/tests/system/legacy/ns6/named.conf.in
@@ -0,0 +1,29 @@
+/*
+ * 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.
+ */
+
+options {
+ query-source address 10.53.0.6;
+ notify-source 10.53.0.6;
+ transfer-source 10.53.0.6;
+ port @PORT@;
+ pid-file "named.pid";
+ listen-on { 10.53.0.6; };
+ listen-on-v6 { none; };
+ recursion no;
+ dnssec-validation no;
+};
+
+zone "edns512" {
+ type primary;
+ file "edns512.db.signed";
+};
diff --git a/bin/tests/system/legacy/ns6/sign.sh b/bin/tests/system/legacy/ns6/sign.sh
new file mode 100755
index 0000000..f76b3c2
--- /dev/null
+++ b/bin/tests/system/legacy/ns6/sign.sh
@@ -0,0 +1,30 @@
+#!/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.
+
+. ../../conf.sh
+
+SYSTESTDIR=legacy
+
+echo_i "sign edns512"
+
+zone=edns512
+infile=edns512.db.in
+zonefile=edns512.db
+outfile=edns512.db.signed
+
+keyname1=$($KEYGEN -a RSASHA512 -b 4096 -n zone $zone 2> /dev/null)
+keyname2=$($KEYGEN -f KSK -a RSASHA512 -b 4096 -n zone $zone 2> /dev/null)
+
+cat $infile $keyname1.key $keyname2.key >$zonefile
+
+$SIGNER -g -o $zone -f $outfile -e +30y $zonefile > /dev/null 2> signer.err || cat signer.err
diff --git a/bin/tests/system/legacy/ns7/edns512-notcp.db.in b/bin/tests/system/legacy/ns7/edns512-notcp.db.in
new file mode 100644
index 0000000..e181ca4
--- /dev/null
+++ b/bin/tests/system/legacy/ns7/edns512-notcp.db.in
@@ -0,0 +1,15 @@
+; 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.
+
+@ 60 SOA ns marka.isc.org. 1 0 0 0 0
+@ 60 NS ns
+@ 60 TXT a txt record
+ns 60 A 10.53.0.7
diff --git a/bin/tests/system/legacy/ns7/edns512-notcp.db.signed b/bin/tests/system/legacy/ns7/edns512-notcp.db.signed
new file mode 100644
index 0000000..495d098
--- /dev/null
+++ b/bin/tests/system/legacy/ns7/edns512-notcp.db.signed
@@ -0,0 +1,226 @@
+; File written on Fri Oct 23 13:08:56 2020
+; dnssec_signzone version 9.17.6
+edns512-notcp. 60 IN SOA ns.edns512-notcp. marka.isc.org. (
+ 1 ; serial
+ 0 ; refresh (0 seconds)
+ 0 ; retry (0 seconds)
+ 0 ; expire (0 seconds)
+ 0 ; minimum (0 seconds)
+ )
+ 60 RRSIG SOA 10 1 60 (
+ 20501016010856 20201023010856 22916 edns512-notcp.
+ oLYJAlTUS8D9FSdgdL+wQVNbWZamSxv+vTx1
+ 3zAfTgMV/n3RclAtFfFENe+bNxW5vkt4ADEg
+ j5ys/MFnLA0pgw3fjziIzR2OwEQpuw76A8S/
+ ecLVvon5VcEOvKRhUbDJoAS2PatPPqnGxVyE
+ bs+fBCqeorUl/noU/6TfiISIeVcOmEgZX9I7
+ 9LN//CmDpGeZGMm3q6S3LlmsXnBoaMb6g1SN
+ xH/aA/xstiHXvwRLy1YwtImJa92WIZPaA9tb
+ zCX9vVXaVtnLxUVz7PyJOAW/+jsg4IfVmpbz
+ GboD0FdgENC4KuIHjjA93opAOI3iOuREmGEw
+ 7kBPAgaVB8EzypYxgKoEuargmw+3TymHipZE
+ e0/0JeXFdRbaiUQWXtKtYfPcmHcnrY5JO1eo
+ KjNbAakpDkd1wt5EtMc16TO7+00cY4VtUZNJ
+ IOLtzXByCy2a5FRWzar1InYhicUIvM6VoP5b
+ tj9QcYLWT3e1E0aXeBia2Qy+hS/Ut4X+vYvp
+ gedVySBjk8tSDyAkm7ALDiI1gPjdZfCWO+E3
+ 8XI4RbCvaGNlZ4rRH17SKyjxJrgiAPN562bg
+ NAA2F/S5dzLOQn3wwXgHEwu77WisvMV5yrG+
+ 3ef8eVEapJgNGzz1YlPTolpYn9EbAtRMxBcK
+ 6/CFz0Qf6cfBrHS3lxHj78Dcj53O0+zKenY= )
+ 60 NS ns.edns512-notcp.
+ 60 RRSIG NS 10 1 60 (
+ 20501016010856 20201023010856 22916 edns512-notcp.
+ r+WNvwHqzInk8Q/8bDkT4gUbgtc/ArysbpOC
+ Cw7LGnAREt4W6sZ3okkeXb8fnN/t8bsgE9IU
+ Hy7/IuhFu9eMzBYYuc4tzELXVswlCRpUvlVA
+ 0zUJpNmyAcUuCyesy/pu67X0H7mUJX6Z1MKc
+ /o9F21lGkbXxSPSEgRYp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cwhwA
+ WYEAvrJV2+wr7jpjHvq1tGrCEPppBaelrwut
+ CGfenY08YE/dDMmbFPXMFUHbhtz1qvFiMjU= )
+ns.edns512-notcp. 60 IN A 10.53.0.7
+ 60 RRSIG A 10 2 60 (
+ 20501016010856 20201023010856 22916 edns512-notcp.
+ tFjfl9DvT60ko1h9p55T2s5hU4CmmHEYrMUg
+ 9Iv+tvW9YoCiHESBC7TkDmdVT8YwzaLDjlTf
+ YxgA5KLhV+04M9m7vUgxK5T4vjiE43VnTq7x
+ L+hM9cvjQ4sKTBJLHmTrKjrcE5fyd0/F3jvF
+ MiomX/8p7PLq2fzZWwygjiOrkd0s7ypFEuoX
+ AjRoxo60q2oV9/8jiKkgiD4+UEIqU/fxURP+
+ 1MpNVqks/PXSFVQcyGrQKddiRpp53yYlgcDv
+ /0ulXnxK53dQ3CqymOflJrf7B5H0rq8LQHjK
+ ZO3ys54sWq80jxtxRWNMBvygmHl+LFCes5mL
+ GuB1pFYJq7z026GC6QHbVmOQu5P2pLOr13jW
+ KBwRisr0/BN/no3goGVAP7hJD47r2fr0E8WL
+ K1GJZI2McrHgQW12NnZm43AI2z7xjapbRquB
+ HMeJR8bPfjxEhy555AE0B1AXZobiuZHtycox
+ XBS+A9URAYx78OWAgAENF94rnkKIoSAmMENJ
+ KX29TEHrNLG3MCWxX9mRnMzON+5oTZjOxV8R
+ KIc6Qw/hE93Bho1+3Vdlq8X2Gwu8RswwLBgH
+ e3AnKRHWGTbv6uUwKCVrTyZOQft+yiKxooBr
+ Wz0AgEosnuwenxjw4Tim/Z5NhLnzrJBaSyjo
+ Pt+wguhDW1boaCf/4RYOAZtSNNalGnJNV4k= )
+ 0 NSEC edns512-notcp. A RRSIG NSEC
+ 0 RRSIG NSEC 10 2 0 (
+ 20501016010856 20201023010856 22916 edns512-notcp.
+ hwvmKC/yVOUavH1cty6pg1EyTNBo+MAz+KjY
+ UmodFwGPv2EuRY/6TcujLTMHdeSbi71e+JQU
+ +ij6TXcXNZl7CpZbBEfVZd8xvTPYykhO3rr8
+ cckPre1p8pGx56x7nVjRA1P/+oyjjr6j1nVZ
+ RewWOrSo/LPah4WY2iyEJH0JF5H/SVrF2Z86
+ XT4YrLqe+1vpeRw0C8VNAJGZbd6H90Qu/Cnd
+ Xdyj1OOl+RQbvJCVpcw6/fFmcNRy5zbQJFA6
+ nsGyCL62OfptdByQKJhSU6gQcaWcMnYeqSgT
+ I3yBye1whQ/2fdgyKUFAESbPRp7WpzXzNabf
+ ZNeLRZT8RGsjHD4i0OqCL+R6axXl53wUn7sa
+ pXWTRBWIKshnTJrzntIkdXLq1qQtxnw7zA6h
+ kUCVzf1FzjP64cHh928CQBbnfT1MSdJuQe1G
+ /RGCn0RwOcn+n06O2uiCBmwkGnrZB/+Yytzp
+ apdULCyUmvByozvKYp73GOK4eTAqNF6igEAc
+ pSz8oXZy+wmVG1l72yli1Eyunm010Skb3oxe
+ 23htSPq1MIqETzAWtMJM082F9vAEjTJNSnSo
+ RFpPnlq6LDjtr7Z6/mRcqVXx5OC1nj4Svaxo
+ JOebR0igOJcAKG9gCGz6ffDy/1VeUHCnzvKR
+ vgJZjbvXDuHkOzNB6KYc3N2BglMIxajwVcQ= )
diff --git a/bin/tests/system/legacy/ns7/named.args b/bin/tests/system/legacy/ns7/named.args
new file mode 100644
index 0000000..1da4980
--- /dev/null
+++ b/bin/tests/system/legacy/ns7/named.args
@@ -0,0 +1 @@
+-m record -c named.conf -d 99 -D legacy-ns7 -X named.lock -g -U 4 -T maxcachesize=2097152 -T maxudp512
diff --git a/bin/tests/system/legacy/ns7/named.conf.in b/bin/tests/system/legacy/ns7/named.conf.in
new file mode 100644
index 0000000..30f3ea2
--- /dev/null
+++ b/bin/tests/system/legacy/ns7/named.conf.in
@@ -0,0 +1,29 @@
+/*
+ * 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.
+ */
+
+options {
+ query-source address 10.53.0.7;
+ notify-source 10.53.0.7;
+ transfer-source 10.53.0.7;
+ port @PORT@;
+ pid-file "named.pid";
+ listen-on { 10.53.0.7; };
+ listen-on-v6 { none; };
+ recursion no;
+ dnssec-validation no;
+};
+
+zone "edns512-notcp" {
+ type primary;
+ file "edns512-notcp.db.signed";
+};
diff --git a/bin/tests/system/legacy/ns7/named.notcp b/bin/tests/system/legacy/ns7/named.notcp
new file mode 100644
index 0000000..e25c3a8
--- /dev/null
+++ b/bin/tests/system/legacy/ns7/named.notcp
@@ -0,0 +1 @@
+notcp
diff --git a/bin/tests/system/legacy/ns7/sign.sh b/bin/tests/system/legacy/ns7/sign.sh
new file mode 100755
index 0000000..c2153f9
--- /dev/null
+++ b/bin/tests/system/legacy/ns7/sign.sh
@@ -0,0 +1,33 @@
+#!/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.
+
+. ../../conf.sh
+
+SYSTESTDIR=legacy
+
+echo_i "sign edns512-notcp"
+
+zone=edns512-notcp
+infile=edns512-notcp.db.in
+zonefile=edns512-notcp.db
+outfile=edns512-notcp.db.signed
+
+keyname1=$($KEYGEN -a RSASHA512 -b 4096 -n zone $zone 2> /dev/null)
+keyname2=$($KEYGEN -f KSK -a RSASHA512 -b 4096 -n zone $zone 2> /dev/null)
+
+cat $infile $keyname1.key $keyname2.key >$zonefile
+
+$SIGNER -g -o $zone -f $outfile -e +30y $zonefile > /dev/null 2> signer.err || cat signer.err
+
+keyfile_to_static_ds $keyname2 > trusted.conf
+cp trusted.conf ../ns1
diff --git a/bin/tests/system/legacy/ns8/ednsformerr.db b/bin/tests/system/legacy/ns8/ednsformerr.db
new file mode 100644
index 0000000..9aa3a4a
--- /dev/null
+++ b/bin/tests/system/legacy/ns8/ednsformerr.db
@@ -0,0 +1,14 @@
+; 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.
+
+@ 60 SOA ns marka.isc.org. 1 0 0 0 0
+@ 60 NS ns
+ns 60 A 10.53.0.8
diff --git a/bin/tests/system/legacy/ns8/named.conf.in b/bin/tests/system/legacy/ns8/named.conf.in
new file mode 100644
index 0000000..7431cf8
--- /dev/null
+++ b/bin/tests/system/legacy/ns8/named.conf.in
@@ -0,0 +1,29 @@
+/*
+ * 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.
+ */
+
+options {
+ query-source address 10.53.0.8;
+ notify-source 10.53.0.8;
+ transfer-source 10.53.0.8;
+ port @PORT@;
+ pid-file "named.pid";
+ listen-on { 10.53.0.8; };
+ listen-on-v6 { none; };
+ recursion no;
+ dnssec-validation no;
+};
+
+zone "ednsformerr" {
+ type primary;
+ file "ednsformerr.db";
+};
diff --git a/bin/tests/system/legacy/ns8/named.ednsformerr b/bin/tests/system/legacy/ns8/named.ednsformerr
new file mode 100644
index 0000000..e35cb02
--- /dev/null
+++ b/bin/tests/system/legacy/ns8/named.ednsformerr
@@ -0,0 +1 @@
+ednsformerr
diff --git a/bin/tests/system/legacy/ns9/ednsnotimp.db b/bin/tests/system/legacy/ns9/ednsnotimp.db
new file mode 100644
index 0000000..9aa3a4a
--- /dev/null
+++ b/bin/tests/system/legacy/ns9/ednsnotimp.db
@@ -0,0 +1,14 @@
+; 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.
+
+@ 60 SOA ns marka.isc.org. 1 0 0 0 0
+@ 60 NS ns
+ns 60 A 10.53.0.8
diff --git a/bin/tests/system/legacy/ns9/named.conf.in b/bin/tests/system/legacy/ns9/named.conf.in
new file mode 100644
index 0000000..385fbfd
--- /dev/null
+++ b/bin/tests/system/legacy/ns9/named.conf.in
@@ -0,0 +1,29 @@
+/*
+ * 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.
+ */
+
+options {
+ query-source address 10.53.0.9;
+ notify-source 10.53.0.9;
+ transfer-source 10.53.0.9;
+ port @PORT@;
+ pid-file "named.pid";
+ listen-on { 10.53.0.9; };
+ listen-on-v6 { none; };
+ recursion no;
+ dnssec-validation no;
+};
+
+zone "ednsnotimp" {
+ type primary;
+ file "ednsnotimp.db";
+};
diff --git a/bin/tests/system/legacy/ns9/named.ednsnotimp b/bin/tests/system/legacy/ns9/named.ednsnotimp
new file mode 100644
index 0000000..4e6424d
--- /dev/null
+++ b/bin/tests/system/legacy/ns9/named.ednsnotimp
@@ -0,0 +1 @@
+ednsnotimp
diff --git a/bin/tests/system/legacy/setup.sh b/bin/tests/system/legacy/setup.sh
new file mode 100644
index 0000000..d2a53bb
--- /dev/null
+++ b/bin/tests/system/legacy/setup.sh
@@ -0,0 +1,25 @@
+#!/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.
+
+. ../conf.sh
+
+copy_setports ns1/named1.conf.in ns1/named.conf
+copy_setports ns2/named.conf.in ns2/named.conf
+copy_setports ns3/named.conf.in ns3/named.conf
+copy_setports ns4/named.conf.in ns4/named.conf
+copy_setports ns5/named.conf.in ns5/named.conf
+copy_setports ns6/named.conf.in ns6/named.conf
+copy_setports ns7/named.conf.in ns7/named.conf
+copy_setports ns8/named.conf.in ns8/named.conf
+copy_setports ns9/named.conf.in ns9/named.conf
+copy_setports ns10/named.conf.in ns10/named.conf
diff --git a/bin/tests/system/legacy/tests.sh b/bin/tests/system/legacy/tests.sh
new file mode 100755
index 0000000..44d3b11
--- /dev/null
+++ b/bin/tests/system/legacy/tests.sh
@@ -0,0 +1,269 @@
+#!/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
+
+DIGOPTS="-p ${PORT} +tries=1 +time=2"
+
+# Check whether the SOA record for the name provided in $1 can be resolved by
+# ns1. Return 0 if resolution succeeds as expected; return 1 otherwise.
+resolution_succeeds() {
+ _ret=0
+ $DIG $DIGOPTS +tcp +tries=3 +time=5 @10.53.0.1 ${1} SOA > dig.out.test$n || _ret=1
+ grep "status: NOERROR" dig.out.test$n > /dev/null || _ret=1
+ return $_ret
+}
+
+# Check whether the SOA record for the name provided in $1 can be resolved by
+# ns1. Return 0 if resolution fails as expected; return 1 otherwise. Note that
+# both a SERVFAIL response and timing out mean resolution failed, so the exit
+# code of dig does not influence the result (the exit code for a SERVFAIL
+# response is 0 while the exit code for not getting a response at all is not 0).
+resolution_fails() {
+ _servfail=0
+ _timeout=0
+ $DIG $DIGOPTS +tcp +time=5 @10.53.0.1 ${1} TXT > dig.out.test$n
+ grep -F "status: SERVFAIL" dig.out.test$n > /dev/null && _servfail=1
+ grep -F "timed out" dig.out.test$n > /dev/null && _timeout=1
+ if [ $_servfail -eq 1 ] || [ $_timeout -eq 1 ]; then
+ return 0
+ else
+ return 1
+ fi
+}
+
+status=0
+n=0
+
+n=$((n + 1))
+echo_i "checking formerr edns server setup ($n)"
+ret=0
+$DIG $DIGOPTS +edns @10.53.0.8 ednsformerr soa > dig.out.1.test$n || ret=1
+grep "status: FORMERR" dig.out.1.test$n > /dev/null || ret=1
+grep "EDNS: version:" dig.out.1.test$n > /dev/null && ret=1
+$DIG $DIGOPTS +noedns @10.53.0.8 ednsformerr soa > dig.out.2.test$n || ret=1
+grep "status: NOERROR" dig.out.2.test$n > /dev/null || ret=1
+grep "EDNS: version:" dig.out.2.test$n > /dev/null && ret=1
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
+
+n=$((n + 1))
+echo_i "checking recursive lookup to formerr edns server succeeds ($n)"
+ret=0
+resolution_succeeds ednsformerr. || ret=1
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
+
+n=$((n + 1))
+echo_i "checking notimp edns server setup ($n)"
+ret=0
+$DIG $DIGOPTS +edns @10.53.0.9 ednsnotimp soa > dig.out.1.test$n || ret=1
+grep "status: NOTIMP" dig.out.1.test$n > /dev/null || ret=1
+grep "EDNS: version:" dig.out.1.test$n > /dev/null && ret=1
+$DIG $DIGOPTS +noedns @10.53.0.9 ednsnotimp soa > dig.out.2.test$n || ret=1
+grep "status: NOERROR" dig.out.2.test$n > /dev/null || ret=1
+grep "EDNS: version:" dig.out.2.test$n > /dev/null && ret=1
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
+
+n=$((n + 1))
+echo_i "checking recursive lookup to notimp edns server fails ($n)"
+ret=0
+resolution_fails ednsnotimp. || ret=1
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
+
+n=$((n + 1))
+echo_i "checking refused edns server setup ($n)"
+ret=0
+$DIG $DIGOPTS +edns @10.53.0.10 ednsrefused soa > dig.out.1.test$n || ret=1
+grep "status: REFUSED" dig.out.1.test$n > /dev/null || ret=1
+grep "EDNS: version:" dig.out.1.test$n > /dev/null && ret=1
+$DIG $DIGOPTS +noedns @10.53.0.10 ednsrefused soa > dig.out.2.test$n || ret=1
+grep "status: NOERROR" dig.out.2.test$n > /dev/null || ret=1
+grep "EDNS: version:" dig.out.2.test$n > /dev/null && ret=1
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
+
+n=$((n + 1))
+echo_i "checking recursive lookup to refused edns server fails ($n)"
+ret=0
+resolution_fails ednsrefused. || ret=1
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
+
+n=$((n + 1))
+echo_i "checking drop edns server setup ($n)"
+ret=0
+$DIG $DIGOPTS +edns @10.53.0.2 dropedns soa > dig.out.1.test$n && ret=1
+grep "timed out" dig.out.1.test$n > /dev/null || ret=1
+grep ";; no servers could be reached" dig.out.1.test$n > /dev/null || ret=1
+$DIG $DIGOPTS +noedns @10.53.0.2 dropedns soa > dig.out.2.test$n || ret=1
+grep "status: NOERROR" dig.out.2.test$n > /dev/null || ret=1
+grep "EDNS: version:" dig.out.2.test$n > /dev/null && ret=1
+$DIG $DIGOPTS +noedns +tcp @10.53.0.2 dropedns soa > dig.out.3.test$n || ret=1
+grep "status: NOERROR" dig.out.3.test$n > /dev/null || ret=1
+grep "EDNS: version:" dig.out.3.test$n > /dev/null && ret=1
+$DIG $DIGOPTS +edns +tcp @10.53.0.2 dropedns soa > dig.out.4.test$n && ret=1
+grep "timed out" dig.out.4.test$n > /dev/null || ret=1
+grep ";; no servers could be reached" dig.out.4.test$n > /dev/null || ret=1
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
+
+n=$((n + 1))
+echo_i "checking recursive lookup to drop edns server fails ($n)"
+ret=0
+resolution_fails dropedns. || ret=1
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
+
+n=$((n + 1))
+echo_i "checking drop edns + no tcp server setup ($n)"
+ret=0
+$DIG $DIGOPTS +edns @10.53.0.3 dropedns-notcp soa > dig.out.1.test$n && ret=1
+grep "timed out" dig.out.1.test$n > /dev/null || ret=1
+grep ";; no servers could be reached" dig.out.1.test$n > /dev/null || ret=1
+$DIG $DIGOPTS +noedns +tcp @10.53.0.3 dropedns-notcp soa > dig.out.2.test$n && ret=1
+grep "connection refused" dig.out.2.test$n > /dev/null || ret=1
+$DIG $DIGOPTS +noedns @10.53.0.3 dropedns-notcp soa > dig.out.3.test$n || ret=1
+grep "status: NOERROR" dig.out.3.test$n > /dev/null || ret=1
+grep "EDNS: version:" dig.out.3.test$n > /dev/null && ret=1
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
+
+n=$((n + 1))
+echo_i "checking recursive lookup to drop edns + no tcp server fails ($n)"
+ret=0
+resolution_fails dropedns-notcp. || ret=1
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
+
+n=$((n + 1))
+echo_i "checking plain dns server setup ($n)"
+ret=0
+$DIG $DIGOPTS +edns @10.53.0.4 plain soa > dig.out.1.test$n || ret=1
+grep "status: NOERROR" dig.out.1.test$n > /dev/null || ret=1
+grep "EDNS: version:" dig.out.1.test$n > /dev/null && ret=1
+$DIG $DIGOPTS +edns +tcp @10.53.0.4 plain soa > dig.out.2.test$n
+grep "status: NOERROR" dig.out.2.test$n > /dev/null || ret=1
+grep "EDNS: version:" dig.out.2.test$n > /dev/null && ret=1
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
+
+n=$((n + 1))
+echo_i "checking recursive lookup to plain dns server succeeds ($n)"
+ret=0
+resolution_succeeds plain. || ret=1
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
+
+n=$((n + 1))
+echo_i "checking plain dns + no tcp server setup ($n)"
+ret=0
+$DIG $DIGOPTS +edns @10.53.0.5 plain-notcp soa > dig.out.1.test$n || ret=1
+grep "status: NOERROR" dig.out.1.test$n > /dev/null || ret=1
+grep "EDNS: version:" dig.out.1.test$n > /dev/null && ret=1
+$DIG $DIGOPTS +edns +tcp @10.53.0.5 plain-notcp soa > dig.out.2.test$n && ret=1
+grep "connection refused" dig.out.2.test$n > /dev/null || ret=1
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
+
+n=$((n + 1))
+echo_i "checking recursive lookup to plain dns + no tcp server succeeds ($n)"
+ret=0
+resolution_succeeds plain-notcp. || ret=1
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
+n=$((n + 1))
+
+echo_i "checking edns 512 server setup ($n)"
+ret=0
+$DIG $DIGOPTS +edns @10.53.0.6 edns512 txt > dig.out.1.test$n || ret=1
+grep "status: NOERROR" dig.out.1.test$n > /dev/null || ret=1
+grep "EDNS: version:" dig.out.1.test$n > /dev/null || ret=1
+$DIG $DIGOPTS +edns +tcp @10.53.0.6 edns512 txt > dig.out.2.test$n || ret=1
+grep "status: NOERROR" dig.out.2.test$n > /dev/null || ret=1
+grep "EDNS: version:" dig.out.2.test$n > /dev/null || ret=1
+$DIG $DIGOPTS +edns +dnssec @10.53.0.6 edns512 txt > dig.out.3.test$n && ret=1
+grep "timed out" dig.out.3.test$n > /dev/null || ret=1
+grep ";; no servers could be reached" dig.out.3.test$n > /dev/null || ret=1
+$DIG $DIGOPTS +edns +dnssec +bufsize=512 +ignore @10.53.0.6 edns512 soa > dig.out.4.test$n || ret=1
+grep "status: NOERROR" dig.out.4.test$n > /dev/null || ret=1
+grep "EDNS: version:" dig.out.4.test$n > /dev/null || ret=1
+grep "flags:.* tc[ ;]" dig.out.4.test$n > /dev/null || ret=1
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
+
+n=$((n + 1))
+echo_i "checking recursive lookup to edns 512 server succeeds ($n)"
+ret=0
+retry_quiet 3 resolution_succeeds edns512. || ret=1
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
+
+n=$((n + 1))
+echo_i "checking edns 512 + no tcp server setup ($n)"
+ret=0
+$DIG $DIGOPTS +edns @10.53.0.7 edns512-notcp soa > dig.out.1.test$n || ret=1
+grep "status: NOERROR" dig.out.1.test$n > /dev/null || ret=1
+grep "EDNS: version:" dig.out.1.test$n > /dev/null || ret=1
+$DIG $DIGOPTS +edns +tcp @10.53.0.7 edns512-notcp soa > dig.out.2.test$n && ret=1
+grep "connection refused" dig.out.2.test$n > /dev/null || ret=1
+$DIG $DIGOPTS +edns +dnssec @10.53.0.7 edns512-notcp soa > dig.out.3.test$n && ret=1
+grep "timed out" dig.out.3.test$n > /dev/null || ret=1
+grep ";; no servers could be reached" dig.out.3.test$n > /dev/null || ret=1
+$DIG $DIGOPTS +edns +dnssec +bufsize=512 +ignore @10.53.0.7 edns512-notcp soa > dig.out.4.test$n || ret=1
+grep "status: NOERROR" dig.out.4.test$n > /dev/null || ret=1
+grep "EDNS: version:" dig.out.4.test$n > /dev/null || ret=1
+grep "flags:.* tc[ ;]" dig.out.4.test$n > /dev/null || ret=1
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
+
+n=$((n + 1))
+echo_i "checking recursive lookup to edns 512 + no tcp server fails ($n)"
+ret=0
+resolution_fails edns512-notcp. || ret=1
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
+
+n=$((n + 1))
+echo_i "checking recursive lookup to edns 512 + no tcp server does not cause query loops ($n)"
+ret=0
+sent=$(grep -c -F "sending packet to 10.53.0.7" ns1/named.run)
+if [ $sent -ge 10 ]; then
+ echo_i "ns1 sent $sent queries to ns7, expected less than 10"
+ ret=1
+fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
+
+stop_server --use-rndc --port ${CONTROLPORT} ns1
+copy_setports ns1/named2.conf.in ns1/named.conf
+start_server --noclean --restart --port ${PORT} ns1
+
+n=$((n + 1))
+echo_i "checking recursive lookup to edns 512 + no tcp + trust anchor fails ($n)"
+# retry loop in case the server restart above causes transient failure
+for try in 0 1 2 3 4 5 6 7 8 9; do
+ ret=0
+ resolution_fails edns512-notcp. || ret=1
+ [ "$ret" -eq 0 ] && break
+ sleep 1
+done
+if [ $ret != 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
+
+echo_i "exit status: $status"
+[ $status -eq 0 ] || exit 1
diff --git a/bin/tests/system/legacy/tests_sh_legacy.py b/bin/tests/system/legacy/tests_sh_legacy.py
new file mode 100644
index 0000000..ded36f0
--- /dev/null
+++ b/bin/tests/system/legacy/tests_sh_legacy.py
@@ -0,0 +1,14 @@
+# 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.
+
+
+def test_legacy(run_tests_sh):
+ run_tests_sh()