]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Revive dialup system test
authorTom Krizek <tkrizek@isc.org>
Mon, 10 Oct 2022 15:21:41 +0000 (17:21 +0200)
committerTom Krizek <tkrizek@isc.org>
Wed, 19 Oct 2022 13:32:44 +0000 (15:32 +0200)
Properly template the port number in config files with copy_setports.

The test takes two minutes on my machine which doesn't seem like a
proper justification to exclude it from the test suite, especially
considering we run these tests in parallel nowadays. The resource usage
doesn't seems significantly increased so it shouldn't interfere with
other system tests.

There also exists a precedent for longer running system tests that are
already part of the default system test suite (e.g. serve-stale takes
almost three minutes on the same machine).

(cherry picked from commit 235ae5f344895fa5d20924e5eeba74a24b33d5d7)

12 files changed:
bin/tests/system/Makefile.am
bin/tests/system/conf.sh.common
bin/tests/system/dialup/clean.sh
bin/tests/system/dialup/ns1/named.conf.in [moved from bin/tests/system/dialup/ns1/named.conf with 98% similarity]
bin/tests/system/dialup/ns2/named.conf.in [moved from bin/tests/system/dialup/ns2/named.conf with 98% similarity]
bin/tests/system/dialup/ns3/named.conf.in [moved from bin/tests/system/dialup/ns3/named.conf with 98% similarity]
bin/tests/system/dialup/setup.sh [new file with mode: 0644]
bin/tests/system/dialup/tests.sh
bin/tests/system/dupsigs/tests.sh
bin/tests/system/rrl/broken.conf.in [moved from bin/tests/system/rrl/broken.conf with 91% similarity]
bin/tests/system/rrl/clean.sh
bin/tests/system/rrl/setup.sh

index dc73117b2700ed3fb603721c3e76b3c74a2848f0..15371f57ba80fdac66c839e4434eb441202748e9 100644 (file)
@@ -105,6 +105,7 @@ TESTS +=                    \
        checknames              \
        checkzone               \
        database                \
+       dialup                  \
        dlzexternal             \
        dns64                   \
        dscp                    \
@@ -172,9 +173,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" and "dupsigs" tests are also not run by
-# default because they take a very long time to complete.
-# TESTS += dialup dupsigs stress
+# The "dupsigs" test is not run by default because it takes
+# a very long time to complete.
+# TESTS += dupsigs stress
 
 if HAVE_LMDB
 TESTS += nzd2nzf
index e0811c8eaa38ed683f196ee84e44d83f66eedf32..726e20f817c95c901061ed4ecce5f7f8fc3ca42d 100644 (file)
@@ -28,8 +28,8 @@ 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" and "dupsigs" tests are also not run by
-# default because they take a very long time to complete.
+# The "dupsigs" test is not run by default because it takes
+# a very long time to complete.
 #
 # The following tests are hard-coded to use ports 5300 and 9953. For
 # this reason, these must be run sequentially.
index 581c3ccdfafe29b39acd0e81cc11aab4673b12a0..9318255bfaf01c2a2569741c648b1fc5e2ec47ab 100644 (file)
@@ -14,3 +14,5 @@
 rm -f ns2/example.bk
 rm -f ns3/example.bk
 rm -f */named.memstats */named.run
+rm -f ns*/named.conf
+rm -f ns*/named.lock
similarity index 98%
rename from bin/tests/system/dialup/ns1/named.conf
rename to bin/tests/system/dialup/ns1/named.conf.in
index 14852d13f94156856e537c545f9863b7770ade45..4b8302bcfa43bf086416791ea61e8ada994fccd9 100644 (file)
@@ -17,7 +17,7 @@ options {
        query-source address 10.53.0.1;
        notify-source 10.53.0.1;
        transfer-source 10.53.0.1;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.1; };
        listen-on-v6 { none; };
similarity index 98%
rename from bin/tests/system/dialup/ns2/named.conf
rename to bin/tests/system/dialup/ns2/named.conf.in
index d36d4346aa08461d9c71ca4100e0ad4db761a6e6..382f5ce9a4813bb3947fe0bb1adb886f0c355644 100644 (file)
@@ -17,7 +17,7 @@ options {
        query-source address 10.53.0.2;
        notify-source 10.53.0.2;
        transfer-source 10.53.0.2;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.2; };
        listen-on-v6 { none; };
