From 05180154d9742954e1675b687db9bd8387664eb3 Mon Sep 17 00:00:00 2001 From: Tom Krizek Date: Mon, 10 Oct 2022 13:28:29 +0200 Subject: [PATCH] Remove system test delzone There are multiple reasons to remove this test as obsolete: - The test may not possibly work for over 2.5 years, since 98b3b93791777218c04a67ddaef22619162249f7 removed the rndc.py python tool on which this test relies. - It isn't part of the test suite either in CI or locally unless it is explicitly enabled. As a result, there are many issues which prevent the test from being executed caused by various refactoring efforts accumulated over time. - Even if the test could be executed, it has no clear failure condition. If the python script(s) fail, the test still passes. --- bin/tests/system/Makefile.am | 4 +- bin/tests/system/conf.sh.common | 2 +- bin/tests/system/delzone/clean.sh | 25 --------- bin/tests/system/delzone/ns1/inlinesec.db | 26 --------- bin/tests/system/delzone/ns1/named.conf | 34 ------------ bin/tests/system/delzone/ns2/added.db | 26 --------- bin/tests/system/delzone/ns2/named.args | 1 - bin/tests/system/delzone/ns2/named.conf | 35 ------------- bin/tests/system/delzone/ns2/normal.db | 26 --------- bin/tests/system/delzone/setup.sh | 16 ------ bin/tests/system/delzone/tests.sh | 64 ----------------------- 11 files changed, 3 insertions(+), 256 deletions(-) delete mode 100644 bin/tests/system/delzone/clean.sh delete mode 100644 bin/tests/system/delzone/ns1/inlinesec.db delete mode 100644 bin/tests/system/delzone/ns1/named.conf delete mode 100644 bin/tests/system/delzone/ns2/added.db delete mode 100644 bin/tests/system/delzone/ns2/named.args delete mode 100644 bin/tests/system/delzone/ns2/named.conf delete mode 100644 bin/tests/system/delzone/ns2/normal.db delete mode 100644 bin/tests/system/delzone/setup.sh delete mode 100755 bin/tests/system/delzone/tests.sh diff --git a/bin/tests/system/Makefile.am b/bin/tests/system/Makefile.am index 2ced3a941e..8dafe871c5 100644 --- a/bin/tests/system/Makefile.am +++ b/bin/tests/system/Makefile.am @@ -163,9 +163,9 @@ TESTS += \ # The "stress" test is not run by default since it creates enough # load on the machine to make it unusable to other users. -# The "dialup", "delzone", and "dupsigs" tests are also not run by +# The "dialup" and "dupsigs" tests are also not run by # default because they take a very long time to complete. -# TESTS += delzone dialup dupsigs stress +# TESTS += dialup dupsigs stress if HAVE_LMDB TESTS += nzd2nzf diff --git a/bin/tests/system/conf.sh.common b/bin/tests/system/conf.sh.common index 804c1ef7cd..bf820bb275 100644 --- a/bin/tests/system/conf.sh.common +++ b/bin/tests/system/conf.sh.common @@ -28,7 +28,7 @@ export LANG=C # # The "stress" test is not run by default since it creates enough # load on the machine to make it unusable to other users. -# The "dialup", "delzone", and "dupsigs" tests are also not run by +# The "dialup" and "dupsigs" tests are also not run by # default because they take a very long time to complete. # diff --git a/bin/tests/system/delzone/clean.sh b/bin/tests/system/delzone/clean.sh deleted file mode 100644 index 33c0614e27..0000000000 --- a/bin/tests/system/delzone/clean.sh +++ /dev/null @@ -1,25 +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. - -rm -f dig.out.* -rm -f rndc.out* -rm -f */named.memstats -rm -f ns2/*.nzf -rm -f ns2/*.nzd ns2/*nzd-lock -rm -f ns2/core* -rm -f ns2/inline.db.jbk -rm -f ns2/inline.db.signed -rm -f ns2/inlinesec.bk* -rm -f ns*/named.lock -rm -f ns2/nzf-* -rm -f ns*/managed-keys.bind* diff --git a/bin/tests/system/delzone/ns1/inlinesec.db b/bin/tests/system/delzone/ns1/inlinesec.db deleted file mode 100644 index eb9d042d6a..0000000000 --- a/bin/tests/system/delzone/ns1/inlinesec.db +++ /dev/null @@ -1,26 +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. - -$ORIGIN inlinesec.example. -$TTL 300 ; 5 minutes -@ IN SOA mname1. . ( - 1 ; serial - 20 ; refresh (20 seconds) - 20 ; retry (20 seconds) - 1814400 ; expire (3 weeks) - 3600 ; minimum (1 hour) - ) - NS ns2 -ns2 A 10.53.0.2 - MX 10 mail - -a A 10.0.0.1 -mail A 10.0.0.2 diff --git a/bin/tests/system/delzone/ns1/named.conf b/bin/tests/system/delzone/ns1/named.conf deleted file mode 100644 index cc3e6a6b53..0000000000 --- a/bin/tests/system/delzone/ns1/named.conf +++ /dev/null @@ -1,34 +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. - */ - -controls { /* empty */ }; - -options { - port 5300; - pid-file "named.pid"; - listen-on { 10.53.0.1; }; - listen-on-v6 { none; }; - allow-query { any; }; - recursion no; - dnssec-validation no; -}; - -zone "." { - type hint; - file "../../common/root.hint"; -}; - -zone "inlinesec.example" { - type primary; - file "inlinesec.db"; -}; diff --git a/bin/tests/system/delzone/ns2/added.db b/bin/tests/system/delzone/ns2/added.db deleted file mode 100644 index 286e717532..0000000000 --- a/bin/tests/system/delzone/ns2/added.db +++ /dev/null @@ -1,26 +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. - -;$ORIGIN added.example. -$TTL 300 ; 5 minutes -@ IN SOA mname1. . ( - 1 ; serial - 20 ; refresh (20 seconds) - 20 ; retry (20 seconds) - 1814400 ; expire (3 weeks) - 3600 ; minimum (1 hour) - ) - NS ns2 -ns2 A 10.53.0.2 - MX 10 mail - -a A 10.0.0.1 -mail A 10.0.0.2 diff --git a/bin/tests/system/delzone/ns2/named.args b/bin/tests/system/delzone/ns2/named.args deleted file mode 100644 index 6ee0d9fe9a..0000000000 --- a/bin/tests/system/delzone/ns2/named.args +++ /dev/null @@ -1 +0,0 @@ --D delzone-ns2 -X named.lock -m record -c named.conf -g -U 4 -T maxcachesize=2097152 diff --git a/bin/tests/system/delzone/ns2/named.conf b/bin/tests/system/delzone/ns2/named.conf deleted file mode 100644 index a20932b9a9..0000000000 --- a/bin/tests/system/delzone/ns2/named.conf +++ /dev/null @@ -1,35 +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. - */ - -options { - port 5300; - pid-file "named.pid"; - listen-on { 10.53.0.2; }; - listen-on-v6 { none; }; - allow-query { any; }; - recursion no; - dnssec-validation no; - allow-new-zones yes; -}; - -include "../../common/controls.conf"; - -zone "." { - type hint; - file "../../common/root.hint"; -}; - -zone "normal.example" { - type primary; - file "normal.db"; -}; diff --git a/bin/tests/system/delzone/ns2/normal.db b/bin/tests/system/delzone/ns2/normal.db deleted file mode 100644 index fa05638f32..0000000000 --- a/bin/tests/system/delzone/ns2/normal.db +++ /dev/null @@ -1,26 +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. - -$ORIGIN normal.example. -$TTL 300 ; 5 minutes -@ IN SOA mname1. . ( - 1 ; serial - 20 ; refresh (20 seconds) - 20 ; retry (20 seconds) - 1814400 ; expire (3 weeks) - 3600 ; minimum (1 hour) - ) - NS ns2 -ns2 A 10.53.0.2 - MX 10 mail - -a A 10.0.0.1 -mail A 10.0.0.2 diff --git a/bin/tests/system/delzone/setup.sh b/bin/tests/system/delzone/setup.sh deleted file mode 100644 index 3628f90b2b..0000000000 --- a/bin/tests/system/delzone/setup.sh +++ /dev/null @@ -1,16 +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. - -. ../conf.sh - -$SHELL clean.sh diff --git a/bin/tests/system/delzone/tests.sh b/bin/tests/system/delzone/tests.sh deleted file mode 100755 index fcd687d5f8..0000000000 --- a/bin/tests/system/delzone/tests.sh +++ /dev/null @@ -1,64 +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. - -. ../conf.sh - -DIGOPTS="+tcp +nosea +nostat +nocmd +norec +noques +noauth +noadd +nostats +dnssec -p 5300" -status=0 -n=0 - -echo_i "checking normally loaded zone ($n)" -ret=0 -$DIG $DIGOPTS @10.53.0.2 a.normal.example a > dig.out.ns2.$n || ret=1 -grep 'status: NOERROR' dig.out.ns2.$n > /dev/null || ret=1 -grep '^a.normal.example' dig.out.ns2.$n > /dev/null || ret=1 -n=`expr $n + 1` -if [ $ret != 0 ]; then echo_i "failed"; fi -status=`expr $status + $ret` - -if [ -x "$PYTHON" ]; then -echo_i "adding and deleting 20000 new zones ($n)" -ret=0 - time ( - echo_i "adding" - $PYTHON << EOF -import sys -sys.path.insert(0, '../../../../bin/python') -from isc import rndc -r = rndc(('10.53.0.2', 9953), '${DEFAULT_HMAC}', '1234abcd8765') -for i in range(20000): - res = r.call('addzone z%d.example { type primary; file "added.db"; };' % i) - if 'text' in res: - print ('I:n2:' + res['text']) -EOF - ) - time ( - echo_i "deleting" - $PYTHON << EOF -import sys -sys.path.insert(0, '../../../../bin/python') -from isc import rndc -r = rndc(('10.53.0.2', 9953), '${DEFAULT_HMAC}', '1234abcd8765') -for i in range(20000): - res = r.call('delzone z%d.example' % i) - if 'text' in res: - print ('I:n2:' + res['text']) -EOF - ) - n=`expr $n + 1` - if [ $ret != 0 ]; then echo_i "failed"; fi - status=`expr $status + $ret` -fi - -echo_i "exit status: $status" -exit $status