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)
#
# 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.
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
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; };
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; };
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; };
--- /dev/null
+#!/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
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
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 ]
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; };
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; };
};
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*
$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