similarity index 98%
rename from bin/tests/system/dialup/ns3/named.conf
rename to bin/tests/system/dialup/ns3/named.conf.in
index 5158ef963f148862b347d32d265debfb07e3cc31..054a65893c8a22aade45ab800af3e1b4669dba37 100644 (file)
@@ -17,7 +17,7 @@ options {
        query-source address 10.53.0.3;
        notify-source 10.53.0.3;
        transfer-source 10.53.0.3;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.3; };
        listen-on-v6 { none; };
diff --git a/bin/tests/system/dialup/setup.sh b/bin/tests/system/dialup/setup.sh
new file mode 100644 (file)
index 0000000..dad3589
--- /dev/null
@@ -0,0 +1,19 @@
+#!/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.
+
+# shellcheck source=conf.sh
+. ../conf.sh
+
+copy_setports ns1/named.conf.in ns1/named.conf
+copy_setports ns2/named.conf.in ns2/named.conf
+copy_setports ns3/named.conf.in ns3/named.conf
index efc976177a499fb2f27d43e69babb54a95f1e162..3a8f5e89806c5e5a331678b38b3a79f6daf56a40 100644 (file)
@@ -17,7 +17,7 @@ status=0
 
 rm -f dig.out.*
 
-DIGOPTS="+norec +tcp +noadd +nosea +nostat +noquest +nocmd -p 5300"
+DIGOPTS="+norec +tcp +noadd +nosea +nostat +noquest +nocmd -p ${PORT}"
 
 # Check the example. domain
 
index 9778ff9a2e8d7c9d0a9263547349f638c1de8c6f..731a3193b36c047052941231d857ac4312cbea69 100644 (file)
@@ -20,7 +20,7 @@ do
        et=`expr $now - $start`
        echo "=============== $et ============"
        $JOURNALPRINT ns1/signing.test.db.signed.jnl | $PERL check_journal.pl
-       $DIG axfr signing.test -p 5300 @10.53.0.1 > dig.out.at$et
+       $DIG axfr signing.test -p ${PORT} @10.53.0.1 > dig.out.at$et
        awk '$4 == "RRSIG" { print $11 }' dig.out.at$et | sort | uniq -c
        lines=`awk '$4 == "RRSIG" { print}' dig.out.at$et | wc -l`
        if [ ${et} -ne 0 -a ${lines} -ne 4009 ]
similarity index 91%
rename from bin/tests/system/rrl/broken.conf
rename to bin/tests/system/rrl/broken.conf.in
index bf98736ee5dbd7028ac5e23aa951eeff155f98dc..020542cfe74d0b3200027d7ab51628a9bd8db208 100644 (file)
@@ -17,7 +17,7 @@ options {
        query-source address 10.53.0.5;
        notify-source 10.53.0.5;
        transfer-source 10.53.0.5;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        statistics-file "named.stats";
        listen-on { 10.53.0.5; };
@@ -41,6 +41,6 @@ key rndc_key {
        algorithm hmac-sha256;
 };
 controls {
-       inet 10.53.0.5 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.5 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
index abb10bd7449605b9d824c982259e0770aa2e58a9..5709d9f7fdc87a113c01f6f48580ed0f3a0564ea 100644 (file)
@@ -16,5 +16,6 @@ rm -f  */named.memstats */named.run */named.stats */log-* */session.key
 rm -f ns3/bl*.db */*.jnl */*.core */*.pid
 rm -f ns*/named.lock
 rm -f ns*/named.conf
+rm -f broken.conf
 rm -f broken.out
 rm -f ns*/managed-keys.bind*
index 49a642683d482bd6f618d13b43de3715398347e6..752b02ceedef1dd4a64a56a3a05638bc420f6ca2 100644 (file)
@@ -15,6 +15,7 @@
 
 $SHELL clean.sh
 
+copy_setports broken.conf.in broken.conf
 copy_setports ns1/named.conf.in ns1/named.conf
 copy_setports ns2/named.conf.in ns2/named.conf
 copy_setports ns3/named.conf.in ns3/named.conf