]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
parallelize most system tests
authorEvan Hunt <each@isc.org>
Sun, 25 Feb 2018 07:55:48 +0000 (23:55 -0800)
committerEvan Hunt <each@isc.org>
Sun, 25 Feb 2018 19:17:55 +0000 (11:17 -0800)
(cherry picked from commit c032c54dda2d75c0ec68017e1331bc9880c03ae1)
(cherry picked from commit 2b81f322cb499abd1164175a3767751aba7fec60)
(cherry picked from commit 167fa161d15206c09f3bd77faf851df986a3c14a)
(cherry picked from commit 1f297d33a08e0a945f9e5e403b87c04490ec58c5)

476 files changed:
bin/tests/system/Makefile.in
bin/tests/system/README
bin/tests/system/acl/clean.sh
bin/tests/system/acl/ns2/named1.conf.in [moved from bin/tests/system/acl/ns2/named1.conf with 89% similarity]
bin/tests/system/acl/ns2/named2.conf.in [moved from bin/tests/system/acl/ns2/named2.conf with 90% similarity]
bin/tests/system/acl/ns2/named3.conf.in [moved from bin/tests/system/acl/ns2/named3.conf with 90% similarity]
bin/tests/system/acl/ns2/named4.conf.in [moved from bin/tests/system/acl/ns2/named4.conf with 90% similarity]
bin/tests/system/acl/ns2/named5.conf.in [moved from bin/tests/system/acl/ns2/named5.conf with 89% similarity]
bin/tests/system/acl/ns3/named.conf.in [moved from bin/tests/system/acl/ns3/named.conf with 93% similarity]
bin/tests/system/acl/ns4/named.conf.in [moved from bin/tests/system/acl/ns4/named.conf with 93% similarity]
bin/tests/system/acl/setup.sh
bin/tests/system/acl/tests.sh
bin/tests/system/additional/clean.sh
bin/tests/system/additional/ns1/named1.conf.in [moved from bin/tests/system/additional/ns1/named1.conf with 91% similarity]
bin/tests/system/additional/ns1/named2.conf.in [moved from bin/tests/system/additional/ns1/named2.conf with 91% similarity]
bin/tests/system/additional/ns3/named.conf.in [moved from bin/tests/system/additional/ns3/named.conf with 98% similarity]
bin/tests/system/additional/setup.sh
bin/tests/system/additional/tests.sh
bin/tests/system/addzone/clean.sh
bin/tests/system/addzone/ns1/named.conf.in [moved from bin/tests/system/addzone/ns1/named.conf with 91% similarity]
bin/tests/system/addzone/ns2/named1.conf.in [moved from bin/tests/system/addzone/ns2/named1.conf with 88% similarity]
bin/tests/system/addzone/ns2/named2.conf.in [moved from bin/tests/system/addzone/ns2/named2.conf with 92% similarity]
bin/tests/system/addzone/ns3/named1.conf.in [moved from bin/tests/system/addzone/ns3/named1.conf with 87% similarity]
bin/tests/system/addzone/ns3/named2.conf.in [moved from bin/tests/system/addzone/ns3/named2.conf with 92% similarity]
bin/tests/system/addzone/setup.sh
bin/tests/system/addzone/tests.sh
bin/tests/system/ans.pl
bin/tests/system/autosign/clean.sh
bin/tests/system/autosign/ns1/named.conf.in [moved from bin/tests/system/autosign/ns1/named.conf with 88% similarity]
bin/tests/system/autosign/ns2/named.conf.in [moved from bin/tests/system/autosign/ns2/named.conf with 93% similarity]
bin/tests/system/autosign/ns3/named.conf.in [moved from bin/tests/system/autosign/ns3/named.conf with 98% similarity]
bin/tests/system/autosign/ns4/named.conf.in [moved from bin/tests/system/autosign/ns4/named.conf with 92% similarity]
bin/tests/system/autosign/ns5/named.conf.in [moved from bin/tests/system/autosign/ns5/named.conf with 92% similarity]
bin/tests/system/autosign/setup.sh
bin/tests/system/autosign/tests.sh
bin/tests/system/builtin/clean.sh
bin/tests/system/builtin/ns1/named.conf.in [moved from bin/tests/system/builtin/ns1/named.conf with 87% similarity]
bin/tests/system/builtin/ns2/named.conf.in [moved from bin/tests/system/builtin/ns2/named.conf with 87% similarity]
bin/tests/system/builtin/ns3/named.conf.in [moved from bin/tests/system/builtin/ns3/named.conf with 88% similarity]
bin/tests/system/builtin/setup.sh [new file with mode: 0644]
bin/tests/system/builtin/tests.sh
bin/tests/system/cacheclean/clean.sh
bin/tests/system/cacheclean/ns1/named.conf.in [moved from bin/tests/system/cacheclean/ns1/named.conf with 92% similarity]
bin/tests/system/cacheclean/ns2/named.conf.in [moved from bin/tests/system/cacheclean/ns2/named.conf with 89% similarity]
bin/tests/system/cacheclean/setup.sh [new file with mode: 0644]
bin/tests/system/cacheclean/tests.sh
bin/tests/system/case/clean.sh [deleted file]
bin/tests/system/case/ns1/example.db [deleted file]
bin/tests/system/case/ns1/named.conf [deleted file]
bin/tests/system/case/ns2/named.conf [deleted file]
bin/tests/system/case/tests.sh [deleted file]
bin/tests/system/chain/ans3/ans.pl
bin/tests/system/chain/ans4/README.anspy
bin/tests/system/chain/ans4/ans.py
bin/tests/system/chain/clean.sh
bin/tests/system/chain/ns1/named.conf.in [moved from bin/tests/system/chain/ns1/named.conf with 96% similarity]
bin/tests/system/chain/ns2/named.conf.in [moved from bin/tests/system/chain/ns2/named.conf with 97% similarity]
bin/tests/system/chain/ns5/named.conf.in [moved from bin/tests/system/chain/ns5/named.conf with 96% similarity]
bin/tests/system/chain/ns7/named.conf.in [moved from bin/tests/system/chain/ns7/named.conf with 92% similarity]
bin/tests/system/chain/prereq.sh
bin/tests/system/chain/setup.sh
bin/tests/system/chain/tests.sh
bin/tests/system/checkconf/tests.sh
bin/tests/system/checkds/tests.sh
bin/tests/system/checknames/clean.sh
bin/tests/system/checknames/ns1/named.conf.in [moved from bin/tests/system/checknames/ns1/named.conf with 80% similarity]
bin/tests/system/checknames/ns2/named.conf [deleted file]
bin/tests/system/checknames/ns2/named.conf.in [moved from bin/tests/system/fetchlimit/lameserver/ns2/named.conf with 78% similarity]
bin/tests/system/checknames/ns3/named.conf [deleted file]
bin/tests/system/checknames/ns3/named.conf.in [new file with mode: 0644]
bin/tests/system/checknames/ns4/named.conf.in [moved from bin/tests/system/checknames/ns4/named.conf with 92% similarity]
bin/tests/system/checknames/setup.sh
bin/tests/system/checknames/tests.sh
bin/tests/system/checkzone/tests.sh
bin/tests/system/cleanall.sh
bin/tests/system/conf.sh.in
bin/tests/system/coverage/prereq.sh
bin/tests/system/coverage/tests.sh
bin/tests/system/database/clean.sh
bin/tests/system/database/ns1/named1.conf.in [moved from bin/tests/system/database/ns1/named.conf1 with 89% similarity]
bin/tests/system/database/ns1/named2.conf.in [moved from bin/tests/system/database/ns1/named.conf2 with 89% similarity]
bin/tests/system/database/setup.sh
bin/tests/system/database/tests.sh
bin/tests/system/digdelv/clean.sh
bin/tests/system/digdelv/ns1/named.conf.in [moved from bin/tests/system/digdelv/ns1/named.conf with 96% similarity]
bin/tests/system/digdelv/ns2/named.conf.in [moved from bin/tests/system/digdelv/ns2/named.conf with 96% similarity]
bin/tests/system/digdelv/ns3/named.conf.in [moved from bin/tests/system/digdelv/ns3/named.conf with 95% similarity]
bin/tests/system/digdelv/setup.sh [new file with mode: 0644]
bin/tests/system/digdelv/tests.sh
bin/tests/system/dlv/clean.sh
bin/tests/system/dlv/ns1/named.conf.in [moved from bin/tests/system/dlv/ns1/named.conf with 85% similarity]
bin/tests/system/dlv/ns1/root.db.in
bin/tests/system/dlv/ns1/rootservers.utld.db
bin/tests/system/dlv/ns1/sign.sh
bin/tests/system/dlv/ns2/druz.db.in
bin/tests/system/dlv/ns2/hints
bin/tests/system/dlv/ns2/named.conf.in [moved from bin/tests/system/dlv/ns2/named.conf with 86% similarity]
bin/tests/system/dlv/ns2/sign.sh
bin/tests/system/dlv/ns2/utld.db
bin/tests/system/dlv/ns3/child.db.in
bin/tests/system/dlv/ns3/dlv.db.in
bin/tests/system/dlv/ns3/hints
bin/tests/system/dlv/ns3/named.conf.in [moved from bin/tests/system/dlv/ns3/named.conf with 92% similarity]
bin/tests/system/dlv/ns3/sign.sh
bin/tests/system/dlv/ns4/child.db
bin/tests/system/dlv/ns4/hints
bin/tests/system/dlv/ns4/named.conf.in [moved from bin/tests/system/dlv/ns4/named.conf with 86% similarity]
bin/tests/system/dlv/ns5/hints
bin/tests/system/dlv/ns5/named.conf [deleted file]
bin/tests/system/dlv/ns5/named.conf.in [new file with mode: 0644]
bin/tests/system/dlv/ns5/rndc.conf
bin/tests/system/dlv/ns6/child.db.in
bin/tests/system/dlv/ns6/hints
bin/tests/system/dlv/ns6/named.conf.in [moved from bin/tests/system/dlv/ns6/named.conf with 92% similarity]
bin/tests/system/dlv/ns6/sign.sh
bin/tests/system/dlv/prereq.sh
bin/tests/system/dlv/setup.sh
bin/tests/system/dlv/tests.sh
bin/tests/system/dlz/clean.sh
bin/tests/system/dlz/ns1/named.conf.in [moved from bin/tests/system/dlz/ns1/named.conf with 91% similarity]
bin/tests/system/dlz/prereq.sh.in
bin/tests/system/dlz/setup.sh [new file with mode: 0644]
bin/tests/system/dlz/tests.sh
bin/tests/system/dlzexternal/clean.sh
bin/tests/system/dlzexternal/ns1/.gitignore
bin/tests/system/dlzexternal/ns1/dlzs.conf.in [new file with mode: 0644]
bin/tests/system/dlzexternal/ns1/named.conf.in
bin/tests/system/dlzexternal/prereq.sh
bin/tests/system/dlzexternal/setup.sh
bin/tests/system/dlzexternal/tests.sh
bin/tests/system/dns64/clean.sh
bin/tests/system/dns64/ns1/named.conf.in [moved from bin/tests/system/dns64/ns1/named.conf with 93% similarity]
bin/tests/system/dns64/ns2/named.conf.in [moved from bin/tests/system/dns64/ns2/named.conf with 95% similarity]
bin/tests/system/dns64/setup.sh
bin/tests/system/dns64/tests.sh
bin/tests/system/dnssec/clean.sh
bin/tests/system/dnssec/dnssec_update_test.pl
bin/tests/system/dnssec/ns1/named.conf.in [moved from bin/tests/system/dnssec/ns1/named.conf with 92% similarity]
bin/tests/system/dnssec/ns2/named.conf.in [moved from bin/tests/system/dnssec/ns2/named.conf with 96% similarity]
bin/tests/system/dnssec/ns3/named.conf.in [moved from bin/tests/system/dnssec/ns3/named.conf with 97% similarity]
bin/tests/system/dnssec/ns4/named1.conf.in [moved from bin/tests/system/dnssec/ns4/named1.conf with 90% similarity]
bin/tests/system/dnssec/ns4/named2.conf.in [moved from bin/tests/system/dnssec/ns4/named2.conf with 88% similarity]
bin/tests/system/dnssec/ns4/named3.conf.in [moved from bin/tests/system/dnssec/ns4/named3.conf with 88% similarity]
bin/tests/system/dnssec/ns4/named4.conf.in [moved from bin/tests/system/dnssec/ns4/named4.conf with 92% similarity]
bin/tests/system/dnssec/ns4/named5.conf.in [moved from bin/tests/system/dnssec/ns4/named5.conf with 95% similarity]
bin/tests/system/dnssec/ns5/named1.conf.in [moved from bin/tests/system/dnssec/ns5/named1.conf with 92% similarity]
bin/tests/system/dnssec/ns5/named2.conf.in [moved from bin/tests/system/dnssec/ns5/named2.conf with 93% similarity]
bin/tests/system/dnssec/ns6/named.conf.in [moved from bin/tests/system/dnssec/ns6/named.conf with 92% similarity]
bin/tests/system/dnssec/ns7/named.conf.in [moved from bin/tests/system/dnssec/ns7/named.conf with 94% similarity]
bin/tests/system/dnssec/prereq.sh
bin/tests/system/dnssec/setup.sh
bin/tests/system/dnssec/tests.sh
bin/tests/system/dsdigest/prereq.sh [deleted file]
bin/tests/system/emptyzones/ns1/named1.conf.in [moved from bin/tests/system/emptyzones/ns1/named1.conf with 91% similarity]
bin/tests/system/emptyzones/ns1/named2.conf.in [moved from bin/tests/system/emptyzones/ns1/named2.conf with 91% similarity]
bin/tests/system/emptyzones/setup.sh
bin/tests/system/emptyzones/tests.sh
bin/tests/system/fetchlimit/ans4/ans.pl
bin/tests/system/fetchlimit/clean.sh
bin/tests/system/fetchlimit/lameserver/ans4/ans.pl [deleted file]
bin/tests/system/fetchlimit/lameserver/clean.sh [deleted file]
bin/tests/system/fetchlimit/lameserver/ns1/named.conf [deleted file]
bin/tests/system/fetchlimit/lameserver/ns1/root.db [deleted file]
bin/tests/system/fetchlimit/lameserver/ns2/example.db [deleted file]
bin/tests/system/fetchlimit/lameserver/ns3/named1.conf [deleted file]
bin/tests/system/fetchlimit/lameserver/ns3/named2.conf [deleted file]
bin/tests/system/fetchlimit/lameserver/ns3/root.hint [deleted file]
bin/tests/system/fetchlimit/lameserver/setup.sh [deleted file]
bin/tests/system/fetchlimit/lameserver/tests.sh [deleted file]
bin/tests/system/fetchlimit/ns1/named.conf.in [moved from bin/tests/system/fetchlimit/ns1/named.conf with 96% similarity]
bin/tests/system/fetchlimit/ns2/named.conf.in [moved from bin/tests/system/fetchlimit/ns2/named.conf with 86% similarity]
bin/tests/system/fetchlimit/ns3/named1.conf.in [moved from bin/tests/system/fetchlimit/ns3/named1.conf with 93% similarity]
bin/tests/system/fetchlimit/ns3/named2.conf.in [moved from bin/tests/system/fetchlimit/ns3/named2.conf with 92% similarity]
bin/tests/system/fetchlimit/ns3/named3.conf [deleted file]
bin/tests/system/fetchlimit/ns3/named3.conf.in [moved from bin/tests/system/fetchlimit/lameserver/ns3/named3.conf with 92% similarity]
bin/tests/system/fetchlimit/setup.sh
bin/tests/system/fetchlimit/tests.sh
bin/tests/system/filter-aaaa/clean.sh
bin/tests/system/filter-aaaa/ns1/named.conf.in [moved from bin/tests/system/filter-aaaa/ns1/named.conf with 83% similarity]
bin/tests/system/filter-aaaa/ns1/sign.sh
bin/tests/system/filter-aaaa/ns2/named.conf.in [moved from bin/tests/system/filter-aaaa/ns2/named.conf with 77% similarity]
bin/tests/system/filter-aaaa/ns3/named.conf.in [moved from bin/tests/system/filter-aaaa/ns3/named.conf with 76% similarity]
bin/tests/system/filter-aaaa/ns4/named.conf.in [moved from bin/tests/system/filter-aaaa/ns4/named.conf with 83% similarity]
bin/tests/system/filter-aaaa/ns4/sign.sh
bin/tests/system/filter-aaaa/setup.sh
bin/tests/system/filter-aaaa/tests.sh
bin/tests/system/formerr/clean.sh
bin/tests/system/formerr/ns1/named.conf.in [moved from bin/tests/system/formerr/ns1/named.conf with 91% similarity]
bin/tests/system/formerr/setup.sh [new file with mode: 0644]
bin/tests/system/formerr/tests.sh
bin/tests/system/forward/clean.sh
bin/tests/system/forward/ns1/named.conf.in [moved from bin/tests/system/forward/ns1/named.conf with 93% similarity]
bin/tests/system/forward/ns2/named.conf.in [moved from bin/tests/system/forward/ns2/named.conf with 93% similarity]
bin/tests/system/forward/ns3/named.conf.in [moved from bin/tests/system/forward/ns3/named.conf with 93% similarity]
bin/tests/system/forward/ns4/named.conf.in [moved from bin/tests/system/forward/ns4/named.conf with 93% similarity]
bin/tests/system/forward/ns5/named.conf.in [moved from bin/tests/system/forward/ns5/named.conf with 91% similarity]
bin/tests/system/forward/setup.sh [new file with mode: 0644]
bin/tests/system/forward/tests.sh
bin/tests/system/glue/clean.sh
bin/tests/system/glue/ns1/named.conf.in [moved from bin/tests/system/glue/ns1/named.conf with 92% similarity]
bin/tests/system/glue/setup.sh
bin/tests/system/glue/tests.sh
bin/tests/system/inline/clean.sh
bin/tests/system/inline/ns1/named.conf.in [moved from bin/tests/system/inline/ns1/named.conf with 94% similarity]
bin/tests/system/inline/ns2/named.conf.in [moved from bin/tests/system/inline/ns2/named.conf with 91% similarity]
bin/tests/system/inline/ns3/named.conf.in [moved from bin/tests/system/inline/ns3/named.conf with 94% similarity]
bin/tests/system/inline/ns4/named.conf.in [moved from bin/tests/system/inline/ns4/named.conf with 91% similarity]
bin/tests/system/inline/ns5/named.conf.post
bin/tests/system/inline/ns5/named.conf.pre
bin/tests/system/inline/ns6/named.conf.in [moved from bin/tests/system/inline/ns6/named.conf with 88% similarity]
bin/tests/system/inline/ns7/named.conf.in [moved from bin/tests/system/inline/ns7/named.conf with 95% similarity]
bin/tests/system/inline/setup.sh
bin/tests/system/inline/tests.sh
bin/tests/system/integrity/clean.sh
bin/tests/system/integrity/ns1/named.conf.in [moved from bin/tests/system/integrity/ns1/named.conf with 96% similarity]
bin/tests/system/integrity/setup.sh [new file with mode: 0644]
bin/tests/system/integrity/tests.sh
bin/tests/system/ixfr/clean.sh
bin/tests/system/ixfr/ns3/named.conf.in [moved from bin/tests/system/ixfr/ns3/named.conf with 91% similarity]
bin/tests/system/ixfr/ns4/named.conf.in [moved from bin/tests/system/ixfr/ns4/named.conf with 76% similarity]
bin/tests/system/ixfr/prereq.sh
bin/tests/system/ixfr/setup.sh
bin/tests/system/ixfr/tests.sh
bin/tests/system/legacy/clean.sh
bin/tests/system/legacy/ns1/named1.conf.in [moved from bin/tests/system/legacy/ns1/named2.conf with 94% similarity]
bin/tests/system/legacy/ns1/named2.conf.in [moved from bin/tests/system/legacy/ns1/named1.conf with 96% similarity]
bin/tests/system/legacy/ns2/named.conf.in [moved from bin/tests/system/legacy/ns2/named.conf with 96% similarity]
bin/tests/system/legacy/ns3/named.conf.in [moved from bin/tests/system/legacy/ns3/named.conf with 96% similarity]
bin/tests/system/legacy/ns4/named.conf.in [moved from bin/tests/system/legacy/ns4/named.conf with 96% similarity]
bin/tests/system/legacy/ns5/named.conf.in [moved from bin/tests/system/legacy/ns5/named.conf with 96% similarity]
bin/tests/system/legacy/ns6/named.conf.in [moved from bin/tests/system/legacy/ns6/named.conf with 96% similarity]
bin/tests/system/legacy/ns6/sign.sh
bin/tests/system/legacy/ns7/named.conf.in [moved from bin/tests/system/legacy/ns7/named.conf with 96% similarity]
bin/tests/system/legacy/ns7/sign.sh
bin/tests/system/legacy/setup.sh
bin/tests/system/legacy/tests.sh
bin/tests/system/limits/clean.sh
bin/tests/system/limits/ns1/named.conf.in [moved from bin/tests/system/limits/ns1/named.conf with 92% similarity]
bin/tests/system/limits/setup.sh [new file with mode: 0644]
bin/tests/system/limits/tests.sh
bin/tests/system/logfileconfig/clean.sh
bin/tests/system/logfileconfig/ns1/controls.conf.in [new file with mode: 0644]
bin/tests/system/logfileconfig/ns1/named.dirconf
bin/tests/system/logfileconfig/ns1/named.pipeconf
bin/tests/system/logfileconfig/ns1/named.plain
bin/tests/system/logfileconfig/ns1/named.symconf
bin/tests/system/logfileconfig/ns1/named.unlimited
bin/tests/system/logfileconfig/ns1/named.versconf
bin/tests/system/logfileconfig/ns1/rndc.conf.in [moved from bin/tests/system/logfileconfig/ns1/rndc.conf with 95% similarity]
bin/tests/system/logfileconfig/setup.sh
bin/tests/system/logfileconfig/tests.sh
bin/tests/system/masterfile/clean.sh
bin/tests/system/masterfile/ns1/named.conf.in [moved from bin/tests/system/masterfile/ns1/named.conf with 92% similarity]
bin/tests/system/masterfile/ns2/named.conf.in [moved from bin/tests/system/masterfile/ns2/named.conf with 92% similarity]
bin/tests/system/masterfile/setup.sh [new file with mode: 0644]
bin/tests/system/masterfile/tests.sh
bin/tests/system/masterformat/clean.sh
bin/tests/system/masterformat/ns1/named.conf.in [moved from bin/tests/system/masterformat/ns1/named.conf with 94% similarity]
bin/tests/system/masterformat/ns2/named.conf.in [moved from bin/tests/system/masterformat/ns2/named.conf with 93% similarity]
bin/tests/system/masterformat/setup.sh
bin/tests/system/masterformat/tests.sh
bin/tests/system/metadata/setup.sh
bin/tests/system/metadata/tests.sh
bin/tests/system/notify/clean.sh
bin/tests/system/notify/ns1/named.conf.in [moved from bin/tests/system/views/ns1/named.conf with 91% similarity]
bin/tests/system/notify/ns2/named.conf.in [moved from bin/tests/system/notify/ns2/named.conf with 95% similarity]
bin/tests/system/notify/ns3/named.conf.in [moved from bin/tests/system/notify/ns3/named.conf with 92% similarity]
bin/tests/system/notify/ns4/named.conf.in [moved from bin/tests/system/notify/ns4/named.conf with 89% similarity]
bin/tests/system/notify/ns4/named.port [deleted file]
bin/tests/system/notify/ns4/named.port.in [new file with mode: 0644]
bin/tests/system/notify/ns5/named.conf.in [moved from bin/tests/system/notify/ns5/named.conf with 94% similarity]
bin/tests/system/notify/setup.sh
bin/tests/system/notify/tests.sh
bin/tests/system/nslookup/clean.sh
bin/tests/system/nslookup/ns1/named.conf.in [moved from bin/tests/system/nslookup/ns1/named.conf with 96% similarity]
bin/tests/system/nslookup/setup.sh
bin/tests/system/nslookup/tests.sh
bin/tests/system/nsupdate/ans4/ans.pl
bin/tests/system/nsupdate/clean.sh
bin/tests/system/nsupdate/ns1/named.conf.in [moved from bin/tests/system/nsupdate/ns1/named.conf with 92% similarity]
bin/tests/system/nsupdate/ns2/named.conf.in [moved from bin/tests/system/nsupdate/ns2/named.conf with 94% similarity]
bin/tests/system/nsupdate/ns3/named.conf.in [moved from bin/tests/system/nsupdate/ns3/named.conf with 88% similarity]
bin/tests/system/nsupdate/ns5/named.conf.in [moved from bin/tests/system/nsupdate/ns5/named.conf with 92% similarity]
bin/tests/system/nsupdate/prereq.sh
bin/tests/system/nsupdate/setup.sh
bin/tests/system/nsupdate/tests.sh
bin/tests/system/nsupdate/update_test.pl
bin/tests/system/nsupdate/verylarge.in [moved from bin/tests/system/nsupdate/verylarge with 99% similarity]
bin/tests/system/pending/clean.sh
bin/tests/system/pending/ns1/named.conf.in [moved from bin/tests/system/pending/ns1/named.conf with 91% similarity]
bin/tests/system/pending/ns2/named.conf.in [moved from bin/tests/system/pending/ns2/named.conf with 93% similarity]
bin/tests/system/pending/ns3/named.conf.in [moved from bin/tests/system/pending/ns3/named.conf with 92% similarity]
bin/tests/system/pending/ns4/named.conf.in [moved from bin/tests/system/pending/ns4/named.conf with 91% similarity]
bin/tests/system/pending/setup.sh
bin/tests/system/pending/tests.sh
bin/tests/system/reclimit/ans2/ans.pl
bin/tests/system/reclimit/ans7/ans.pl
bin/tests/system/reclimit/clean.sh
bin/tests/system/reclimit/ns1/named.conf.in [moved from bin/tests/system/reclimit/ns1/named.conf with 96% similarity]
bin/tests/system/reclimit/ns3/named1.conf.in [moved from bin/tests/system/reclimit/ns3/named1.conf with 91% similarity]
bin/tests/system/reclimit/ns3/named2.conf.in [moved from bin/tests/system/reclimit/ns3/named2.conf with 91% similarity]
bin/tests/system/reclimit/ns3/named3.conf.in [moved from bin/tests/system/reclimit/ns3/named3.conf with 91% similarity]
bin/tests/system/reclimit/ns3/named4.conf.in [moved from bin/tests/system/reclimit/ns3/named4.conf with 92% similarity]
bin/tests/system/reclimit/prereq.sh
bin/tests/system/reclimit/setup.sh
bin/tests/system/reclimit/tests.sh
bin/tests/system/redirect/clean.sh
bin/tests/system/redirect/ns1/named.conf.in [moved from bin/tests/system/redirect/ns1/named.conf with 93% similarity]
bin/tests/system/redirect/ns2/named.conf.in [moved from bin/tests/system/redirect/ns2/named.conf with 91% similarity]
bin/tests/system/redirect/setup.sh
bin/tests/system/redirect/tests.sh
bin/tests/system/resolver/ans2/ans.pl
bin/tests/system/resolver/ans3/ans.pl
bin/tests/system/resolver/ans8/ans.pl
bin/tests/system/resolver/clean.sh
bin/tests/system/resolver/ns1/named.conf.in [moved from bin/tests/system/resolver/ns1/named.conf with 95% similarity]
bin/tests/system/resolver/ns4/named.conf.in [moved from bin/tests/system/resolver/ns4/named.conf with 92% similarity]
bin/tests/system/resolver/ns5/named.conf.in [moved from bin/tests/system/resolver/ns5/named.conf with 91% similarity]
bin/tests/system/resolver/ns6/named.conf.in [moved from bin/tests/system/resolver/ns6/named.conf with 96% similarity]
bin/tests/system/resolver/ns7/named1.conf.in [moved from bin/tests/system/resolver/ns7/named1.conf with 92% similarity]
bin/tests/system/resolver/ns7/named2.conf.in [moved from bin/tests/system/resolver/ns7/named2.conf with 92% similarity]
bin/tests/system/resolver/prereq.sh
bin/tests/system/resolver/setup.sh
bin/tests/system/resolver/tests.sh
bin/tests/system/rndc/ns2/named.conf.in [moved from bin/tests/system/rndc/ns2/named.conf with 89% similarity]
bin/tests/system/rndc/ns3/named.conf.in [moved from bin/tests/system/rndc/ns3/named.conf with 90% similarity]
bin/tests/system/rndc/ns4/named.conf
bin/tests/system/rndc/setup.sh
bin/tests/system/rndc/tests.sh
bin/tests/system/rpz/clean.sh
bin/tests/system/rpz/ns1/named.conf.in [moved from bin/tests/system/rpz/ns1/named.conf with 95% similarity]
bin/tests/system/rpz/ns2/named.conf.in [moved from bin/tests/system/rpz/ns2/named.conf with 93% similarity]
bin/tests/system/rpz/ns3/named.conf.in [moved from bin/tests/system/rpz/ns3/named.conf with 97% similarity]
bin/tests/system/rpz/ns4/named.conf.in [moved from bin/tests/system/rpz/ns4/named.conf with 96% similarity]
bin/tests/system/rpz/ns5/named.conf.in [moved from bin/tests/system/rpz/ns5/named.conf with 94% similarity]
bin/tests/system/rpz/ns6/named.conf.in [moved from bin/tests/system/rpz/ns6/named.conf with 93% similarity]
bin/tests/system/rpz/setup.sh
bin/tests/system/rpz/test1
bin/tests/system/rpz/test2
bin/tests/system/rpz/test3
bin/tests/system/rpz/test4
bin/tests/system/rpz/test4a
bin/tests/system/rpz/test5
bin/tests/system/rpz/tests.sh
bin/tests/system/rrl/clean.sh
bin/tests/system/rrl/ns1/named.conf.in [moved from bin/tests/system/rrl/ns1/named.conf with 96% similarity]
bin/tests/system/rrl/ns2/named.conf.in [moved from bin/tests/system/rrl/ns2/named.conf with 94% similarity]
bin/tests/system/rrl/ns3/named.conf.in [moved from bin/tests/system/rrl/ns3/named.conf with 97% similarity]
bin/tests/system/rrl/prereq.sh
bin/tests/system/rrl/setup.sh
bin/tests/system/rrl/tests.sh
bin/tests/system/rrsetorder/clean.sh
bin/tests/system/rrsetorder/ns1/named.conf.in [moved from bin/tests/system/rrsetorder/ns1/named.conf with 92% similarity]
bin/tests/system/rrsetorder/ns2/named.conf.in [moved from bin/tests/system/rrsetorder/ns2/named.conf with 92% similarity]
bin/tests/system/rrsetorder/ns3/named.conf.in [moved from bin/tests/system/rrsetorder/ns3/named.conf with 92% similarity]
bin/tests/system/rrsetorder/ns4/named.conf.in [moved from bin/tests/system/rrsetorder/ns4/named.conf with 92% similarity]
bin/tests/system/rrsetorder/setup.sh [new file with mode: 0644]
bin/tests/system/rrsetorder/tests.sh
bin/tests/system/rsabigexponent/clean.sh
bin/tests/system/rsabigexponent/ns1/named.conf.in [moved from bin/tests/system/rsabigexponent/ns1/named.conf with 95% similarity]
bin/tests/system/rsabigexponent/ns2/named.conf.in [moved from bin/tests/system/rsabigexponent/ns2/named.conf with 95% similarity]
bin/tests/system/rsabigexponent/ns3/named.conf.in [moved from bin/tests/system/rsabigexponent/ns3/named.conf with 95% similarity]
bin/tests/system/rsabigexponent/prereq.sh
bin/tests/system/rsabigexponent/setup.sh
bin/tests/system/rsabigexponent/tests.sh
bin/tests/system/run.sh
bin/tests/system/runtime/clean.sh
bin/tests/system/runtime/ns2/named-alt1.conf.in [moved from bin/tests/system/runtime/ns2/named-alt1.conf with 96% similarity]
bin/tests/system/runtime/ns2/named-alt2.conf.in [moved from bin/tests/system/runtime/ns2/named-alt2.conf with 96% similarity]
bin/tests/system/runtime/ns2/named-alt3.conf.in [moved from bin/tests/system/runtime/ns2/named-alt3.conf with 96% similarity]
bin/tests/system/runtime/ns2/named-alt4.conf.in [moved from bin/tests/system/runtime/ns2/named-alt4.conf with 98% similarity]
bin/tests/system/runtime/ns2/named-alt5.conf.in [moved from bin/tests/system/runtime/ns2/named-alt5.conf with 98% similarity]
bin/tests/system/runtime/ns2/named-alt6.conf.in [moved from bin/tests/system/runtime/ns2/named-alt6.conf with 98% similarity]
bin/tests/system/runtime/ns2/named1.conf.in [moved from bin/tests/system/runtime/ns2/named1.conf with 91% similarity]
bin/tests/system/runtime/setup.sh
bin/tests/system/runtime/tests.sh
bin/tests/system/smartsign/tests.sh
bin/tests/system/sortlist/clean.sh
bin/tests/system/sortlist/ns1/named.conf.in [moved from bin/tests/system/sortlist/ns1/named.conf with 93% similarity]
bin/tests/system/sortlist/setup.sh [new file with mode: 0644]
bin/tests/system/sortlist/tests.sh
bin/tests/system/spf/clean.sh
bin/tests/system/spf/ns1/named.conf.in [moved from bin/tests/system/spf/ns1/named.conf with 96% similarity]
bin/tests/system/spf/setup.sh [new file with mode: 0644]
bin/tests/system/spf/tests.sh
bin/tests/system/staticstub/clean.sh
bin/tests/system/staticstub/ns1/named.conf.in [moved from bin/tests/system/staticstub/ns1/named.conf with 90% similarity]
bin/tests/system/staticstub/ns2/named.conf.in
bin/tests/system/staticstub/ns3/named.conf.in
bin/tests/system/staticstub/ns4/named.conf [deleted file]
bin/tests/system/staticstub/ns4/named.conf.in [new file with mode: 0644]
bin/tests/system/staticstub/setup.sh
bin/tests/system/staticstub/tests.sh
bin/tests/system/statistics/clean.sh [deleted file]
bin/tests/system/statistics/ns1/named.conf [deleted file]
bin/tests/system/statistics/ns1/zone.db [deleted file]
bin/tests/system/statistics/tests.sh [deleted file]
bin/tests/system/stub/clean.sh
bin/tests/system/stub/ns1/named.conf.in [moved from bin/tests/system/notify/ns1/named.conf with 91% similarity]
bin/tests/system/stub/ns2/named.conf.in [moved from bin/tests/system/stub/ns2/named.conf with 92% similarity]
bin/tests/system/stub/ns3/named.conf.in [moved from bin/tests/system/stub/ns3/named.conf with 92% similarity]
bin/tests/system/stub/setup.sh [new file with mode: 0644]
bin/tests/system/stub/tests.sh
bin/tests/system/tsig/clean.sh
bin/tests/system/tsig/ns1/named.conf.in [moved from bin/tests/system/tsig/ns1/named.conf with 95% similarity]
bin/tests/system/tsig/setup.sh
bin/tests/system/tsig/tests.sh
bin/tests/system/tsiggss/authsock.pl
bin/tests/system/tsiggss/clean.sh
bin/tests/system/tsiggss/ns1/named.conf.in [moved from bin/tests/system/tsiggss/ns1/named.conf with 91% similarity]
bin/tests/system/tsiggss/prereq.sh
bin/tests/system/tsiggss/setup.sh
bin/tests/system/tsiggss/tests.sh
bin/tests/system/unknown/clean.sh
bin/tests/system/unknown/ns1/named.conf.in [moved from bin/tests/system/unknown/ns1/named.conf with 94% similarity]
bin/tests/system/unknown/ns2/named.conf.in [moved from bin/tests/system/unknown/ns2/named.conf with 91% similarity]
bin/tests/system/unknown/ns3/named.conf.in [moved from bin/tests/system/unknown/ns3/named.conf with 91% similarity]
bin/tests/system/unknown/setup.sh
bin/tests/system/unknown/tests.sh
bin/tests/system/upforwd/ans4/ans.pl
bin/tests/system/upforwd/clean.sh
bin/tests/system/upforwd/ns1/named.conf.in [moved from bin/tests/system/upforwd/ns1/named.conf with 93% similarity]
bin/tests/system/upforwd/ns2/named.conf.in [moved from bin/tests/system/upforwd/ns2/named.conf with 92% similarity]
bin/tests/system/upforwd/ns3/named.conf.in [moved from bin/tests/system/upforwd/ns3/named.conf with 93% similarity]
bin/tests/system/upforwd/prereq.sh
bin/tests/system/upforwd/setup.sh
bin/tests/system/upforwd/tests.sh
bin/tests/system/verify/tests.sh
bin/tests/system/verify/zones/genzones.sh
bin/tests/system/views/clean.sh
bin/tests/system/views/ns1/named.conf.in [moved from bin/tests/system/stub/ns1/named.conf with 91% similarity]
bin/tests/system/views/ns2/named1.conf.in [moved from bin/tests/system/views/ns2/named1.conf with 87% similarity]
bin/tests/system/views/ns2/named2.conf.in [moved from bin/tests/system/views/ns2/named2.conf with 91% similarity]
bin/tests/system/views/ns3/named1.conf.in [moved from bin/tests/system/views/ns3/named1.conf with 88% similarity]
bin/tests/system/views/ns3/named2.conf.in [moved from bin/tests/system/views/ns3/named2.conf with 88% similarity]
bin/tests/system/views/setup.sh
bin/tests/system/views/tests.sh
bin/tests/system/wildcard/clean.sh
bin/tests/system/wildcard/ns1/named.conf.in [moved from bin/tests/system/wildcard/ns1/named.conf with 93% similarity]
bin/tests/system/wildcard/ns1/sign.sh
bin/tests/system/wildcard/ns2/named.conf.in [moved from bin/tests/system/wildcard/ns2/named.conf with 90% similarity]
bin/tests/system/wildcard/ns3/named.conf.in [moved from bin/tests/system/wildcard/ns3/named.conf with 91% similarity]
bin/tests/system/wildcard/ns4/named.conf.in [moved from bin/tests/system/wildcard/ns4/named.conf with 91% similarity]
bin/tests/system/wildcard/ns5/named.conf.in [moved from bin/tests/system/wildcard/ns5/named.conf with 91% similarity]
bin/tests/system/wildcard/setup.sh
bin/tests/system/wildcard/tests.sh
bin/tests/system/xfer/clean.sh
bin/tests/system/xfer/ns1/named.conf.in [moved from bin/tests/system/xfer/ns1/named.conf with 91% similarity]
bin/tests/system/xfer/ns2/named.conf.in [moved from bin/tests/system/xfer/ns2/named.conf with 90% similarity]
bin/tests/system/xfer/ns3/named.conf.in [moved from bin/tests/system/xfer/ns3/named.conf with 90% similarity]
bin/tests/system/xfer/ns4/named.conf.base
bin/tests/system/xfer/ns6/named.conf.in [moved from bin/tests/system/xfer/ns6/named.conf with 91% similarity]
bin/tests/system/xfer/ns7/named.conf.in [moved from bin/tests/system/xfer/ns7/named.conf with 90% similarity]
bin/tests/system/xfer/prereq.sh
bin/tests/system/xfer/setup.sh
bin/tests/system/xfer/tests.sh
bin/tests/system/xferquota/clean.sh
bin/tests/system/xferquota/ns1/named.conf.in [moved from bin/tests/system/xferquota/ns1/named.conf with 92% similarity]
bin/tests/system/xferquota/ns2/named.conf.in [moved from bin/tests/system/xferquota/ns2/named.conf with 92% similarity]
bin/tests/system/xferquota/setup.sh
bin/tests/system/xferquota/tests.sh
bin/tests/system/zero/ans5/ans.pl
bin/tests/system/zero/clean.sh
bin/tests/system/zero/ns1/named.conf.in [moved from bin/tests/system/zero/ns1/named.conf with 91% similarity]
bin/tests/system/zero/ns2/named.conf.in [moved from bin/tests/system/zero/ns2/named.conf with 91% similarity]
bin/tests/system/zero/ns3/named.conf.in [moved from bin/tests/system/zero/ns3/named.conf with 91% similarity]
bin/tests/system/zero/ns4/named.conf.in [moved from bin/tests/system/zero/ns4/named.conf with 91% similarity]
bin/tests/system/zero/setup.sh
bin/tests/system/zero/tests.sh
bin/tests/system/zonechecks/clean.sh
bin/tests/system/zonechecks/ns1/named.conf.in [moved from bin/tests/system/zonechecks/ns1/named.conf with 93% similarity]
bin/tests/system/zonechecks/setup.sh
bin/tests/system/zonechecks/tests.sh
configure
configure.in
contrib/dlz/config.dlz.in

index 5b167b8ec65bf6d7aed823abc3d35ae7222733a4..7a9a8cd04495e14efe853901264eca65b5b00615 100644 (file)
@@ -50,10 +50,61 @@ feature-test@EXEEXT@: feature-test.@O@
 # Running the scripts below is bypassed when a separate
 # build directory is used.
 
-check: test
+# Define the tests that can be run in parallel.  This should be identical to
+# the definition of PARALLELDIRS in conf.sh.
+
+PARALLEL = acl additional addzone allow_query autosign \
+          builtin cacheclean chain \
+          checkconf checknames checkzone \
+          @CHECKDS@ @COVERAGE@ \
+          cookie database digdelv dlv dlz dlzexternal \
+          dns64 dnssec dscp dsdigest \
+          ednscompliance emptyzones \
+          fetchlimit filter-aaaa formerr forward \
+          geoip glue inline integrity ixfr \
+          legacy limits logfileconfig \
+          masterfile masterformat metadata \
+          notify nslookup nsupdate \
+          pending \
+          reclimit redirect resolver rndc rpz rpzrecurse \
+          rrchecker rrl rrsetorder rsabigexponent runtime \
+          smartsign sortlist \
+          spf staticstub statistics statschannel stub \
+          tcp tsig tsiggss \
+          unknown upforwd verify views wildcard \
+          xfer xferquota zero zonechecks
+
+# Produce intermediate makefile that assigns unique port numbers to each
+# parallel test.  The start port number of 5,000 is arbitrary - it must just
+# be greater than the highest privileged port, 1024.
+#
+# Test names need to be sanitized because Solaris make does not like
+# underscores in target names and requires explicit differentiation
+# between a target name and a directory name (.PHONY is not supported).
+
+.PHONY: parallel.mk
+
+parallel.mk:
+       PARALLEL_SANITIZED=`echo $(PARALLEL) | sed "s|\([^ ][^ ]*\)|test-\1|g;" | tr _ -` ; \
+       echo ".PHONY: $$PARALLEL_SANITIZED" > $@ ; \
+       echo "" >> $@ ; \
+       echo "test check: $$PARALLEL_SANITIZED" >> $@ ; \
+       port=$${STARTPORT:-5000} ; \
+       for directory in $(PARALLEL) ; do \
+               echo "" >> $@ ; \
+               echo "test-`echo $$directory | tr _ -`:" >> $@ ; \
+               echo "  @$(SHELL) ./run.sh $$NOCLEAN -r -p $$port $$directory 2>&1 | tee $$directory/test.output" >> $@ ; \
+               port=`expr $$port + 100` ; \
+       done
+
+# Targets to run the tests.
+
+test: parallel.mk subdirs
+       @$(MAKE) -f parallel.mk check
+       @$(SHELL) ./runsequential.sh $$NOCLEAN -r
+       @$(SHELL) ./testsummary.sh
 
-test: subdirs
-       if test -f ./runall.sh; then sh ./runall.sh; fi
+check: test
 
 testclean clean distclean::
        if test -f ./cleanall.sh; then sh ./cleanall.sh; fi
index 69a3937ac88d9d57df5f8cfa05256a9205243721..b383866cbdad0f9ba5bd00fc0817bb3737ca391f 100644 (file)
@@ -5,63 +5,762 @@ See COPYRIGHT in the source root or http://isc.org/copyright.html for terms.
 This is a simple test environment for running bind9 system tests
 involving multiple name servers.
 
-There are multiple test suites, each in a separate subdirectory and
-involving a different DNS setup.  They are:
-
-  dnssec/      DNSSEC tests
-  forward/     Forwarding tests
-  glue/                Glue handling tests
-  limits/      Tests of handling of large data (close to server limits)
-  lwresd/      Tests of the lightweight resolver library and daemon
-  notify/      More NOTIFY tests
-  nsupdate/    Dynamic update and IXFR tests
-  resolver/     Regression tests for resolver bugs that have been fixed
-               (not a complete resolver test suite)
-  rrl/         query rate limiting
-  rpz/         Tests of response policy zone (RPZ) rewriting
-  stub/                Tests of stub zone functionality
-  unknown/     Unknown type and class tests
-  upforwd/     Update forwarding tests
-  views/       Tests of the "views" statement
-  xfer/                Zone transfer tests
-  xferquota/   Zone transfer quota tests
-
-Typically each test suite sets up 2-5 name servers and then performs
-one or more tests against them.  Within the test suite subdirectory,
-each name server has a separate subdirectory containing its
-configuration data.  By convention, these subdirectories are named
-"ns1", "ns2", etc.
-
-The tests are completely self-contained and do not require access to
-the real DNS.  Generally, one of the test servers (ns1) is set up as a
-root name server and is listed in the hints file of the others.
-
-To enable all servers to run on the same machine, they bind to
-separate virtual IP address on the loopback interface.  ns1 runs on
-10.53.0.1, ns2 on 10.53.0.2, etc.  Before running any tests, you must
-set up these addresses by running "ifconfig.sh up" as root.
-
-Mac OS X:
-If you wish to make the interfaces survive across reboots
-copy org.isc.bind.system and org.isc.bind.system to
-/Library/LaunchDaemons then run
-"launchctl load /Library/LaunchDaemons/org.isc.bind.system.plist" as
-root.
-
-The servers use port 5300 instead of the usual port 53, so they can be
-run without root privileges once the interfaces have been set up.
-
-The tests can be run individually like this:
-
-  sh run.sh xfer
-  sh run.sh notify
-  etc.
-
-To run all the tests, just type "make test".
-
-When running system tests, named and lwresd can be run under
-Valgrind. The output from Valgrind are sent to per-process files that
-can be reviewed after the test has completed. To enable this, set the
-USE_VALGRIND environment variable to "helgrind" to run the Helgrind
-tool, or any other value to run the Memcheck tool. To use "helgrind"
-effectively, build BIND with --disable-atomic.
+With the exception of "common" (which holds configuration information common to
+multiple tests) and "win32" (which holds files needed to run the tests in a
+Windows environment), each directory holds a set of scripts and configuration
+files to test different parts of BIND.  The directories are named for the
+aspect of BIND they test, for example:
+
+  dnssec/       DNSSEC tests
+  forward/      Forwarding tests
+  glue/         Glue handling tests
+
+etc.
+
+Typically each set of tests sets up 2-5 name servers and then performs one or
+more tests against them.  Within the test subdirectory, each name server has a
+separate subdirectory containing its configuration data.  These subdirectories
+are named "nsN" or "ansN" (where N is a number between 1 and 8, e.g. ns1, ans2
+etc.)
+
+The tests are completely self-contained and do not require access to the real
+DNS.  Generally, one of the test servers (usually ns1) is set up as a root
+nameserver and is listed in the hints file of the others.
+
+
+Preparing to Run the Tests
+===
+To enable all servers to run on the same machine, they bind to separate virtual
+IP addresses on the loopback interface.  ns1 runs on 10.53.0.1, ns2 on
+10.53.0.2, etc.  Before running any tests, you must set up these addresses by
+running the command
+
+    sh ifconfig.sh up
+
+as root.  The interfaces can be removed by executing the command:
+
+    sh ifconfig.sh down
+
+... also as root.
+
+The servers use unprivileged ports (above 1024) instead of the usual port 53,
+so they can be run without root privileges once the interfaces have been set
+up.
+
+
+Note for MacOS Users
+---
+If you wish to make the interfaces survive across reboots, copy
+org.isc.bind.system and org.isc.bind.system.plist to /Library/LaunchDaemons
+then run
+
+    launchctl load /Library/LaunchDaemons/org.isc.bind.system.plist
+
+... as root.
+
+
+Running the System Tests
+===
+
+Running an Individual Test
+---
+The tests can be run individually using the following command:
+
+    sh run.sh [flags] <test-name> [<test-arguments>]
+
+e.g.
+
+    sh run.sh [flags] notify
+
+Optional flags are:
+
+    -k              Keep servers running after the test completes.  Each test
+                    usually starts a number of nameservers, either instances
+                    of the "named" being tested, or custom servers (written in
+                    Python or Perl) that feature test-specific behavior.  The
+                    servers are automatically started before the test is run
+                    and stopped after it ends.  This flag leaves them running
+                    at the end of the test, so that additional queries can be
+                    sent by hand.  To stop the servers afterwards, use the
+                    command "sh stop.sh <test-name>".
+
+    -n              Noclean - do not remove the output files if the test
+                    completes successfully.  By default, files created by the
+                    test are deleted if it passes;  they are not deleted if the
+                    test fails.
+
+    -p <number>     Sets the range of ports used by the test.  A block of 100
+                    ports is available for each test, the number given to the
+                    "-p" switch being the number of the start of that block
+                    (e.g. "-p 7900" will mean that the test is able to use
+                    ports 7900 through 7999).  If not specified, the test will
+                    have ports 5000 to 5099 available to it.
+
+    -r              The "runall" flag.  This is related to cleaning up after
+                    the tests (see "Maintenance Notes" below).  If specified,
+                    it prevents a copy of the test's output listing from being
+                    deleted when the directory is cleaned up after the test
+                    completes.  (The test's output listing comprises messages
+                    produced by the test during its execution; it does not
+                    include the output files produced by utilities such as
+                    "dig" or "rndc", nor any logging output from named itself.)
+                    It is usually only used when "run.sh" is being called
+                    during a run of the entire test suite.  Note that if "-n"
+                    is specified on the "run.sh" command line, the test output
+                    is retained even if this option is omitted.
+
+Arguments are:
+
+    test-name       Mandatory.  The name of the test, which is the name of the
+                    subdirectory in bin/tests/system holding the test files.
+
+    test-arguments  Optional arguments that are passed to each of the test's
+                    scripts.
+
+
+Running All The System Tests
+---
+To run all the system tests, enter the command:
+
+    sh runall.sh [-n] [numproc]
+
+The optional flag "-n" has the same effect as it does for "run.sh" - it causes
+the retention of all output files from all tests.
+
+The optional "numproc" argument specifies the maximum number of tests that can
+run in parallel.  The default is 1, which means that all of the tests run
+sequentially.  If greater than 1, up to "numproc" tests will run simultaneously,
+new tests being started as tests finish.  Each test will get a unique set of
+ports, so there is no danger of tests interfering with one another.  Parallel
+running will reduce the total time taken to run the BIND system tests, but will
+mean that the output from all the tests sent to the screen will be mixed up
+with one another.  However, the systests.output file produced at the end of the
+run (in the bin/tests/system directory) will contain the output from each test
+in sequential order.
+
+Note that it is not possible to pass arguments to tests though the "runall.sh"
+script.
+
+A run of all the system tests can also be initiated via make:
+
+    make [-j numproc] test
+
+In this case, retention of the output files after a test completes successfully
+is specified by setting the environment variable NOCLEAN to "-n" prior to
+running make, e.g.
+
+    NOCLEAN=-n make [-j numproc] test
+
+
+
+Running Multiple System Test Suites Simultaneously
+---
+In some cases it may be desirable to have multiple instances of the system test
+suite running simultaneously (e.g. from different terminal windows).  To do
+this:
+
+1. Each installation must have its own directory tree.  The system tests create
+files in the test directories, so separate directory trees are required to
+avoid interference between the same test running in the different
+installations.
+
+2. For one of the test suites, the starting port number must be specified by
+setting the environment variable STARTPORT before starting the test suite.
+Each test suite comprises about 100 tests, each being allocated a set of 100
+ports.  The port ranges for each test are allocated sequentially, so each test
+suite requires about 10,000 ports to itself.  By default, the port allocation
+starts at 5,000.  So the following set of commands:
+
+    Terminal Window 1:
+        cd <installation-1>/bin/tests/system
+        sh runall.sh 4
+
+    Terminal Window 2:
+        cd <installation-2>/bin/tests/system
+        STARTPORT=20000 sh runall.sh 4
+
+... will start the test suite for installation-1 using the default base port
+of 5,000, so the test suite will use ports 5,000 through 15,000 (or there
+abouts).  The use of "STARTPORT=20000" to prefix the run of the test suite for
+installation-2 will mean the test suite uses ports 20,000 through 30,000 or so.
+
+
+Format of Test Output
+---
+All output from the system tests is in the form of lines with the following
+structure:
+
+    <letter>:<test-name>:<message> [(<number>)]
+
+e.g.
+
+    I:catz:checking that dom1.example is not served by master (1)
+
+The meanings of the fields are as follows:
+
+<letter>
+This indicates the type of message.  This is one of:
+
+    S   Start of the test
+    A   Start of test (retained for backwards compatibility)
+    T   Start of test (retained for backwards compatibility)
+    E   End of the test
+    I   Information.  A test will typically output many of these messages
+        during its run, indicating test progress.  Note that such a message may
+        be of the form "I:testname:failed", indicating that a sub-test has
+        failed.
+    R   Result.  Each test will result in one such message, which is of the
+        form:
+
+                R:<test-name>:<result>
+
+        where <result> is one of:
+
+            PASS        The test passed
+            FAIL        The test failed
+            SKIPPED     The test was not run, usually because some
+                        prerequisites required to run the test are missing.
+            UNTESTED    The test was not run for some other reason, e.g. a
+                        prerequisite is available but is not compatible with
+                        the platform on which the test is run.
+
+<test-name>
+This is the name of the test from which the message emanated, which is also the
+name of the subdirectory holding the test files.
+
+<message>
+This is text output by the test during its execution.
+
+(<number>)
+If present, this will correlate with a file created by the test.  The tests
+execute commands and route the output of each command to a file.  The name of
+this file depends on the command and the test, but will usually be of the form:
+
+    <command>.out.<suffix><number>
+
+e.g. nsupdate.out.test28, dig.out.q3.  This aids diagnosis of problems by
+allowing the output that caused the problem message to be identified.
+
+
+Re-Running the Tests
+---
+If there is a requirement to re-run a test (or the entire test suite), the
+files produced by the tests should be deleted first.  Normally, these files are
+deleted if the test succeeds but are retained on error.
+
+Deletion of files produced by an individual test can be done with the command:
+
+    sh clean.sh [-r] <test-name>
+
+The optional flag is:
+
+    -r              The "runall" flag.  This is related to cleaning up after
+                    the tests (see "Maintenance Notes" below).  If specified,
+                    it prevents a copy of the test's output listing from being
+                    deleted when the directory is cleaned after the test
+                    completes.
+
+Deletion of the files produced by the set of tests (e.g. after the execution
+of "runall.sh") can be deleted by the command:
+
+    sh cleanall.sh
+
+or
+
+    make testclean
+
+(Note that the Makefile has two other targets for cleaning up files: "clean"
+will delete all the files produced by the tests, as well as the object and
+executable files used by the tests.  "distclean" does all the work of "clean"
+as well as deleting configuration files produced by "configure".)
+
+
+Developer Notes
+===
+This section is intended for developers writing new tests.
+
+
+Overview
+---
+As noted above, each test is in a separate directory.  To interact with the
+test framework, the directories contain the following standard files:
+
+prereq.sh   Run at the beginning to determine whether the test can be run at
+            all; if not, we see a result of R:SKIPPED or R:UNTESTED.  This file
+            is optional: if not present, the test is assumed to have all its
+            prerequisites met.
+
+setup.sh    Run after prereq.sh, this sets up the preconditions for the tests.
+            Although optional, virtually all tests will require such a file to
+            set up the ports they should use for the test.
+
+tests.sh    Runs the actual tests.  This file is mandatory.
+
+clean.sh    Run at the end to clean up temporary files, but only if the test
+            was completed successfully and its running was not inhibited by the
+           "-n" switch being passed to "run.sh".  Otherwise the temporary
+           files are left in place for inspection.
+
+ns<N>       These subdirectories contain test name servers that can be queried
+           or can interact with each other.  The value of N indicates the
+           address the server listens on: for example, ns2 listens on
+           10.53.0.2, and ns4 on 10.53.0.4.  All test servers use an
+           unprivileged port, so they don't need to run as root.  These
+           servers log at the highest debug level and the log is captured in
+           the file "named.run".
+
+ans<N>      Like ns[X], but these are simple mock name servers implemented in
+            Perl or Python.  They are generally programmed to misbehave in ways
+            named would not so as to exercise named's ability to interoperate
+            with badly behaved name servers.
+
+
+Port Usage
+---
+In order for the tests to run in parallel, each test requires a unique set of
+ports.  These are specified by the "-p" option passed to "run.sh", which sets
+environment variables that the scripts listed above can reference.
+
+The convention used in the system tests is that the number passed is the start
+of a range of 100 ports.  The test is free to use the ports as required,
+although the first ten ports in the block are named and generally tests use the
+named ports for their intended purpose.  The names of the environment variables
+are:
+
+    PORT                     Number to be used for the query port.
+    CONTROLPORT              Number to be used as the RNDC control port.
+    EXTRAPORT1 - EXTRAPORT8  Eight port numbers that can be used as needed.
+
+Two other environment variables are defined:
+
+    LOWPORT                  The lowest port number in the range.
+    HIGHPORT                 The highest port number in the range.
+
+Since port ranges usually start on a boundary of 10, the variables are set such
+that the last digit of the port number corresponds to the number of the
+EXTRAPORTn variable.  For example, if the port range were to start at 5200, the
+port assignments would be:
+
+    PORT = 5200
+    EXTRAPORT1 = 5201
+        :
+    EXTRAPORT8 = 5208
+    CONTROLPORT = 5209
+    LOWPORT = 5200
+    HIGHPORT = 5299
+
+When running tests in parallel (i.e. giving a value of "numproc" greater than 1
+in the "make" or "runall.sh" commands listed above), it is guaranteed that each
+test will get a set of unique port numbers.
+
+
+Writing a Test
+---
+The test framework requires up to four shell scripts (listed above) as well as
+a number of nameserver instances to run.  Certain expectations are put on each
+script:
+
+
+General
+---
+1. Each of the four scripts will be invoked with the command
+
+    (cd <test-directory> ; sh <script> [<arguments>] )
+
+... so that working directory when the script starts executing is the test
+directory.
+
+2. Arguments can be only passed to the script if the test is being run as a
+one-off with "run.sh".  In this case, everything on the command line after the
+name of the test is passed to each script.  For example, the command:
+
+    sh run.sh -p 12300 mytest -D xyz
+
+... will run "mytest" with a port range of 12300 to 12399.  Each of the
+framework scripts provided by the test will be invoked using the remaining
+arguments, e.g.:
+
+   (cd mytest ; sh prereq.sh -D xyz)
+   (cd mytest ; sh setup.sh -D xyz)
+   (cd mytest ; sh tests.sh -D xyz)
+   (cd mytest ; sh clean.sh -D xyz)
+
+No arguments will be passed to the test scripts if the test is run as part of
+a run of the full test suite (e.g. the tests are started with "runall.sh").
+
+3.  Each script should start with the following lines:
+
+    SYSTEMTESTTOP=..
+    . $SYSTEMTESTTOP/conf.sh
+
+"conf.sh" defines a series of environment variables together with functions
+useful for the test scripts. (conf.sh.win32 is the Windows equivalent of this
+file.)
+
+
+prereq.sh
+---
+As noted above, this is optional.  If present, it should check whether specific
+software needed to run the test is available and/or whether BIND has been
+configured with the appropriate options required.
+
+    * If the software required to run the test is present and the BIND
+      configure options are correct, prereq.sh should return with a status code
+      of 0.
+
+    * If the software required to run the test is not available and/or BIND
+      has not been configured with the appropriate options, prereq.sh should
+      return with a status code of 1.
+
+    * If there is some other problem (e.g. prerequisite software is available
+      but is not properly configured), a status code of 255 should be returned.
+
+
+setup.sh
+---
+This is responsible for setting up the configuration files used in the test.
+
+To cope with the varying port number, ports are not hard-coded into
+configuration files (or, for that matter, scripts that emulate nameservers).
+Instead, setup.sh is responsible for editing the configuration files to set the
+port numbers.
+
+To do this, configuration files should be supplied in the form of templates
+containing tokens identifying ports.  The tokens have the same name as the
+environment variables listed above, but are prefixed and suffixed by the "@"
+symbol.  For example, a fragment of a configuration file template might look
+like:
+
+    controls {
+        inet 10.53.0.1 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
+    };
+
+    options {
+        query-source address 10.53.0.1;
+        notify-source 10.53.0.1;
+        transfer-source 10.53.0.1;
+        port @PORT@;
+        allow-new-zones yes;
+    };
+
+setup.sh should copy the template to the desired filename using the
+"copy_setports" shell function defined in "conf.sh", i.e.
+
+    copy_setports ns1/named.conf.in ns1/named.conf
+
+This replaces the tokens @PORT@, @CONTROLPORT@, @EXTRAPORT1@ through
+@EXTRAPORT8@ with the contents of the environment variables listed above.
+setup.sh should do this for all configuration files required when the test
+starts.
+
+("setup.sh" should also use this method for replacing the tokens in any Perl or
+Python name servers used in the test.)
+
+
+tests.sh
+---
+This is the main test file and the contents depend on the test.  The contents
+are completely up to the developer, although most test scripts have a form
+similar to the following for each sub-test:
+
+    1. n=`expr $n + 1`
+    2. echo_i "prime cache nodata.example ($n)"
+    3. ret=0
+    4. $DIG -p ${PORT} @10.53.0.1 nodata.example TXT > dig.out.test$n
+    5. grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
+    6. grep "ANSWER: 0," dig.out.test$n > /dev/null || ret=1
+    7. if [ $ret != 0 ]; then echo_i "failed"; fi
+    8. status=`expr $status + $ret`
+
+1.  Increment the test number "n" (initialized to zero at the start of the
+    script).
+
+2.  Indicate that the sub-test is about to begin.  Note that "echo_i" instead
+    of "echo" is used.  echo_i is a function defined in "conf.sh" which will
+    prefix the message with "I:<testname>:", so allowing the output from each
+    test to be identified within the output.  The test number is included in
+    the message in order to tie the sub-test with its output.
+
+3. Initialize return status.
+
+4 - 6. Carry out the sub-test.  In this case, a nameserver is queried (note
+    that the port used is given by the PORT environment variable, which was set
+    by the inclusion of the file "conf.sh" at the start of the script).  The
+    output is routed to a file whose suffix includes the test number.  The
+    response from the server is examined and, in this case, if the required
+    string is not found, an error is indicated by setting "ret" to 1.
+
+7.  If the sub-test failed, a message is printed. "echo_i" is used to print
+    the message to add the prefix "I:<test-name>:" before it is output.
+
+8.  "status", used to track how many of the sub-tests have failed, is
+    incremented accordingly.  The value of "status" determines the status
+    returned by "tests.sh", which in turn determines whether the framework
+    prints the PASS or FAIL message.
+
+Regardless of this, rules that should be followed are:
+
+a.  Use the environment variables set by conf.sh to determine the ports to use
+    for sending and receiving queries.
+
+b.  Use a counter to tag messages and to associate the messages with the output
+    files.
+
+c.  Store all output produced by queries/commands into files.  These files
+    should be named according to the command that produced them, e.g. "dig"
+    output should be stored in a file "dig.out.<suffix>", the suffix being
+    related to the value of the counter.
+
+d.  Use "echo_i" to output informational messages.
+
+e.  Retain a count of test failures and return this as the exit status from
+    the script.
+
+
+clean.sh
+---
+The inverse of "setup.sh", this is invoked by the framework to clean up the
+test directory.  It should delete all files that have been created by the test
+during its run.
+
+
+Starting Nameservers
+---
+As noted earlier, a system test will involve a number of nameservers.  These
+will be either instances of named, or special servers written in a language
+such as Perl or Python.
+
+For the former, the version of "named" being run is that in the "bin/named"
+directory in the tree holding the tests (i.e. if "make test" is being run
+immediately after "make", the version of "named" used is that just built).  The
+configuration files, zone files etc. for these servers are located in
+subdirectories of the test directory named "nsN", where N is a small integer.
+The latter are special nameservers, mostly used for generating deliberately bad
+responses, located in subdirectories named "ansN" (again, N is an integer).
+In addition to configuration files, these directories should hold the
+appropriate script files as well.
+
+Note that the "N" for a particular test forms a single number space, e.g. if
+there is an "ns2" directory, there cannot be an "ans2" directory as well.
+Ideally, the directory numbers should start at 1 and work upwards.
+
+When running a test, the servers are started using "start.sh" (which is nothing
+more than a wrapper for start.pl).  The options for "start.pl" are documented
+in the header for that file, so will not be repeated here.  In summary, when
+invoked by "run.sh", start.pl looks for directories named "nsN" or "ansN" in
+the test directory and starts the servers it finds there.
+
+
+"named" Command-Line Options
+---
+By default, start.pl starts a "named" server with the following options:
+
+    -c named.conf   Specifies the configuration file to use (so by implication,
+                    each "nsN" nameserver's configuration file must be called
+                    named.conf).
+
+    -d 99           Sets the maximum debugging level.
+
+    -D <name>       The "-D" option sets a string used to identify the
+                    nameserver in a process listing.  In this case, the string
+                    is the name of the subdirectory.
+
+    -g              Runs the server in the foreground and logs everything to
+                    stderr.
+
+    -m record,size,mctx
+                    Turns on these memory usage debugging flags.
+
+    -U 4            Uses four listeners.
+
+    -X named.lock   Acquires a lock on this file in the "nsN" directory, so
+                    preventing multiple instances of this named running in this
+                    directory (which could possibly interfere with the test).
+
+In addition, start.pl also sets the following undocumented flag:
+
+    -T clienttest   Makes clients single-shot with their own memory context.
+
+All output is sent to a file called "named.run" in the nameserver directory.
+
+The options used to start named can be altered.  There are three ways of doing
+this.  "start.pl" checks the methods in a specific order: if a check succeeds,
+the options are set and any other specification is ignored.  In order, these
+are:
+
+1. Specifying options to "start.sh"/"start.pl" after the name of the test
+directory, e.g.
+
+    sh start.sh reclimit ns1 -- "-c n.conf -d 43"
+
+(This is only really useful when running tests interactively.)
+
+2. Including a file called "named.args" in the "nsN" directory.  If present,
+the contents of the first non-commented, non-blank line of the file are used as
+the named command-line arguments.  The rest of the file is ignored.
+
+3. Tweaking the default command line arguments with "-T" options.  This flag is
+used to alter the behavior of BIND for testing and is not documented in the
+ARM.  The "clienttest" option has already been mentioned, but the presence of
+certain files in the "nsN" directory adds flags to the default command line
+(the content of the files is irrelevant - it is only the presence that counts):
+
+    named.noaa       Appends "-T noaa" to the command line, which causes
+                     "named" to never set the AA bit in an answer.
+
+    named.dropedns   Adds "-T dropedns" to the command line, which causes
+                     "named" to recognise EDNS options in messages, but drop
+                     messages containing them.
+
+    named.maxudp1460 Adds "-T maxudp1460" to the command line, setting the
+                     maximum UDP size handled by named to 1460.
+
+    named.maxudp512  Adds "-T maxudp512" to the command line, setting the
+                     maximum UDP size handled by named to 512.
+
+    named.noedns     Appends "-T noedns" to the command line, which disables
+                     recognition of EDNS options in messages.
+
+    named.notcp      Adds "-T notcp", which disables TCP in "named".
+
+    named.soa        Appends "-T nosoa" to the command line, which disables
+                     the addition of SOA records to negative responses (or to
+                     the additional section if the response is triggered by RPZ
+                     rewriting).
+
+
+Starting Other Nameservers
+---
+In contrast to "named", nameservers written in Perl or Python (whose script
+file should have the name "ans.pl" or "ans.py" respectively) are started with a
+fixed command line.  In essence, the server is given the address and nothing
+else.
+
+(This is not strictly true: Python servers are provided with the number of the
+query port to use.  Altering the port used by Perl servers currently requires
+creating a template file containing the "@PORT@" token, and having "setup.sh"
+substitute the actual port being used before the test starts.)
+
+
+Stopping Nameservers
+---
+As might be expected, the test system stops nameservers with the script
+"stop.sh", which is little more than a wrapper for "stop.pl".  Like "start.pl",
+the options available are listed in the file's header and will not be repeated
+here.
+
+In summary though, the nameservers for a given test, if left running by
+specifying the "-k" flag to "run.sh" when the test is started, can be stopped
+by the command:
+
+    sh stop.sh <test-name> [server]
+
+... where if the server (e.g. "ns1", "ans3") is not specified, all servers
+associated with the test are stopped.
+
+
+Adding a Test to the System Test Suite
+---
+Once a test has been created, the following files should be edited:
+
+* conf.sh.in  The name of the test should be added to the PARALLELDIRS or
+SEQUENTIALDIRS variables as appropriate.  The former is used for tests that
+can run in parallel with other tests, the latter for tests that are unable to
+do so.
+
+* conf.sh.win32 This is the Windows equivalent of conf.sh.in.  The name of the
+test should be added to the PARALLELDIRS or SEQUENTIALDIRS variables as
+appropriate.
+
+* Makefile.in The name of the test should be added to one of the the PARALLEL
+or SEQUENTIAL variables.
+
+(It is likely that a future iteration of the system test suite will remove the
+need to edit multiple files to add a test.)
+
+
+Valgrind
+---
+When running system tests, named can be run under Valgrind.  The output from
+Valgrind are sent to per-process files that can be reviewed after the test has
+completed.  To enable this, set the USE_VALGRIND environment variable to
+"helgrind" to run the Helgrind tool, or any other value to run the Memcheck
+tool.  To use "helgrind" effectively, build BIND with --disable-atomic.
+
+
+Maintenance Notes
+===
+This section is aimed at developers maintaining BIND's system test framework.
+
+Notes on Parallel Execution
+---
+Although execution of an individual test is controlled by "run.sh", which
+executes the above shell scripts (and starts the relevant servers) for each
+test, the running of all tests in the test suite is controlled by the Makefile.
+("runall.sh" does little more than invoke "make" on the Makefile.)
+
+All system tests are capable of being run in parallel.  For this to work, each
+test needs to use a unique set of ports.  To avoid the need to define which
+tests use which ports (and so risk port clashes as further tests are added),
+the ports are assigned when the tests are run.  This is achieved by having the
+"test" target in the Makefile depend on "parallel.mk".  That file is created
+when "make check" is run, and contains a target for each test of the form:
+
+    <test-name>:
+        @$(SHELL) run.sh $$NOCLEAN -r -p <baseport> <test-name>
+
+The <baseport> is unique and the values of <baseport> for each test are
+separated by at least 100 ports.
+
+
+Cleaning Up From Tests
+---
+When a test is run, files are created in the test directory.  These files fall
+into three categories:
+
+1. Files generated by the test itself, e.g. output from "dig" and "rndc".
+
+2. Files produced by named which may not be cleaned up if named exits
+abnormally, e.g. core files, PID files etc.
+
+3. The file "test.output" containing the text written to stdout by the test.
+This is only produced when the test is run as part of the entire test suite
+(e.g. via "runall.sh").
+
+If the test fails, all these files are retained.  But if the test succeeds,
+they are cleaned up at different times:
+
+1. Files generated by the test itself are cleaned up by the test's own
+"clean.sh".  This is called from the system's "clean.sh", which in turn is
+called from "run.sh".
+
+2. Files that may not be cleaned up if named exits abnormally are removed
+by the system's "clean.sh".
+
+3. "test.output" files are deleted when the test suite ends.  At this point,
+the file "testsummary.sh" is called which concatenates all the "test.output"
+files into a single "systest.output" file before deleting them.
+
+A complication arises with the "test.output" file however:
+
+1. "clean.sh" is called by "run.sh" if the test ends successfully.  For
+this reason, "clean.sh" cannot delete "test.output" as, if the test is
+being run as part of a test suite, the file must be retained.
+
+2. If the deletion of "test.output" were to be solely the responsibility of
+"testsummary.sh", should a test suite terminate abnormally, cleaning up a test
+directory with "sh clean.sh <test-directory>" would leave the file present.
+
+3. An additional step could be added to "cleanall.sh" (which calls the
+system's "clean.sh" for each test) to remove the "test.output" file.  However,
+although the file would be deleted should all test directories be cleaned,
+it would still mean that running "clean.sh" on a particular test directory
+could leave the file present.
+
+To get round this, the system's "clean.sh" script takes an optional flag, "-r"
+(the "runall" flag).  When the test suite is run, each invocation of "run.sh"
+is passed the runall flag.  In turn, "run.sh" passes the flag to "clean.sh",
+which causes that script not to delete the "tests.output" file.  In other
+words, when the system's "clean.sh" is invoked standalone on a test directory
+(or as part of a run of "cleanall.sh"), it will delete the "test.output" if it
+is present.  When invoked during a run of the entire test suite, it won't.
index d3794fb5e41c6d5a39b4582992d6be261ccd12d6..3c28f6fbd8dabf9a81462795385e7f38fe930a55 100644 (file)
@@ -19,7 +19,8 @@
 #
 
 rm -f dig.out.*
-rm -f ns2/example.db ns2/tsigzone.db ns2/example.db.jnl ns2/named.conf
+rm -f ns2/example.db ns2/tsigzone.db ns2/example.db.jnl
+rm -f */named.conf
 rm -f */named.memstats
 rm -f */named.run
 rm -f ns*/*.nzf
similarity index 89%
rename from bin/tests/system/acl/ns2/named1.conf
rename to bin/tests/system/acl/ns2/named1.conf.in
index b70d1dd761b1f13d00e81f9bdbe51667fe6790d0..562156f28ca8a889300112b23091b832d170535e 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named1.conf,v 1.2 2008/01/10 01:10:01 marka Exp $ */
+key rndc_key {
+       secret "1234abcd8765";
+       algorithm hmac-sha256;
+};
 
-controls { /* empty */ };
+controls {
+       inet 10.53.0.2 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
+};
 
 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; };
@@ -32,8 +37,6 @@ options {
        check-integrity no;
 };
 
-include "../../common/controls.conf";
-
 key one {
         algorithm hmac-md5;
         secret "1234abcd8765";
similarity index 90%
rename from bin/tests/system/acl/ns2/named2.conf
rename to bin/tests/system/acl/ns2/named2.conf.in
index bcd7e0df19cdccefd4d14f640b9c3820c473f598..5c53f094d4a4c46d94ebcfe1e01c144d3b927eca 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named2.conf,v 1.3 2008/01/21 20:38:54 each Exp $ */
+key rndc_key {
+       secret "1234abcd8765";
+       algorithm hmac-sha256;
+};
 
-controls { /* empty */ };
+controls {
+       inet 10.53.0.2 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
+};
 
 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; };
@@ -32,8 +37,6 @@ options {
        check-integrity no;
 };
 
-include "../../common/controls.conf";
-
 key one {
        algorithm hmac-md5;
        secret "1234abcd8765";
similarity index 90%
rename from bin/tests/system/acl/ns2/named3.conf
rename to bin/tests/system/acl/ns2/named3.conf.in
index ea2cbcb44a15217cdd163a14db9004d198bd7d79..c031abf5d91ca149f30709674d71ebcc1a5a465d 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named3.conf,v 1.2 2008/01/10 01:10:01 marka Exp $ */
+key rndc_key {
+       secret "1234abcd8765";
+       algorithm hmac-sha256;
+};
 
-controls { /* empty */ };
+controls {
+       inet 10.53.0.2 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
+};
 
 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; };
@@ -32,8 +37,6 @@ options {
        check-integrity no;
 };
 
-include "../../common/controls.conf";
-
 key one {
         algorithm hmac-md5;
         secret "1234abcd8765";
similarity index 90%
rename from bin/tests/system/acl/ns2/named4.conf
rename to bin/tests/system/acl/ns2/named4.conf.in
index 99edf7ebe523eed5e627c29e541c136b8d942d77..75159d919afe2ceda539b75c19625c0101317a64 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named4.conf,v 1.2 2008/01/10 01:10:01 marka Exp $ */
+key rndc_key {
+       secret "1234abcd8765";
+       algorithm hmac-sha256;
+};
 
-controls { /* empty */ };
+controls {
+       inet 10.53.0.2 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
+};
 
 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; };
@@ -32,8 +37,6 @@ options {
        check-integrity no;
 };
 
-include "../../common/controls.conf";
-
 key one {
         algorithm hmac-md5;
         secret "1234abcd8765";
similarity index 89%
rename from bin/tests/system/acl/ns2/named5.conf
rename to bin/tests/system/acl/ns2/named5.conf.in
index d2c5278a26f29d2d4797d8c84e58b5079f7846f6..48e3ac7f16a3a331eebfc4508448b6449692413a 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named1.conf,v 1.2 2008/01/10 01:10:01 marka Exp $ */
+key rndc_key {
+       secret "1234abcd8765";
+       algorithm hmac-sha256;
+};
 
-controls { /* empty */ };
+controls {
+       inet 10.53.0.2 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
+};
 
 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; };
@@ -33,8 +38,6 @@ options {
        allow-query-on { 10.53.0.2; };
 };
 
-include "../../common/controls.conf";
-
 key one {
        algorithm hmac-md5;
        secret "1234abcd8765";
similarity index 93%
rename from bin/tests/system/acl/ns3/named.conf
rename to bin/tests/system/acl/ns3/named.conf.in
index 8a0f9188700d44ac40bdff265418d20b579eb3ff..b8e9f2740f31c711b93a7e057dfae8cc47c44252 100644 (file)
@@ -18,7 +18,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; };
@@ -29,7 +29,7 @@ options {
 };
 
 controls {
-       inet 10.53.0.3 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.3 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 key rndc_key {
similarity index 93%
rename from bin/tests/system/acl/ns4/named.conf
rename to bin/tests/system/acl/ns4/named.conf.in
index 432455ad07c7a08137ef6aa4926395826dd10089..722a419323fde48980497c452fedc8f220009738 100644 (file)
@@ -18,7 +18,7 @@ options {
        query-source address 10.53.0.4;
        notify-source 10.53.0.4;
        transfer-source 10.53.0.4;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.4; };
        listen-on-v6 { none; };
@@ -29,7 +29,7 @@ options {
 };
 
 controls {
-       inet 10.53.0.4 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.4 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 key rndc_key {
index 93e5901ca5705ca1fb3f955d2680f42688e3f7bd..6f998fd8d12aa0b175d13a1497204df15fdac2c1 100644 (file)
@@ -17,6 +17,9 @@
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
+$SHELL clean.sh
 $SHELL ../genzone.sh 2 3 >ns2/example.db
 $SHELL ../genzone.sh 2 3 >ns2/tsigzone.db
-cp -f ns2/named1.conf ns2/named.conf
+copy_setports ns2/named1.conf.in ns2/named.conf
+copy_setports ns3/named.conf.in ns3/named.conf
+copy_setports ns4/named.conf.in ns4/named.conf
index 4ce4452dfa5dce37fa9e02ada0aab29845bbf00c..5272c0eaa9f6d1bc3634e5f3971155838e633c20 100644 (file)
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
-DIGOPTS="+tcp +noadd +nosea +nostat +noquest +nocomm +nocmd"
+DIGOPTS="+tcp +noadd +nosea +nostat +noquest +nocomm +nocmd -p ${PORT}"
+RNDCCMD="$RNDC -c $SYSTEMTESTTOP/common/rndc.conf -p ${CONTROLPORT} -s"
 
 status=0
 t=0
 
-echo "I:testing basic ACL processing"
+echo_i "testing basic ACL processing"
 # key "one" should fail
 t=`expr $t + 1`
 $DIG $DIGOPTS tsigzone. \
-       @10.53.0.2 -b 10.53.0.1 axfr -y one:1234abcd8765 -p 5300 > dig.out.${t}
-grep "^;" dig.out.${t} > /dev/null 2>&1 || { echo "I:test $t failed" ; status=1; }
+       @10.53.0.2 -b 10.53.0.1 axfr -y one:1234abcd8765 > dig.out.${t}
+grep "^;" dig.out.${t} > /dev/null 2>&1 || { echo_i "test $t failed" ; status=1; }
 
 
 # any other key should be fine
 t=`expr $t + 1`
 $DIG $DIGOPTS tsigzone. \
-       @10.53.0.2 -b 10.53.0.1 axfr -y two:1234abcd8765 -p 5300 > dig.out.${t}
-grep "^;" dig.out.${t} > /dev/null 2>&1 && { echo "I:test $t failed" ; status=1; }
+       @10.53.0.2 -b 10.53.0.1 axfr -y two:1234abcd8765 > dig.out.${t}
+grep "^;" dig.out.${t} > /dev/null 2>&1 && { echo_i "test $t failed" ; status=1; }
 
-cp -f ns2/named2.conf ns2/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
+copy_setports ns2/named2.conf.in ns2/named.conf
+$RNDCCMD 10.53.0.2 reload 2>&1 | sed 's/^/ns2 /' | cat_i
 sleep 5
 
 # prefix 10/8 should fail
 t=`expr $t + 1`
 $DIG $DIGOPTS tsigzone. \
-       @10.53.0.2 -b 10.53.0.1 axfr -y one:1234abcd8765 -p 5300 > dig.out.${t}
-grep "^;" dig.out.${t} > /dev/null 2>&1 || { echo "I:test $t failed" ; status=1; }
+       @10.53.0.2 -b 10.53.0.1 axfr -y one:1234abcd8765 > dig.out.${t}
+grep "^;" dig.out.${t} > /dev/null 2>&1 || { echo_i "test $t failed" ; status=1; }
 
 # any other address should work, as long as it sends key "one"
 t=`expr $t + 1`
 $DIG $DIGOPTS tsigzone. \
-       @10.53.0.2 -b 127.0.0.1 axfr -y two:1234abcd8765 -p 5300 > dig.out.${t}
-grep "^;" dig.out.${t} > /dev/null 2>&1 || { echo "I:test $t failed" ; status=1; }
+       @10.53.0.2 -b 127.0.0.1 axfr -y two:1234abcd8765 > dig.out.${t}
+grep "^;" dig.out.${t} > /dev/null 2>&1 || { echo_i "test $t failed" ; status=1; }
 
 t=`expr $t + 1`
 $DIG $DIGOPTS tsigzone. \
-       @10.53.0.2 -b 127.0.0.1 axfr -y one:1234abcd8765 -p 5300 > dig.out.${t}
-grep "^;" dig.out.${t} > /dev/null 2>&1 && { echo "I:test $t failed" ; status=1; }
+       @10.53.0.2 -b 127.0.0.1 axfr -y one:1234abcd8765 > dig.out.${t}
+grep "^;" dig.out.${t} > /dev/null 2>&1 && { echo_i "test $t failed" ; status=1; }
 
-echo "I:testing nested ACL processing"
+echo_i "testing nested ACL processing"
 # all combinations of 10.53.0.{1|2} with key {one|two}, should succeed
-cp -f ns2/named3.conf ns2/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
+copy_setports ns2/named3.conf.in ns2/named.conf
+$RNDCCMD 10.53.0.2 reload 2>&1 | sed 's/^/ns2 /' | cat_i
 sleep 5
 
 # should succeed
 t=`expr $t + 1`
 $DIG $DIGOPTS tsigzone. \
-       @10.53.0.2 -b 10.53.0.2 axfr -y two:1234abcd8765 -p 5300 > dig.out.${t}
-grep "^;" dig.out.${t} > /dev/null 2>&1 && { echo "I:test $t failed" ; status=1; }
+       @10.53.0.2 -b 10.53.0.2 axfr -y two:1234abcd8765 > dig.out.${t}
+grep "^;" dig.out.${t} > /dev/null 2>&1 && { echo_i "test $t failed" ; status=1; }
 
 # should succeed
 t=`expr $t + 1`
 $DIG $DIGOPTS tsigzone. \
-       @10.53.0.2 -b 10.53.0.2 axfr -y one:1234abcd8765 -p 5300 > dig.out.${t}
-grep "^;" dig.out.${t} > /dev/null 2>&1 && { echo "I:test $t failed" ; status=1; }
+       @10.53.0.2 -b 10.53.0.2 axfr -y one:1234abcd8765 > dig.out.${t}
+grep "^;" dig.out.${t} > /dev/null 2>&1 && { echo_i "test $t failed" ; status=1; }
 
 # should succeed
 t=`expr $t + 1`
 $DIG $DIGOPTS tsigzone. \
-       @10.53.0.2 -b 10.53.0.1 axfr -y two:1234abcd8765 -p 5300 > dig.out.${t}
-grep "^;" dig.out.${t} > /dev/null 2>&1 && { echo "I:test $t failed" ; status=1; }
+       @10.53.0.2 -b 10.53.0.1 axfr -y two:1234abcd8765 > dig.out.${t}
+grep "^;" dig.out.${t} > /dev/null 2>&1 && { echo_i "test $t failed" ; status=1; }
 
 # should succeed
 t=`expr $t + 1`
 $DIG $DIGOPTS tsigzone. \
-       @10.53.0.2 -b 10.53.0.1 axfr -y two:1234abcd8765 -p 5300 > dig.out.${t}
-grep "^;" dig.out.${t} > /dev/null 2>&1 && { echo "I:test $t failed" ; status=1; }
+       @10.53.0.2 -b 10.53.0.1 axfr -y two:1234abcd8765 > dig.out.${t}
+grep "^;" dig.out.${t} > /dev/null 2>&1 && { echo_i "test $t failed" ; status=1; }
 
 # but only one or the other should fail
 t=`expr $t + 1`
 $DIG $DIGOPTS tsigzone. \
-       @10.53.0.2 -b 127.0.0.1 axfr -y one:1234abcd8765 -p 5300 > dig.out.${t}
-grep "^;" dig.out.${t} > /dev/null 2>&1 || { echo "I:test $t failed" ; status=1; }
+       @10.53.0.2 -b 127.0.0.1 axfr -y one:1234abcd8765 > dig.out.${t}
+grep "^;" dig.out.${t} > /dev/null 2>&1 || { echo_i "test $t failed" ; status=1; }
 
 t=`expr $t + 1`
 $DIG $DIGOPTS tsigzone. \
-       @10.53.0.2 -b 10.53.0.2 axfr -p 5300 > dig.out.${t}
-grep "^;" dig.out.${t} > /dev/null 2>&1 || { echo "I:test $tt failed" ; status=1; }
+       @10.53.0.2 -b 10.53.0.2 axfr > dig.out.${t}
+grep "^;" dig.out.${t} > /dev/null 2>&1 || { echo_i "test $tt failed" ; status=1; }
 
 # and other values? right out
 t=`expr $t + 1`
 $DIG $DIGOPTS tsigzone. \
-       @10.53.0.2 -b 127.0.0.1 axfr -y three:1234abcd8765 -p 5300 > dig.out.${t}
-grep "^;" dig.out.${t} > /dev/null 2>&1 || { echo "I:test $t failed" ; status=1; }
+       @10.53.0.2 -b 127.0.0.1 axfr -y three:1234abcd8765 > dig.out.${t}
+grep "^;" dig.out.${t} > /dev/null 2>&1 || { echo_i "test $t failed" ; status=1; }
 
 # now we only allow 10.53.0.1 *and* key one, or 10.53.0.2 *and* key two
-cp -f ns2/named4.conf ns2/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
+copy_setports ns2/named4.conf.in ns2/named.conf
+$RNDCCMD 10.53.0.2 reload 2>&1 | sed 's/^/ns2 /' | cat_i
 sleep 5
 
 # should succeed
 t=`expr $t + 1`
 $DIG $DIGOPTS tsigzone. \
-       @10.53.0.2 -b 10.53.0.2 axfr -y two:1234abcd8765 -p 5300 > dig.out.${t}
-grep "^;" dig.out.${t} > /dev/null 2>&1 && { echo "I:test $t failed" ; status=1; }
+       @10.53.0.2 -b 10.53.0.2 axfr -y two:1234abcd8765 > dig.out.${t}
+grep "^;" dig.out.${t} > /dev/null 2>&1 && { echo_i "test $t failed" ; status=1; }
 
 # should succeed
 t=`expr $t + 1`
 $DIG $DIGOPTS tsigzone. \
-       @10.53.0.2 -b 10.53.0.1 axfr -y one:1234abcd8765 -p 5300 > dig.out.${t}
-grep "^;" dig.out.${t} > /dev/null 2>&1 && { echo "I:test $t failed" ; status=1; }
+       @10.53.0.2 -b 10.53.0.1 axfr -y one:1234abcd8765 > dig.out.${t}
+grep "^;" dig.out.${t} > /dev/null 2>&1 && { echo_i "test $t failed" ; status=1; }
 
 # should fail
 t=`expr $t + 1`
 $DIG $DIGOPTS tsigzone. \
-       @10.53.0.2 -b 10.53.0.2 axfr -y one:1234abcd8765 -p 5300 > dig.out.${t}
-grep "^;" dig.out.${t} > /dev/null 2>&1 || { echo "I:test $t failed" ; status=1; }
+       @10.53.0.2 -b 10.53.0.2 axfr -y one:1234abcd8765 > dig.out.${t}
+grep "^;" dig.out.${t} > /dev/null 2>&1 || { echo_i "test $t failed" ; status=1; }
 
 # should fail
 t=`expr $t + 1`
 $DIG $DIGOPTS tsigzone. \
-       @10.53.0.2 -b 10.53.0.1 axfr -y two:1234abcd8765 -p 5300 > dig.out.${t}
-grep "^;" dig.out.${t} > /dev/null 2>&1 || { echo "I:test $t failed" ; status=1; }
+       @10.53.0.2 -b 10.53.0.1 axfr -y two:1234abcd8765 > dig.out.${t}
+grep "^;" dig.out.${t} > /dev/null 2>&1 || { echo_i "test $t failed" ; status=1; }
 
 # should fail
 t=`expr $t + 1`
 $DIG $DIGOPTS tsigzone. \
-       @10.53.0.2 -b 10.53.0.3 axfr -y one:1234abcd8765 -p 5300 > dig.out.${t}
-grep "^;" dig.out.${t} > /dev/null 2>&1 || { echo "I:test $t failed" ; status=1; }
+       @10.53.0.2 -b 10.53.0.3 axfr -y one:1234abcd8765 > dig.out.${t}
+grep "^;" dig.out.${t} > /dev/null 2>&1 || { echo_i "test $t failed" ; status=1; }
 
-echo "I:testing allow-query-on ACL processing"
-cp -f ns2/named5.conf ns2/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
+echo_i "testing allow-query-on ACL processing"
+copy_setports ns2/named5.conf.in ns2/named.conf
+$RNDCCMD 10.53.0.2 reload 2>&1 | sed 's/^/ns2 /' | cat_i
 sleep 5
 t=`expr $t + 1`
-$DIG +tcp soa example. \
-       @10.53.0.2 -b 10.53.0.3 -p 5300 > dig.out.${t}
-grep "status: NOERROR" dig.out.${t} > /dev/null 2>&1 || { echo "I:test $t failed" ; status=1; }
+$DIG -p ${PORT} +tcp soa example. \
+       @10.53.0.2 -b 10.53.0.3 > dig.out.${t}
+grep "status: NOERROR" dig.out.${t} > /dev/null 2>&1 || { echo_i "test $t failed" ; status=1; }
 
 # AXFR tests against ns3
 
-echo "I:testing allow-transfer ACLs against ns3 (no existing zones)"
-
-echo "I:calling addzone example.com on ns3"
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 addzone 'example.com {type master; file "example.db"; }; '
+echo_i "testing allow-transfer ACLs against ns3 (no existing zones)"
 
+echo_i "calling addzone example.com on ns3"
+$RNDCCMD 10.53.0.3 addzone 'example.com {type master; file "example.db"; }; '
 sleep 1
 
 t=`expr $t + 1`
 ret=0
-echo "I:checking AXFR of example.com from ns3 with ACL allow-transfer { none; }; (${t})"
-$DIG @10.53.0.3 -p 5300 example.com axfr > dig.out.${t} 2>&1
+echo_i "checking AXFR of example.com from ns3 with ACL allow-transfer { none; }; (${t})"
+$DIG -p ${PORT} @10.53.0.3 example.com axfr > dig.out.${t} 2>&1
 grep "Transfer failed." dig.out.${t} >/dev/null 2>&1 || ret=1
-[ $ret -eq 0 ] || echo "I:failed"
+[ $ret -eq 0 ] || echo_i "failed"
 status=`expr $status + $ret`
 
-echo "I:calling rndc reconfig"
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 reconfig
+echo_i "calling rndc reconfig"
+$RNDCCMD 10.53.0.3 reconfig 2>&1 | sed 's/^/ns3 /' | cat_i
 
 sleep 1
 
 t=`expr $t + 1`
 ret=0
-echo "I:re-checking AXFR of example.com from ns3 with ACL allow-transfer { none; }; (${t})"
-$DIG @10.53.0.3 -p 5300 example.com axfr > dig.out.${t} 2>&1
+echo_i "re-checking AXFR of example.com from ns3 with ACL allow-transfer { none; }; (${t})"
+$DIG -p ${PORT} @10.53.0.3 example.com axfr > dig.out.${t} 2>&1
 grep "Transfer failed." dig.out.${t} >/dev/null 2>&1 || ret=1
-[ $ret -eq 0 ] || echo "I:failed"
+[ $ret -eq 0 ] || echo_i "failed"
 status=`expr $status + $ret`
 
 # AXFR tests against ns4
 
-echo "I:testing allow-transfer ACLs against ns4 (1 pre-existing zone)"
-
-echo "I:calling addzone example.com on ns4"
-$RNDC -c ../common/rndc.conf -s 10.53.0.4 -p 9953 addzone 'example.com {type master; file "example.db"; }; '
+echo_i "testing allow-transfer ACLs against ns4 (1 pre-existing zone)"
 
+echo_i "calling addzone example.com on ns4"
+$RNDCCMD 10.53.0.4 addzone 'example.com {type master; file "example.db"; }; '
 sleep 1
 
 t=`expr $t + 1`
 ret=0
-echo "I:checking AXFR of example.com from ns4 with ACL allow-transfer { none; }; (${t})"
-$DIG @10.53.0.4 -p 5300 example.com axfr > dig.out.${t} 2>&1
+echo_i "checking AXFR of example.com from ns4 with ACL allow-transfer { none; }; (${t})"
+$DIG -p ${PORT} @10.53.0.4 example.com axfr > dig.out.${t} 2>&1
 grep "Transfer failed." dig.out.${t} >/dev/null 2>&1 || ret=1
-[ $ret -eq 0 ] || echo "I:failed"
+[ $ret -eq 0 ] || echo_i "failed"
 status=`expr $status + $ret`
 
-echo "I:calling rndc reconfig"
-$RNDC -c ../common/rndc.conf -s 10.53.0.4 -p 9953 reconfig
+echo_i "calling rndc reconfig"
+$RNDCCMD 10.53.0.4 reconfig 2>&1 | sed 's/^/ns4 /' | cat_i
 
 sleep 1
 
 t=`expr $t + 1`
 ret=0
-echo "I:re-checking AXFR of example.com from ns4 with ACL allow-transfer { none; }; (${t})"
-$DIG @10.53.0.4 -p 5300 example.com axfr > dig.out.${t} 2>&1
+echo_i "re-checking AXFR of example.com from ns4 with ACL allow-transfer { none; }; (${t})"
+$DIG -p ${PORT} @10.53.0.4 example.com axfr > dig.out.${t} 2>&1
 grep "Transfer failed." dig.out.${t} >/dev/null 2>&1 || ret=1
-[ $ret -eq 0 ] || echo "I:failed"
+[ $ret -eq 0 ] || echo_i "failed"
 status=`expr $status + $ret`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index 2237a1b1d876080ce0803c377b117b998f7406b6..39423f21b2211e0563e855fae046e91f1b6c60d4 100644 (file)
@@ -20,5 +20,5 @@
 
 rm -f dig.out.*
 rm -f */named.memstats
-rm -f ns1/named.conf
+rm -f */named.conf
 rm -f */named.run
similarity index 91%
rename from bin/tests/system/additional/ns1/named1.conf
rename to bin/tests/system/additional/ns1/named1.conf.in
index b5f47db7245e3db5b8b835a2909b4532834e33c2..46eb1d0eac3f44b1e188c63d8e01278ebc61922e 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.5 2007/06/19 23:47:06 tbox Exp $ */
-
 options {
        query-source address 10.53.0.1;
        notify-source 10.53.0.1;
        transfer-source 10.53.0.1;
        recursion no;
        additional-from-auth no;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.1; };
        listen-on-v6 { none; };
@@ -33,7 +31,7 @@ options {
 include "../../common/rndc.key";
 
 controls {
-       inet 10.53.0.1 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.1 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 zone "rt.example" {
similarity index 91%
rename from bin/tests/system/additional/ns1/named2.conf
rename to bin/tests/system/additional/ns1/named2.conf.in
index cb165e8b29a878e883113b37f43ef9e2caf6a519..91b4f60c57800d4b15a000f7e8bd3ac82bb3ddc1 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.5 2007/06/19 23:47:06 tbox Exp $ */
-
 options {
        query-source address 10.53.0.1;
        notify-source 10.53.0.1;
        transfer-source 10.53.0.1;
        recursion no;
        additional-from-auth no;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.1; };
        listen-on-v6 { none; };
@@ -33,7 +31,7 @@ options {
 include "../../common/rndc.key";
 
 controls {
-       inet 10.53.0.1 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.1 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 zone "rt.example" {
similarity index 98%
rename from bin/tests/system/additional/ns3/named.conf
rename to bin/tests/system/additional/ns3/named.conf.in
index e5fa8d2df045549b2996542dd1e6468010e4e211..a0d87d1fb7e23761479c9d1212430aa3a20ef7d5 100644 (file)
@@ -20,7 +20,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; };
index 493608f59001739265fdba90b50cc09a2ee97af6..e57b17113c19afdcdf6997798c5c4611823b18d9 100644 (file)
@@ -14,4 +14,9 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-cp -f ns1/named1.conf ns1/named.conf
+SYSTEMTESTTOP=..
+. $SYSTEMTESTTOP/conf.sh
+
+$SHELL clean.sh
+copy_setports ns1/named1.conf.in ns1/named.conf
+copy_setports ns3/named.conf.in ns3/named.conf
index e5bdfd56d244233c97ed0fe91386fbd374233671..abf8f810c52cc6c7de68a0972aaacab609b52af9 100644 (file)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: tests.sh,v 1.7 2011/11/06 23:46:40 tbox Exp $
-
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
+DIGOPTS="-p ${PORT}"
+RNDCCMD="$RNDC -c $SYSTEMTESTTOP/common/rndc.conf -p ${CONTROLPORT} -s"
+
 status=0
 n=0
 
 dotests() {
     n=`expr $n + 1`
-    echo "I:test with RT, single zone ($n)"
+    echo_i "test with RT, single zone ($n)"
     ret=0
-    $DIG -t RT rt.rt.example @10.53.0.1 -p 5300 > dig.out.$n || ret=1
+    $DIG $DIGOPTS -t RT rt.rt.example @10.53.0.1 > dig.out.$n || ret=1
     if [ $ret -eq 1 ] ; then
-            echo "I: failed"; status=1
+            echo_i " failed"; status=1
     fi
 
     n=`expr $n + 1`
-    echo "I:test with RT, two zones ($n)"
+    echo_i "test with RT, two zones ($n)"
     ret=0
-    $DIG -t RT rt.rt2.example @10.53.0.1 -p 5300 > dig.out.$n || ret=1
+    $DIG $DIGOPTS -t RT rt.rt2.example @10.53.0.1 > dig.out.$n || ret=1
     if [ $ret -eq 1 ] ; then
-            echo "I: failed"; status=1
+            echo_i " failed"; status=1
     fi
 
     n=`expr $n + 1`
-    echo "I:test with NAPTR, single zone ($n)"
+    echo_i "test with NAPTR, single zone ($n)"
     ret=0
-    $DIG -t NAPTR nap.naptr.example @10.53.0.1 -p 5300 > dig.out.$n || ret=1
+    $DIG $DIGOPTS -t NAPTR nap.naptr.example @10.53.0.1 > dig.out.$n || ret=1
     if [ $ret -eq 1 ] ; then
-            echo "I: failed"; status=1
+            echo_i " failed"; status=1
     fi
 
     n=`expr $n + 1`
-    echo "I:test with NAPTR, two zones ($n)"
+    echo_i "test with NAPTR, two zones ($n)"
     ret=0
-    $DIG -t NAPTR nap.hang3b.example @10.53.0.1 -p 5300 > dig.out.$n || ret=1
+    $DIG $DIGOPTS -t NAPTR nap.hang3b.example @10.53.0.1 > dig.out.$n || ret=1
     if [ $ret -eq 1 ] ; then
-            echo "I: failed"; status=1
+            echo_i " failed"; status=1
     fi
 
     n=`expr $n + 1`
-    echo "I:test with LP ($n)"
+    echo_i "test with LP ($n)"
     ret=0
-    $DIG -t LP nid2.nid.example @10.53.0.1 -p 5300 > dig.out.$n || ret=1
+    $DIG $DIGOPTS -t LP nid2.nid.example @10.53.0.1 > dig.out.$n || ret=1
     if [ $minimal = no ] ; then
       grep "L64" dig.out.$n > /dev/null || ret=1
       grep "L32" dig.out.$n > /dev/null || ret=1
@@ -67,13 +68,13 @@ dotests() {
       grep "L32" dig.out.$n > /dev/null && ret=1
     fi
     if [ $ret -eq 1 ] ; then
-            echo "I: failed"; status=1
+            echo_i " failed"; status=1
     fi
 
     n=`expr $n + 1`
-    echo "I:test with NID ($n)"
+    echo_i "test with NID ($n)"
     ret=0
-    $DIG -t NID ns1.nid.example @10.53.0.1 -p 5300 > dig.out.$n || ret=1
+    $DIG $DIGOPTS -t NID ns1.nid.example @10.53.0.1 > dig.out.$n || ret=1
     if [ $minimal = no ] ; then
       # change && to || when we support NID additional processing
       grep "L64" dig.out.$n > /dev/null && ret=1
@@ -83,13 +84,13 @@ dotests() {
       grep "L32" dig.out.$n > /dev/null && ret=1
     fi
     if [ $ret -eq 1 ] ; then
-            echo "I: failed"; status=1
+            echo_i " failed"; status=1
     fi
 
     n=`expr $n + 1`
-    echo "I:test with NID + LP ($n)"
+    echo_i "test with NID + LP ($n)"
     ret=0
-    $DIG -t NID nid2.nid.example @10.53.0.1 -p 5300 > dig.out.$n || ret=1
+    $DIG $DIGOPTS -t NID nid2.nid.example @10.53.0.1 > dig.out.$n || ret=1
     if [ $minimal = no ] ; then
       # change && to || when we support NID additional processing
       grep "LP" dig.out.$n > /dev/null && ret=1
@@ -101,42 +102,42 @@ dotests() {
       grep "L32" dig.out.$n > /dev/null && ret=1
     fi
     if [ $ret -eq 1 ] ; then
-            echo "I: failed"; status=1
+            echo_i " failed"; status=1
     fi
 }
 
-echo "I:testing with 'minimal-responses yes;'"
+echo_i "testing with 'minimal-responses yes;'"
 minimal=yes
 dotests
 
-echo "I:reconfiguring server: minimal-responses no"
-cp ns1/named2.conf ns1/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.1 -p 9953 reconfig 2>&1 | sed 's/^/I:ns1 /'
+echo_i "reconfiguring server: minimal-responses no"
+copy_setports ns1/named2.conf.in ns1/named.conf
+$RNDCCMD 10.53.0.1 reconfig 2>&1 | sed 's/^/ns1 /' | cat_i
 sleep 2
 
-echo "I:testing with 'minimal-responses no;'"
+echo_i "testing with 'minimal-responses no;'"
 minimal=no
 dotests
 
 n=`expr $n + 1`
-echo "I:testing NS handling in ANY responses (authoritative) ($n)"
+echo_i "testing NS handling in ANY responses (authoritative) ($n)"
 ret=0
-$DIG -t ANY rt.example @10.53.0.1 -p 5300 > dig.out.$n || ret=1
+$DIG $DIGOPTS -t ANY rt.example @10.53.0.1 > dig.out.$n || ret=1
 grep "AUTHORITY: 0" dig.out.$n  > /dev/null || ret=1
 grep "NS[      ]*ns" dig.out.$n  > /dev/null || ret=1
 if [ $ret -eq 1 ] ; then
-    echo "I: failed"; status=1
+    echo_i " failed"; status=1
 fi
 
 n=`expr $n + 1`
-echo "I:testing NS handling in ANY responses (recursive) ($n)"
+echo_i "testing NS handling in ANY responses (recursive) ($n)"
 ret=0
-$DIG -t ANY rt.example @10.53.0.3 -p 5300 > dig.out.$n || ret=1
+$DIG $DIGOPTS -t ANY rt.example @10.53.0.3 > dig.out.$n || ret=1
 grep "AUTHORITY: 0" dig.out.$n  > /dev/null || ret=1
 grep "NS[      ]*ns" dig.out.$n  > /dev/null || ret=1
 if [ $ret -eq 1 ] ; then
-    echo "I: failed"; status=1
+    echo_i " failed"; status=1
 fi
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index 7be545535def6fcfa8294655f9454fd3b9d09982..83876aabfbdb69d717656046a94530db70d78b15 100644 (file)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: clean.sh,v 1.3 2010/09/15 03:32:34 marka Exp $
-
 rm -f dig.out.*
-rm -f rndc.out.*
-rm -f ns2/named.conf
+rm -f rndc.out*
+rm -f */named.conf
 rm -f */named.memstats
 rm -f ns2/*.nzf
 rm -f ns2/core*
similarity index 91%
rename from bin/tests/system/addzone/ns1/named.conf
rename to bin/tests/system/addzone/ns1/named.conf.in
index 8ba620784096b6a94b6f9cf87d7c4db824ebec14..eccf6859f5fe260791684dcff775807b21bfeab6 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named1.conf,v 1.2 2010/08/11 18:14:19 each Exp $ */
-
-controls { /* empty */ };
+controls {
+       inet 10.53.0.1 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
+};
 
 options {
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.1; };
        listen-on-v6 { none; };
similarity index 88%
rename from bin/tests/system/addzone/ns2/named1.conf
rename to bin/tests/system/addzone/ns2/named1.conf.in
index 7717b2a5dde582406cae3da371cd930052db5494..62e65c9d320cf23a7cc54579d610faa29af71929 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named1.conf,v 1.2 2010/08/11 18:14:19 each Exp $ */
-
-controls { /* empty */ };
-
 options {
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.2; };
        listen-on-v6 { none; };
@@ -28,7 +24,11 @@ options {
        allow-new-zones yes;
 };
 
-include "../../common/controls.conf";
+include "../../common/rndc.key";
+
+controls {
+       inet 10.53.0.2 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
+};
 
 zone "." {
        type hint;
similarity index 92%
rename from bin/tests/system/addzone/ns2/named2.conf
rename to bin/tests/system/addzone/ns2/named2.conf.in
index 0276a82aa1b28e82e8a8b9f06ec728864ada9af7..633db852c861607d6079c580c1408dd138e40ab7 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-controls { /* empty */ };
+include "../../common/rndc.key";
+
+controls {
+       inet 10.53.0.2 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
+};
 
-include "../../common/controls.conf";
 
 options {
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.2; 10.53.0.4; };
        listen-on-v6 { none; };
similarity index 87%
rename from bin/tests/system/addzone/ns3/named1.conf
rename to bin/tests/system/addzone/ns3/named1.conf.in
index 5ba501d36e8ba421c45823b39a11f3a770a71f54..521b1949c28125d3af8dadc774510332bd2495cd 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-key rndc_key {
-       secret "1234abcd8765";
-       algorithm hmac-sha256;
-};
+include "../../common/rndc.key";
 
 controls {
-       inet 10.53.0.3 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.3 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 options {
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.3; };
        listen-on-v6 { none; };
similarity index 92%
rename from bin/tests/system/addzone/ns3/named2.conf
rename to bin/tests/system/addzone/ns3/named2.conf.in
index 9dfa891f73e48f4616946c3edc13bb6d4a40aadd..1a07111990d92ac4f16fe272d1950384ff44f7b1 100644 (file)
@@ -20,11 +20,11 @@ key rndc_key {
 };
 
 controls {
-       inet 10.53.0.3 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.3 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 options {
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.3; };
        listen-on-v6 { none; };
index daaddecbc8a3a3d61fe4b14d06077a458a673eb4..aa472a4b7730757ab74fd38c6ad820c88c0ffed0 100644 (file)
@@ -19,10 +19,11 @@ SYSTEMTESTTOP=..
 
 $SHELL clean.sh
 
-cp -f ns2/named1.conf ns2/named.conf
+copy_setports ns2/named1.conf.in ns2/named.conf
 cp -f ns2/default.nzf.in ns2/3bf305731dd26307.nzf
 
-cp -f ns3/named1.conf ns3/named.conf
+copy_setports ns3/named1.conf.in ns3/named.conf
+
 rm -f ns3/*.nzf ns3/*.nzf~
 rm -f ns3/*.nzd ns3/*.nzd-lock
 rm -f ns3/inlineslave.db
index f9767c88254505678afa7accfb5a46c8aeec826f..2ef6e1b6a5fbf25a48edc4b863ad2d7a1492aa5b 100755 (executable)
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
-DIGOPTS="+tcp +nosea +nostat +nocmd +norec +noques +noauth +noadd +nostats +dnssec -p 5300"
+DIGOPTS="+tcp +nosea +nostat +nocmd +norec +noques +noauth +noadd +nostats +dnssec -p ${PORT}"
+RNDCCMD="$RNDC -c $SYSTEMTESTTOP/common/rndc.conf -p ${CONTROLPORT} -s"
+
 status=0
 n=0
 
-echo "I:checking normally loaded zone ($n)"
+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
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking previously added zone ($n)"
+echo_i "checking previously added zone ($n)"
 ret=0
 $DIG $DIGOPTS @10.53.0.2 a.previous.example a > dig.out.ns2.$n || ret=1
 grep 'status: NOERROR' dig.out.ns2.$n > /dev/null || ret=1
 grep '^a.previous.example' dig.out.ns2.$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:adding new zone ($n)"
+echo_i "adding new zone ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 addzone 'added.example { type master; file "added.db"; };' 2>&1 | sed 's/^/I:ns2 /'
+$RNDCCMD 10.53.0.2 addzone 'added.example { type master; file "added.db"; };' 2>&1 | sed 's/^/ns2 /' | cat_i
 $DIG $DIGOPTS @10.53.0.2 a.added.example a > dig.out.ns2.$n || ret=1
 grep 'status: NOERROR' dig.out.ns2.$n > /dev/null || ret=1
 grep '^a.added.example' dig.out.ns2.$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:adding a zone that requires quotes ($n)"
+echo_i "adding a zone that requires quotes ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 addzone '"32/1.0.0.127-in-addr.added.example" { check-names ignore; type master; file "added.db"; };' 2>&1 | sed 's/^/I:ns2 /'
+$RNDCCMD 10.53.0.2 addzone '"32/1.0.0.127-in-addr.added.example" { check-names ignore; type master; file "added.db"; };' 2>&1 | sed 's/^/ns2 /' | cat_i
 $DIG $DIGOPTS @10.53.0.2 "a.32/1.0.0.127-in-addr.added.example" a > dig.out.ns2.$n || ret=1
 grep 'status: NOERROR' dig.out.ns2.$n > /dev/null || ret=1
 grep '^a.32/1.0.0.127-in-addr.added.example' dig.out.ns2.$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:adding a zone with a quote in the name ($n)"
+echo_i "adding a zone with a quote in the name ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 addzone '"foo\"bar.example" { check-names ignore; type master; file "added.db"; };' 2>&1 | sed 's/^/I:ns2 /'
+$RNDCCMD 10.53.0.2 addzone '"foo\"bar.example" { check-names ignore; type master; file "added.db"; };' 2>&1 | sed 's/^/ns2 /' | cat_i
 $DIG $DIGOPTS @10.53.0.2 "a.foo\"bar.example" a > dig.out.ns2.$n || ret=1
 grep 'status: NOERROR' dig.out.ns2.$n > /dev/null || ret=1
 grep '^a.foo\\"bar.example' dig.out.ns2.$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:adding new zone with missing master file ($n)"
+echo_i "adding new zone with missing master file ($n)"
 ret=0
 $DIG $DIGOPTS +all @10.53.0.2 a.missing.example a > dig.out.ns2.pre.$n || ret=1
 grep "status: REFUSED" dig.out.ns2.pre.$n > /dev/null || ret=1
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 addzone 'missing.example { type master; file "missing.db"; };' 2> rndc.out.ns2.$n
+$RNDCCMD 10.53.0.2 addzone 'missing.example { type master; file "missing.db"; };' 2> rndc.out.ns2.$n
 grep "file not found" rndc.out.ns2.$n > /dev/null || ret=1
 $DIG $DIGOPTS +all @10.53.0.2 a.missing.example a > dig.out.ns2.post.$n || ret=1
 grep "status: REFUSED" dig.out.ns2.post.$n > /dev/null || ret=1
 $PERL ../digcomp.pl dig.out.ns2.pre.$n dig.out.ns2.post.$n || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:verifying no comments in nzf file ($n)"
+echo_i "verifying no comments in nzf file ($n)"
 ret=0
 hcount=`grep "^# New zone file for view: _default" ns2/3bf305731dd26307.nzf | wc -l`
 [ $hcount -eq 0 ] || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:deleting previously added zone ($n)"
+echo_i "deleting previously added zone ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 delzone previous.example 2>&1 | sed 's/^/I:ns2 /'
+$RNDCCMD 10.53.0.2 delzone previous.example 2>&1 | sed 's/^/ns2 /' | cat_i
 $DIG $DIGOPTS @10.53.0.2 a.previous.example a > dig.out.ns2.$n
 grep 'status: REFUSED' dig.out.ns2.$n > /dev/null || ret=1
 grep '^a.previous.example' dig.out.ns2.$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking nzf file now has comment ($n)"
+echo_i "checking nzf file now has comment ($n)"
 ret=0
 hcount=`grep "^# New zone file for view: _default" ns2/3bf305731dd26307.nzf | wc -l`
 [ $hcount -eq 1 ] || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:deleting newly added zone ($n)"
+echo_i "deleting newly added zone ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 delzone added.example 2>&1 | sed 's/^/I:ns2 /'
+$RNDCCMD 10.53.0.2 delzone added.example 2>&1 | sed 's/^/ns2 /' | cat_i
 $DIG $DIGOPTS @10.53.0.2 a.added.example a > dig.out.ns2.$n
 grep 'status: REFUSED' dig.out.ns2.$n > /dev/null || ret=1
 grep '^a.added.example' dig.out.ns2.$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:deleting newly added zone with escaped quote ($n)"
+echo_i "deleting newly added zone with escaped quote ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 delzone "foo\\\"bar.example" 2>&1 | sed 's/^/I:ns2 /'
+$RNDCCMD 10.53.0.2 delzone "foo\\\"bar.example" 2>&1 | sed 's/^/ns2 /' | cat_i
 $DIG $DIGOPTS @10.53.0.2 "a.foo\"bar.example" a > dig.out.ns2.$n
 grep 'status: REFUSED' dig.out.ns2.$n > /dev/null || ret=1
 grep "^a.foo\"bar.example" dig.out.ns2.$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:attempt to delete a normally-loaded zone ($n)"
+echo_i "attempt to delete a normally-loaded zone ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 delzone normal.example 2> rndc.out.ns2.$n
+$RNDCCMD 10.53.0.2 delzone normal.example 2> rndc.out.ns2.$n
 grep "permission denied" rndc.out.ns2.$n > /dev/null || ret=1
 $DIG $DIGOPTS @10.53.0.2 a.normal.example a > dig.out.ns2.$n
 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
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:attempting to add master zone with inline signing ($n)"
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 addzone 'inline.example { type master; file "inline.db"; inline-signing yes; };' 2>&1 | sed 's/^/I:ns2 /'
+echo_i "attempting to add master zone with inline signing ($n)"
+$RNDCCMD 10.53.0.2 addzone 'inline.example { type master; file "inline.db"; inline-signing yes; };' 2>&1 | sed 's/^/ns2 /' | cat_i
 for i in 1 2 3 4 5
 do
 ret=0
@@ -151,19 +153,19 @@ grep '^a.inline.example' dig.out.ns2.$n > /dev/null || ret=1
 sleep 1
 done
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:attempting to add master zone with inline signing and missing master ($n)"
+echo_i "attempting to add master zone with inline signing and missing master ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 addzone 'inlinemissing.example { type master; file "missing.db"; inline-signing yes; };' 2> rndc.out.ns2.$n
+$RNDCCMD 10.53.0.2 addzone 'inlinemissing.example { type master; file "missing.db"; inline-signing yes; };' 2> rndc.out.ns2.$n
 grep "file not found" rndc.out.ns2.$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:attempting to add slave zone with inline signing ($n)"
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 addzone 'inlineslave.example { type slave; masters { 10.53.0.1; }; file "inlineslave.bk"; inline-signing yes; };' 2>&1 | sed 's/^/I:ns2 /'
+echo_i "attempting to add slave zone with inline signing ($n)"
+$RNDCCMD 10.53.0.2 addzone 'inlineslave.example { type slave; masters { 10.53.0.1; }; file "inlineslave.bk"; inline-signing yes; };' 2>&1 | sed 's/^/ns2 /' | cat_i
 for i in 1 2 3 4 5
 do
 ret=0
@@ -174,70 +176,70 @@ grep '^a.inlineslave.example' dig.out.ns2.$n > /dev/null || ret=1
 sleep 1
 done
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that adding a 'stub' zone works ($n)"
+echo_i "check that adding a 'stub' zone works ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 addzone 'stub.example { type stub; masters { 1.2.3.4; }; file "stub.example.bk"; };' > rndc.out.ns2.$n 2>&1 || ret=1
+$RNDCCMD 10.53.0.2 addzone 'stub.example { type stub; masters { 1.2.3.4; }; file "stub.example.bk"; };' > rndc.out.ns2.$n 2>&1 || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that adding a 'static-stub' zone works ($n)"
+echo_i "check that adding a 'static-stub' zone works ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 addzone 'static-stub.example { type static-stub; server-addresses { 1.2.3.4; }; };' > rndc.out.ns2.$n 2>&1 || ret=1
+$RNDCCMD 10.53.0.2 addzone 'static-stub.example { type static-stub; server-addresses { 1.2.3.4; }; };' > rndc.out.ns2.$n 2>&1 || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that zone type 'redirect' (master) is properly rejected ($n)"
+echo_i "check that zone type 'redirect' (master) is properly rejected ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 addzone '"." { type redirect; file "redirect.db"; };' > rndc.out.ns2.$n 2>&1 && ret=1
+$RNDCCMD 10.53.0.2 addzone '"." { type redirect; file "redirect.db"; };' > rndc.out.ns2.$n 2>&1 && ret=1
 grep "zones not supported by addzone" rndc.out.ns2.$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that zone type 'redirect' (slave) is properly rejected ($n)"
+echo_i "check that zone type 'redirect' (slave) is properly rejected ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 addzone '"." { type redirect; masters { 1.2.3.4; }; file "redirect.bk"; };' > rndc.out.ns2.$n 2>&1 && ret=1
+$RNDCCMD 10.53.0.2 addzone '"." { type redirect; masters { 1.2.3.4; }; file "redirect.bk"; };' > rndc.out.ns2.$n 2>&1 && ret=1
 grep "zones not supported by addzone" rndc.out.ns2.$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that zone type 'hint' is properly rejected ($n)"
+echo_i "check that zone type 'hint' is properly rejected ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 addzone '"." { type hint; file "hints.db"; };' > rndc.out.ns2.$n 2>&1 && ret=1
+$RNDCCMD 10.53.0.2 addzone '"." { type hint; file "hints.db"; };' > rndc.out.ns2.$n 2>&1 && ret=1
 grep "zones not supported by addzone" rndc.out.ns2.$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that zone type 'forward' is properly rejected ($n)"
+echo_i "check that zone type 'forward' is properly rejected ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 addzone 'forward.example { type forward; forwarders { 1.2.3.4; }; forward only; };' > rndc.out.ns2.$n 2>&1 && ret=1
+$RNDCCMD 10.53.0.2 addzone 'forward.example { type forward; forwarders { 1.2.3.4; }; forward only; };' > rndc.out.ns2.$n 2>&1 && ret=1
 grep "zones not supported by addzone" rndc.out.ns2.$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that zone type 'delegation-only' is properly rejected ($n)"
+echo_i "check that zone type 'delegation-only' is properly rejected ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 addzone 'delegation-only.example { type delegation-only; };' > rndc.out.ns2.$n 2>&1 && ret=1
+$RNDCCMD 10.53.0.2 addzone 'delegation-only.example { type delegation-only; };' > rndc.out.ns2.$n 2>&1 && ret=1
 grep "zones not supported by addzone" rndc.out.ns2.$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:reconfiguring server with multiple views"
+echo_i "reconfiguring server with multiple views"
 rm -f ns2/named.conf 
-cp -f ns2/named2.conf ns2/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reconfig 2>&1 | sed 's/^/I:ns2 /'
+copy_setports ns2/named2.conf.in ns2/named.conf
+$RNDCCMD 10.53.0.2 reconfig 2>&1 | sed 's/^/ns2 /' | cat_i
 sleep 5
 
-echo "I:adding new zone to external view ($n)"
+echo_i "adding new zone to external view ($n)"
 # NOTE: The internal view has "recursion yes" set, and so queries for
 # nonexistent zones should return NOERROR.  The external view is
 # "recursion no", so queries for nonexistent zones should return
@@ -249,88 +251,88 @@ $DIG +norec $DIGOPTS @10.53.0.2 -b 10.53.0.2 a.added.example a > dig.out.ns2.int
 grep 'status: NOERROR' dig.out.ns2.intpre.$n > /dev/null || ret=1
 $DIG +norec $DIGOPTS @10.53.0.4 -b 10.53.0.4 a.added.example a > dig.out.ns2.extpre.$n || ret=1
 grep 'status: REFUSED' dig.out.ns2.extpre.$n > /dev/null || ret=1
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 addzone 'added.example in external { type master; file "added.db"; };' 2>&1 | sed 's/^/I:ns2 /'
+$RNDCCMD 10.53.0.2 addzone 'added.example in external { type master; file "added.db"; };' 2>&1 | sed 's/^/ns2 /' | cat_i
 $DIG +norec $DIGOPTS @10.53.0.2 -b 10.53.0.2 a.added.example a > dig.out.ns2.int.$n || ret=1
 grep 'status: NOERROR' dig.out.ns2.int.$n > /dev/null || ret=1
 $DIG +norec $DIGOPTS @10.53.0.4 -b 10.53.0.4 a.added.example a > dig.out.ns2.ext.$n || ret=1
 grep 'status: NOERROR' dig.out.ns2.ext.$n > /dev/null || ret=1
 grep '^a.added.example' dig.out.ns2.ext.$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking new nzf file has comment ($n)"
+echo_i "checking new nzf file has comment ($n)"
 ret=0
 hcount=`grep "^# New zone file for view: external" ns2/3c4623849a49a539.nzf | wc -l`
 [ $hcount -eq 1 ] || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking rndc reload causes named to reload the external view's NZF file ($n)"
+echo_i "checking rndc reload causes named to reload the external view's NZF file ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
+$RNDCCMD 10.53.0.2 reload 2>&1 | sed 's/^/ns2 /' | cat_i
 $DIG +norec $DIGOPTS @10.53.0.2 -b 10.53.0.2 a.added.example a > dig.out.ns2.int.$n || ret=1
 grep 'status: NOERROR' dig.out.ns2.int.$n > /dev/null || ret=1
 $DIG +norec $DIGOPTS @10.53.0.4 -b 10.53.0.4 a.added.example a > dig.out.ns2.ext.$n || ret=1
 grep 'status: NOERROR' dig.out.ns2.ext.$n > /dev/null || ret=1
 grep '^a.added.example' dig.out.ns2.ext.$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:deleting newly added zone ($n)"
+echo_i "deleting newly added zone ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 delzone 'added.example in external' 2>&1 | sed 's/^/I:ns2 /'
+$RNDCCMD 10.53.0.2 delzone 'added.example in external' 2>&1 | sed 's/^/ns2 /' | cat_i
 $DIG $DIGOPTS @10.53.0.4 -b 10.53.0.4 a.added.example a > dig.out.ns2.$n || ret=1
 grep 'status: REFUSED' dig.out.ns2.$n > /dev/null || ret=1
 grep '^a.added.example' dig.out.ns2.$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:attempting to add zone to internal view ($n)"
+echo_i "attempting to add zone to internal view ($n)"
 ret=0
 $DIG +norec $DIGOPTS @10.53.0.2 -b 10.53.0.2 a.added.example a > dig.out.ns2.pre.$n || ret=1
 grep 'status: NOERROR' dig.out.ns2.pre.$n > /dev/null || ret=1
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 addzone 'added.example in internal { type master; file "added.db"; };' 2> rndc.out.ns2.$n
+$RNDCCMD 10.53.0.2 addzone 'added.example in internal { type master; file "added.db"; };' 2> rndc.out.ns2.$n
 grep "permission denied" rndc.out.ns2.$n > /dev/null || ret=1
 $DIG $DIGOPTS @10.53.0.2 -b 10.53.0.2 a.added.example a > dig.out.ns2.int.$n || ret=1
 grep 'status: NOERROR' dig.out.ns2.int.$n > /dev/null || ret=1
 $DIG $DIGOPTS @10.53.0.4 -b 10.53.0.4 a.added.example a > dig.out.ns2.ext.$n || ret=1
 grep 'status: REFUSED' dig.out.ns2.ext.$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:attempting to delete a policy zone ($n)"
+echo_i "attempting to delete a policy zone ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 delzone 'policy in internal' 2> rndc.out.ns2.$n >&1
+$RNDCCMD 10.53.0.2 delzone 'policy in internal' 2> rndc.out.ns2.$n >&1
 grep 'cannot be deleted' rndc.out.ns2.$n > /dev/null ||
 grep 'permission denied' rndc.out.ns2.$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:ensure the configuration context is cleaned up correctly ($n)"
+echo_i "ensure the configuration context is cleaned up correctly ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reconfig > /dev/null 2>&1 || ret=1
+$RNDCCMD 10.53.0.2 reconfig > /dev/null 2>&1 || ret=1
 sleep 5
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 status > /dev/null 2>&1 || ret=1
+$RNDCCMD 10.53.0.2 status > /dev/null 2>&1 || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check delzone after reconfig failure ($n)"
+echo_i "check delzone after reconfig failure ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 addzone 'inlineslave.example. IN { type slave; file "inlineslave.db"; masterfile-format text; masters { testmaster; }; };' > /dev/null 2>&1 || ret=1
-cp -f ns3/named2.conf ns3/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 reconfig > /dev/null 2>&1 && ret=1
+$RNDCCMD 10.53.0.3 addzone 'inlineslave.example. IN { type slave; file "inlineslave.db"; masterfile-format text; masters { testmaster; }; };' > /dev/null 2>&1 || ret=1
+copy_setports ns3/named2.conf.in ns3/named.conf
+$RNDCCMD 10.53.0.3 reconfig > /dev/null 2>&1 && ret=1
 sleep 5
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 delzone inlineslave.example > /dev/null 2>&1 || ret=1
+$RNDCCMD 10.53.0.3 delzone inlineslave.example > /dev/null 2>&1 || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index 6edeff3d1e3e2e7a1b14f19a8dac715f64c00151..33ad9233230d3e5fc67ce33ee1442c5da4f826f7 100644 (file)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id$
-
 #
 # This is the name server from hell.  It provides canned
 # responses based on pattern matching the queries, and
 # can be reprogrammed on-the-fly over a TCP connection.
 #
-# The server listens for control connections on port 5301.
+# The server listens for queries on port 5300 (or PORT).
+#
+# The server listens for control connections on port 5301 (or EXTRAPORT1).
+#
 # A control connection is a TCP stream of lines like
 #
 #  /pattern/
@@ -88,17 +89,22 @@ if (@ARGV > 0) {
        $server_addr = @ARGV[0];
 }
 
+my $mainport = int($ENV{'PORT'});
+if (!$mainport) { $mainport = 5300; }
+my $ctrlport = int($ENV{'EXTRAPORT1'});
+if (!$ctrlport) { $ctrlport = 5301; }
+
 # XXX: we should also be able to set the port numbers to listen on.
 my $ctlsock = IO::Socket::INET->new(LocalAddr => "$server_addr",
-   LocalPort => 5301, Proto => "tcp", Listen => 5, Reuse => 1) or die "$!";
+   LocalPort => $ctrlport, Proto => "tcp", Listen => 5, Reuse => 1) or die "$!";
 
 my $udpsock = IO::Socket::INET->new(LocalAddr => "$server_addr",
-   LocalPort => 5300, Proto => "udp", Reuse => 1) or die "$!";
+   LocalPort => $mainport, Proto => "udp", Reuse => 1) or die "$!";
 
 my $tcpsock = IO::Socket::INET->new(LocalAddr => "$server_addr",
-   LocalPort => 5300, Proto => "tcp", Listen => 5, Reuse => 1) or die "$!";
+   LocalPort => $mainport, Proto => "tcp", Listen => 5, Reuse => 1) or die "$!";
 
-print "listening on $server_addr:5300,5301.\n";
+print "listening on $server_addr:$mainport,$ctrlport.\n";
 print "Using Net::DNS $Net::DNS::VERSION\n";
 
 my $pidf = new IO::File "ans.pid", "w" or die "cannot open pid file: $!";
index 0ba23a5966beae6d6923ab2dc8a370278547889a..cb268950ba07b97fd8f589faef8518b2661bb1a6 100644 (file)
@@ -19,6 +19,7 @@ rm -f */core
 rm -f */example.bk
 rm -f */named.memstats
 rm -f */named.run
+rm -f */named.conf
 rm -f activate-now-publish-1day.key
 rm -f active.key inact.key del.key unpub.key standby.key rev.key
 rm -f delayksk.key delayzsk.key autoksk.key autozsk.key
similarity index 88%
rename from bin/tests/system/autosign/ns1/named.conf
rename to bin/tests/system/autosign/ns1/named.conf.in
index 2fbe62f6fcb5b86107435443cd0f207302ea54ae..45f8ddcc9c77d60ac3a2f3f0a16ad999caff142f 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.3 2009/11/30 23:48:02 tbox Exp $ */
-
 // NS1
 
-controls { /* empty */ };
-
 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; };
@@ -40,7 +36,7 @@ key rndc_key {
 };
 
 controls {
-        inet 10.53.0.1 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.1 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 zone "." {
similarity index 93%
rename from bin/tests/system/autosign/ns2/named.conf
rename to bin/tests/system/autosign/ns2/named.conf.in
index 5e9ad8fb8f89cb22a4fda1a6322259ebf0bf6b58..ec095cf3da1dcb39e0383cbb86d2aea5ee525790 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.7 2011/04/29 23:47:17 tbox Exp $ */
-
 // NS2
 
-controls { /* empty */ };
-
 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; };
@@ -41,7 +37,7 @@ key rndc_key {
 };
 
 controls {
-       inet 10.53.0.2 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.2 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 zone "." {
similarity index 98%
rename from bin/tests/system/autosign/ns3/named.conf
rename to bin/tests/system/autosign/ns3/named.conf.in
index 0b46f593344d3dfd3b15f4973bd86b8376db0683..698f5887ecbd49f819a739333c47b5e34ce88e59 100644 (file)
@@ -14,8 +14,6 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id$ */
-
 // NS3
 
 controls { /* empty */ };
@@ -24,7 +22,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@;
        session-keyfile "session.key";
        pid-file "named.pid";
        listen-on { 10.53.0.3; };
@@ -43,7 +41,7 @@ key rndc_key {
 };
 
 controls {
-       inet 10.53.0.3 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.3 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 zone "." {
similarity index 92%
rename from bin/tests/system/autosign/ns4/named.conf
rename to bin/tests/system/autosign/ns4/named.conf.in
index 9e2dda46424e54aade14414015a1ae3c095f5739..524e7f1476cdec31445689a6e60e322d6198f05c 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.3 2009/11/30 23:48:02 tbox Exp $ */
-
 // NS4
 
-controls { /* empty */ };
-
 options {
        query-source address 10.53.0.4;
        notify-source 10.53.0.4;
        transfer-source 10.53.0.4;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.4; };
        listen-on-v6 { none; };
similarity index 92%
rename from bin/tests/system/autosign/ns5/named.conf
rename to bin/tests/system/autosign/ns5/named.conf.in
index 2ce156ce23a14f492df001723e9c97374e68962f..203d2a370ac2e1dbc11093bd2eeaa16c324db346 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.3 2009/11/30 23:48:02 tbox Exp $ */
-
 // NS5
 
-controls { /* empty */ };
-
 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";
        listen-on { 10.53.0.5; };
        listen-on-v6 { none; };
index a1550fbdd1f409fe285692c751c316af029d07b4..0e9a96ee529e78b4cb7e5e0d539a021d3447da49 100644 (file)
@@ -21,5 +21,11 @@ SYSTEMTESTTOP=..
 
 test -r $RANDFILE || $GENRANDOM 400 $RANDFILE
 
+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
+copy_setports ns4/named.conf.in ns4/named.conf
+copy_setports ns5/named.conf.in ns5/named.conf
+
 echo "I:generating keys and preparing zones"
 cd ns1 && $SHELL keygen.sh
index de164f6eb8a2802a301aa469c78262055beab1bc..eea6181cb9c6e1afbdb8d16b4cc6ae922ac5b0ff 100755 (executable)
@@ -20,7 +20,8 @@ SYSTEMTESTTOP=..
 status=0
 n=0
 
-DIGOPTS="+tcp +noadd +nosea +nostat +nocmd +dnssec -p 5300"
+DIGOPTS="+tcp +noadd +nosea +nostat +nocmd +dnssec -p ${PORT}"
+RNDCCMD="$RNDC -c $SYSTEMTESTTOP/common/rndc.conf -p ${CONTROLPORT} -s"
 
 # convert private-type records to readable form
 showprivate () {
@@ -50,7 +51,7 @@ checkprivate () {
     fi
 
     echo "$x"
-    echo "I:failed"
+    echo_i "failed"
     return 1
 }
 
@@ -60,7 +61,7 @@ checkprivate () {
 #  NSEC records to appear before proceeding with a counter to prevent
 #  infinite loops if there is a error.
 #
-echo "I:waiting for autosign changes to take effect"
+echo_i "waiting for autosign changes to take effect"
 i=0
 while [ $i -lt 30 ]
 do
@@ -88,19 +89,19 @@ do
        done
        i=`expr $i + 1`
        if [ $ret = 0 ]; then break; fi
-       echo "I:waiting ... ($i)"
+       echo_i "waiting ... ($i)"
        sleep 2
 done
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; else echo "I:done"; fi
+if [ $ret != 0 ]; then echo_i "done"; fi
 status=`expr $status + $ret`
 
 #
 # Check that DNSKEY is initially signed with a KSK and not a ZSK.
 #
-echo "I:check that zone with active and inactive KSK and active ZSK is properly"
-echo "I:  resigned after the active KSK is deleted - stage 1: Verify that DNSKEY"
-echo "I:  is initially signed with a KSK and not a ZSK. ($n)"
+echo_i "check that zone with active and inactive KSK and active ZSK is properly"
+echo_i "  resigned after the active KSK is deleted - stage 1: Verify that DNSKEY"
+echo_i "  is initially signed with a KSK and not a ZSK. ($n)"
 ret=0
 
 $DIG  $DIGOPTS @10.53.0.3 axfr inacksk3.example > dig.out.ns3.test$n
@@ -126,18 +127,18 @@ awk='$4 == "RRSIG" && $5 == "DNSKEY" { printf "%05u\n", $11 }'
 id=`awk "${awk}" dig.out.ns3.test$n`
 
 $SETTIME -D now+5 ns3/Kinacksk3.example.+007+${id}
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 loadkeys inacksk3.example
+$RNDCCMD 10.53.0.3 loadkeys inacksk3.example
 
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 #
 # Check that zone is initially signed with a ZSK and not a KSK.
 #
-echo "I:check that zone with active and inactive ZSK and active KSK is properly"
-echo "I:  resigned after the active ZSK is deleted - stage 1: Verify that zone"
-echo "I:  is initially signed with a ZSK and not a KSK. ($n)"
+echo_i "check that zone with active and inactive ZSK and active KSK is properly"
+echo_i "  resigned after the active ZSK is deleted - stage 1: Verify that zone"
+echo_i "  is initially signed with a ZSK and not a KSK. ($n)"
 ret=0
 $DIG  $DIGOPTS @10.53.0.3 axfr inaczsk3.example > dig.out.ns3.test$n
 kskid=`awk '$4 == "DNSKEY" && $5 == 257 { print }' dig.out.ns3.test$n |
@@ -154,12 +155,12 @@ count=`awk 'BEGIN { count = 0 }
 test $count -eq 3 || ret=1
 id=`awk '$4 == "RRSIG" && $5 == "CNAME" { printf "%05u\n", $11 }' dig.out.ns3.test$n`
 $SETTIME -D now+5 ns3/Kinaczsk3.example.+007+${id}
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 loadkeys inaczsk3.example
+$RNDCCMD 10.53.0.3 loadkeys inaczsk3.example
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking NSEC->NSEC3 conversion prerequisites ($n)"
+echo_i "checking NSEC->NSEC3 conversion prerequisites ($n)"
 ret=0
 # these commands should result in an empty file:
 $DIG $DIGOPTS +noall +answer nsec3.example. nsec3param @10.53.0.3 > dig.out.ns3.1.test$n || ret=1
@@ -167,20 +168,20 @@ grep "NSEC3PARAM" dig.out.ns3.1.test$n > /dev/null && ret=1
 $DIG $DIGOPTS +noall +answer autonsec3.example. nsec3param @10.53.0.3 > dig.out.ns3.2.test$n || ret=1
 grep "NSEC3PARAM" dig.out.ns3.2.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking NSEC3->NSEC conversion prerequisites ($n)"
+echo_i "checking NSEC3->NSEC conversion prerequisites ($n)"
 ret=0
 $DIG $DIGOPTS +noall +answer nsec3-to-nsec.example. nsec3param @10.53.0.3 > dig.out.ns3.test$n || ret=1
 grep "NSEC3PARAM" dig.out.ns3.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:converting zones from nsec to nsec3"
+echo_i "converting zones from nsec to nsec3"
 $NSUPDATE > /dev/null 2>&1 <<END       || status=1
-server 10.53.0.3 5300
+server 10.53.0.3 ${PORT}
 zone nsec3.nsec3.example.
 update add nsec3.nsec3.example. 3600 NSEC3PARAM 1 0 10 BEEF
 send
@@ -205,111 +206,111 @@ send
 END
 
 # try to convert nsec.example; this should fail due to non-NSEC key
-echo "I:preset nsec3param in unsigned zone via nsupdate ($n)"
+echo_i "preset nsec3param in unsigned zone via nsupdate ($n)"
 $NSUPDATE > nsupdate.out 2>&1 <<END
-server 10.53.0.3 5300
+server 10.53.0.3 ${PORT}
 zone nsec.example.
 update add nsec.example. 3600 NSEC3PARAM 1 0 10 BEEF
 send
 END
 
-echo "I:checking for nsec3param in unsigned zone ($n)"
+echo_i "checking for nsec3param in unsigned zone ($n)"
 ret=0
 $DIG $DIGOPTS +noall +answer autonsec3.example. nsec3param @10.53.0.3 > dig.out.ns3.test$n || ret=1
 grep "NSEC3PARAM" dig.out.ns3.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking for nsec3param signing record ($n)"
+echo_i "checking for nsec3param signing record ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing -list autonsec3.example. > signing.out.test$n 2>&1
+$RNDCCMD 10.53.0.3 signing -list autonsec3.example. > signing.out.test$n 2>&1
 grep "Pending NSEC3 chain 1 0 20 DEAF" signing.out.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:resetting nsec3param via rndc signing ($n)"
+echo_i "resetting nsec3param via rndc signing ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing -clear all autonsec3.example. > /dev/null 2>&1
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing -nsec3param 1 1 10 beef autonsec3.example. > /dev/null 2>&1
+$RNDCCMD 10.53.0.3 signing -clear all autonsec3.example. > /dev/null 2>&1
+$RNDCCMD 10.53.0.3 signing -nsec3param 1 1 10 beef autonsec3.example. > /dev/null 2>&1
 for i in 0 1 2 3 4 5 6 7 8 9; do
        ret=0
-       $RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing -list autonsec3.example. > signing.out.test$n 2>&1
+       $RNDCCMD 10.53.0.3 signing -list autonsec3.example. > signing.out.test$n 2>&1
        grep "Pending NSEC3 chain 1 1 10 BEEF" signing.out.test$n > /dev/null || ret=1
        num=`grep "Pending " signing.out.test$n | wc -l`
        [ $num -eq 1 ] || ret=1
        [ $ret -eq 0 ] && break
-       echo "I:waiting ... ($i)"
+       echo_i "waiting ... ($i)"
        sleep 2
 done
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:signing preset nsec3 zone"
+echo_i "signing preset nsec3 zone"
 zsk=`cat autozsk.key`
 ksk=`cat autoksk.key`
 $SETTIME -K ns3 -P now -A now $zsk > /dev/null 2>&1
 $SETTIME -K ns3 -P now -A now $ksk > /dev/null 2>&1
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 loadkeys autonsec3.example. 2>&1 | sed 's/^/I:ns3 /'
+$RNDCCMD 10.53.0.3 loadkeys autonsec3.example. 2>&1 | sed 's/^/I:ns3 /'
 
-echo "I:waiting for changes to take effect"
+echo_i "waiting for changes to take effect"
 sleep 3
 
-echo "I:converting zone from nsec3 to nsec"
+echo_i "converting zone from nsec3 to nsec"
 $NSUPDATE > /dev/null 2>&1 << END      || status=1
-server 10.53.0.3 5300
+server 10.53.0.3 ${PORT}
 zone nsec3-to-nsec.example.
 update delete nsec3-to-nsec.example. NSEC3PARAM
 send
 END
 
-echo "I:waiting for change to take effect"
+echo_i "waiting for change to take effect"
 sleep 3
 
-echo "I:checking that expired RRSIGs from missing key are not deleted ($n)"
+echo_i "checking that expired RRSIGs from missing key are not deleted ($n)"
 ret=0
 missing=`sed 's/^K.*+007+0*\([0-9]\)/\1/' < missingzsk.key`
 $JOURNALPRINT ns3/nozsk.example.db.jnl | \
    awk '{if ($1 == "del" && $5 == "RRSIG" && $12 == id) {exit 1}} END {exit 0}' id=$missing || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that expired RRSIGs from inactive key are not deleted ($n)"
+echo_i "checking that expired RRSIGs from inactive key are not deleted ($n)"
 ret=0
 inactive=`sed 's/^K.*+007+0*\([0-9]\)/\1/' < inactivezsk.key`
 $JOURNALPRINT ns3/inaczsk.example.db.jnl | \
    awk '{if ($1 == "del" && $5 == "RRSIG" && $12 == id) {exit 1}} END {exit 0}' id=$inactive || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that non-replaceable RRSIGs are logged only once (missing private key) ($n)"
+echo_i "checking that non-replaceable RRSIGs are logged only once (missing private key) ($n)"
 ret=0
 loglines=`grep "Key nozsk.example/NSEC3RSASHA1/$missing .* retaining signatures" ns3/named.run | wc -l`
 [ "$loglines" -eq 1 ] || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that non-replaceable RRSIGs are logged only once (inactive private key) ($n)"
+echo_i "checking that non-replaceable RRSIGs are logged only once (inactive private key) ($n)"
 ret=0
 loglines=`grep "Key inaczsk.example/NSEC3RSASHA1/$inactive .* retaining signatures" ns3/named.run | wc -l`
 [ "$loglines" -eq 1 ] || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 # Send rndc sync command to ns1, ns2 and ns3, to force the dynamically
 # signed zones to be dumped to their zone files
-echo "I:dumping zone files"
-$RNDC -c ../common/rndc.conf -s 10.53.0.1 -p 9953 sync 2>&1 | sed 's/^/I:ns1 /'
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 sync 2>&1 | sed 's/^/I:ns2 /'
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 sync 2>&1 | sed 's/^/I:ns3 /'
+echo_i "dumping zone files"
+$RNDCCMD 10.53.0.1 sync 2>&1 | sed 's/^/I:ns1 /'
+$RNDCCMD 10.53.0.2 sync 2>&1 | sed 's/^/I:ns2 /'
+$RNDCCMD 10.53.0.3 sync 2>&1 | sed 's/^/I:ns3 /'
 
-echo "I:checking expired signatures were updated ($n)"
+echo_i "checking expired signatures were updated ($n)"
 for i in 1 2 3 4 5 6 7 8 9
 do
        ret=0
@@ -320,11 +321,11 @@ do
        [ $ret = 0 ] && break
        sleep 1
 done
-if [ $ret != 0 ]; then cat digcomp.out.test$n; echo "I:failed"; fi
+if [ $ret != 0 ]; then cat digcomp.out.test$n; echo_i "failed"; fi
 n=`expr $n + 1`
 status=`expr $status + $ret`
 
-echo "I:checking NSEC->NSEC3 conversion succeeded ($n)"
+echo_i "checking NSEC->NSEC3 conversion succeeded ($n)"
 ret=0
 $DIG $DIGOPTS nsec3.example. nsec3param @10.53.0.3 > dig.out.ns3.ok.test$n || ret=1
 grep "status: NOERROR" dig.out.ns3.ok.test$n > /dev/null || ret=1
@@ -334,10 +335,10 @@ $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 grep "status: NXDOMAIN" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking direct NSEC3 autosigning succeeded ($n)"
+echo_i "checking direct NSEC3 autosigning succeeded ($n)"
 ret=0
 $DIG $DIGOPTS +noall +answer autonsec3.example. nsec3param @10.53.0.3 > dig.out.ns3.ok.test$n || ret=1
 [ -s  dig.out.ns3.ok.test$n ] || ret=1
@@ -348,17 +349,17 @@ $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 grep "status: NXDOMAIN" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking NSEC->NSEC3 conversion failed with NSEC-only key ($n)"
+echo_i "checking NSEC->NSEC3 conversion failed with NSEC-only key ($n)"
 ret=0
 grep "failed: REFUSED" nsupdate.out > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking NSEC3->NSEC conversion succeeded ($n)"
+echo_i "checking NSEC3->NSEC conversion succeeded ($n)"
 ret=0
 # this command should result in an empty file:
 $DIG $DIGOPTS +noall +answer nsec3-to-nsec.example. nsec3param @10.53.0.3 > dig.out.ns3.nx.test$n || ret=1
@@ -369,12 +370,12 @@ $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 grep "status: NXDOMAIN" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking NSEC3->NSEC conversion with 'rndc signing -nsec3param none' ($n)"
+echo_i "checking NSEC3->NSEC conversion with 'rndc signing -nsec3param none' ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing -nsec3param none autonsec3.example. > /dev/null 2>&1
+$RNDCCMD 10.53.0.3 signing -nsec3param none autonsec3.example. > /dev/null 2>&1
 sleep 2
 # this command should result in an empty file:
 $DIG $DIGOPTS +noall +answer autonsec3.example. nsec3param @10.53.0.3 > dig.out.ns3.nx.test$n || ret=1
@@ -385,56 +386,56 @@ $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 grep "status: NXDOMAIN" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking TTLs of imported DNSKEYs (no default) ($n)"
+echo_i "checking TTLs of imported DNSKEYs (no default) ($n)"
 ret=0
 $DIG $DIGOPTS +tcp +noall +answer dnskey ttl1.example. @10.53.0.3 > dig.out.ns3.test$n || ret=1
 [ -s dig.out.ns3.test$n ] || ret=1
 awk 'BEGIN {r=0} $2 != 300 {r=1; print "I:found TTL " $2} END {exit r}' dig.out.ns3.test$n || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking TTLs of imported DNSKEYs (with default) ($n)"
+echo_i "checking TTLs of imported DNSKEYs (with default) ($n)"
 ret=0
 $DIG $DIGOPTS +tcp +noall +answer dnskey ttl2.example. @10.53.0.3 > dig.out.ns3.test$n || ret=1
 [ -s dig.out.ns3.test$n ] || ret=1
 awk 'BEGIN {r=0} $2 != 60 {r=1; print "I:found TTL " $2} END {exit r}' dig.out.ns3.test$n || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking TTLs of imported DNSKEYs (mismatched) ($n)"
+echo_i "checking TTLs of imported DNSKEYs (mismatched) ($n)"
 ret=0
 $DIG $DIGOPTS +tcp +noall +answer dnskey ttl3.example. @10.53.0.3 > dig.out.ns3.test$n || ret=1
 [ -s dig.out.ns3.test$n ] || ret=1
 awk 'BEGIN {r=0} $2 != 30 {r=1; print "I:found TTL " $2} END {exit r}' dig.out.ns3.test$n || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking TTLs of imported DNSKEYs (existing RRset) ($n)"
+echo_i "checking TTLs of imported DNSKEYs (existing RRset) ($n)"
 ret=0
 $DIG $DIGOPTS +tcp +noall +answer dnskey ttl4.example. @10.53.0.3 > dig.out.ns3.test$n || ret=1
 [ -s dig.out.ns3.test$n ] || ret=1
 awk 'BEGIN {r=0} $2 != 30 {r=1; print "I:found TTL " $2} END {exit r}' dig.out.ns3.test$n || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking positive validation NSEC ($n)"
+echo_i "checking positive validation NSEC ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.example. @10.53.0.2 a > dig.out.ns2.test$n || ret=1
 $DIG $DIGOPTS +noauth a.example. @10.53.0.4 a > dig.out.ns4.test$n || ret=1
 $PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns4.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking positive validation NSEC3 ($n)"
+echo_i "checking positive validation NSEC3 ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.nsec3.example. \
        @10.53.0.3 a > dig.out.ns3.test$n || ret=1
@@ -443,10 +444,10 @@ $DIG $DIGOPTS +noauth a.nsec3.example. \
 $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking positive validation OPTOUT ($n)"
+echo_i "checking positive validation OPTOUT ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.optout.example. \
        @10.53.0.3 a > dig.out.ns3.test$n || ret=1
@@ -455,10 +456,10 @@ $DIG $DIGOPTS +noauth a.optout.example. \
 $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking negative validation NXDOMAIN NSEC ($n)"
+echo_i "checking negative validation NXDOMAIN NSEC ($n)"
 ret=0
 $DIG $DIGOPTS +noauth q.example. @10.53.0.2 a > dig.out.ns2.test$n || ret=1
 $DIG $DIGOPTS +noauth q.example. @10.53.0.4 a > dig.out.ns4.test$n || ret=1
@@ -466,10 +467,10 @@ $PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns4.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 grep "status: NXDOMAIN" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking negative validation NXDOMAIN NSEC3 ($n)"
+echo_i "checking negative validation NXDOMAIN NSEC3 ($n)"
 ret=0
 $DIG $DIGOPTS +noauth q.nsec3.example. \
        @10.53.0.3 a > dig.out.ns3.test$n || ret=1
@@ -479,10 +480,10 @@ $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 grep "status: NXDOMAIN" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking negative validation NXDOMAIN OPTOUT ($n)"
+echo_i "checking negative validation NXDOMAIN OPTOUT ($n)"
 ret=0
 $DIG $DIGOPTS +noauth q.optout.example. \
        @10.53.0.3 a > dig.out.ns3.test$n || ret=1
@@ -493,10 +494,10 @@ grep "status: NXDOMAIN" dig.out.ns4.test$n > /dev/null || ret=1
 # Note - this is looking for failure, hence the &&
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking negative validation NODATA NSEC ($n)"
+echo_i "checking negative validation NODATA NSEC ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.example. @10.53.0.2 txt > dig.out.ns2.test$n || ret=1
 $DIG $DIGOPTS +noauth a.example. @10.53.0.4 txt > dig.out.ns4.test$n || ret=1
@@ -505,10 +506,10 @@ grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "ANSWER: 0" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking negative validation NODATA NSEC3 ($n)"
+echo_i "checking negative validation NODATA NSEC3 ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.nsec3.example. \
        @10.53.0.3 txt > dig.out.ns3.test$n || ret=1
@@ -519,10 +520,10 @@ grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "ANSWER: 0" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking negative validation NODATA OPTOUT ($n)"
+echo_i "checking negative validation NODATA OPTOUT ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.optout.example. \
        @10.53.0.3 txt > dig.out.ns3.test$n || ret=1
@@ -533,12 +534,12 @@ grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "ANSWER: 0" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 # Check the insecure.example domain
 
-echo "I:checking 1-server insecurity proof NSEC ($n)"
+echo_i "checking 1-server insecurity proof NSEC ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.insecure.example. @10.53.0.3 a > dig.out.ns3.test$n || ret=1
 $DIG $DIGOPTS +noauth a.insecure.example. @10.53.0.4 a > dig.out.ns4.test$n || ret=1
@@ -547,10 +548,10 @@ grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 # Note - this is looking for failure, hence the &&
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking 1-server negative insecurity proof NSEC ($n)"
+echo_i "checking 1-server negative insecurity proof NSEC ($n)"
 ret=0
 $DIG $DIGOPTS q.insecure.example. a @10.53.0.3 \
        > dig.out.ns3.test$n || ret=1
@@ -561,12 +562,12 @@ grep "status: NXDOMAIN" dig.out.ns4.test$n > /dev/null || ret=1
 # Note - this is looking for failure, hence the &&
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 # Check the secure.example domain
 
-echo "I:checking multi-stage positive validation NSEC/NSEC ($n)"
+echo_i "checking multi-stage positive validation NSEC/NSEC ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.secure.example. \
        @10.53.0.3 a > dig.out.ns3.test$n || ret=1
@@ -576,10 +577,10 @@ $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking multi-stage positive validation NSEC/NSEC3 ($n)"
+echo_i "checking multi-stage positive validation NSEC/NSEC3 ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.nsec3.example. \
        @10.53.0.3 a > dig.out.ns3.test$n || ret=1
@@ -589,10 +590,10 @@ $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking multi-stage positive validation NSEC/OPTOUT ($n)"
+echo_i "checking multi-stage positive validation NSEC/OPTOUT ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.optout.example. \
        @10.53.0.3 a > dig.out.ns3.test$n || ret=1
@@ -602,10 +603,10 @@ $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking multi-stage positive validation NSEC3/NSEC ($n)"
+echo_i "checking multi-stage positive validation NSEC3/NSEC ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.secure.nsec3.example. \
        @10.53.0.3 a > dig.out.ns3.test$n || ret=1
@@ -615,10 +616,10 @@ $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking multi-stage positive validation NSEC3/NSEC3 ($n)"
+echo_i "checking multi-stage positive validation NSEC3/NSEC3 ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.nsec3.nsec3.example. \
        @10.53.0.3 a > dig.out.ns3.test$n || ret=1
@@ -628,10 +629,10 @@ $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking multi-stage positive validation NSEC3/OPTOUT ($n)"
+echo_i "checking multi-stage positive validation NSEC3/OPTOUT ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.optout.nsec3.example. \
        @10.53.0.3 a > dig.out.ns3.test$n || ret=1
@@ -641,10 +642,10 @@ $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking multi-stage positive validation OPTOUT/NSEC ($n)"
+echo_i "checking multi-stage positive validation OPTOUT/NSEC ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.secure.optout.example. \
        @10.53.0.3 a > dig.out.ns3.test$n || ret=1
@@ -654,10 +655,10 @@ $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking multi-stage positive validation OPTOUT/NSEC3 ($n)"
+echo_i "checking multi-stage positive validation OPTOUT/NSEC3 ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.nsec3.optout.example. \
        @10.53.0.3 a > dig.out.ns3.test$n || ret=1
@@ -667,10 +668,10 @@ $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking multi-stage positive validation OPTOUT/OPTOUT ($n)"
+echo_i "checking multi-stage positive validation OPTOUT/OPTOUT ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.optout.optout.example. \
        @10.53.0.3 a > dig.out.ns3.test$n || ret=1
@@ -680,10 +681,10 @@ $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking empty NODATA OPTOUT ($n)"
+echo_i "checking empty NODATA OPTOUT ($n)"
 ret=0
 $DIG $DIGOPTS +noauth empty.optout.example. \
        @10.53.0.3 a > dig.out.ns3.test$n || ret=1
@@ -693,12 +694,12 @@ $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 #grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 # Check the insecure.secure.example domain (insecurity proof)
 
-echo "I:checking 2-server insecurity proof ($n)"
+echo_i "checking 2-server insecurity proof ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.insecure.secure.example. @10.53.0.2 a \
        > dig.out.ns2.test$n || ret=1
@@ -709,12 +710,12 @@ grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 # Note - this is looking for failure, hence the &&
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 # Check a negative response in insecure.secure.example
 
-echo "I:checking 2-server insecurity proof with a negative answer ($n)"
+echo_i "checking 2-server insecurity proof with a negative answer ($n)"
 ret=0
 $DIG $DIGOPTS q.insecure.secure.example. @10.53.0.2 a > dig.out.ns2.test$n \
        || ret=1
@@ -725,39 +726,39 @@ grep "status: NXDOMAIN" dig.out.ns4.test$n > /dev/null || ret=1
 # Note - this is looking for failure, hence the &&
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking security root query ($n)"
+echo_i "checking security root query ($n)"
 ret=0
 $DIG $DIGOPTS . @10.53.0.4 key > dig.out.ns4.test$n || ret=1
 grep "NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking positive validation RSASHA256 NSEC ($n)"
+echo_i "checking positive validation RSASHA256 NSEC ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.rsasha256.example. @10.53.0.3 a > dig.out.ns3.test$n || ret=1
 $DIG $DIGOPTS +noauth a.rsasha256.example. @10.53.0.4 a > dig.out.ns4.test$n || ret=1
 $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking positive validation RSASHA512 NSEC ($n)"
+echo_i "checking positive validation RSASHA512 NSEC ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.rsasha512.example. @10.53.0.3 a > dig.out.ns3.test$n || ret=1
 $DIG $DIGOPTS +noauth a.rsasha512.example. @10.53.0.4 a > dig.out.ns4.test$n || ret=1
 $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that positive validation in a privately secure zone works ($n)"
+echo_i "checking that positive validation in a privately secure zone works ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.private.secure.example. a @10.53.0.2 \
        > dig.out.ns2.test$n || ret=1
@@ -768,10 +769,10 @@ grep "NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 # Note - this is looking for failure, hence the &&
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that negative validation in a privately secure zone works ($n)"
+echo_i "checking that negative validation in a privately secure zone works ($n)"
 ret=0
 $DIG $DIGOPTS +noauth q.private.secure.example. a @10.53.0.2 \
        > dig.out.ns2.test$n || ret=1
@@ -782,10 +783,10 @@ grep "NXDOMAIN" dig.out.ns4.test$n > /dev/null || ret=1
 # Note - this is looking for failure, hence the &&
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking privately secure to nxdomain works ($n)"
+echo_i "checking privately secure to nxdomain works ($n)"
 ret=0
 $DIG $DIGOPTS +noauth private2secure-nxdomain.private.secure.example. SOA @10.53.0.2 \
        > dig.out.ns2.test$n || ret=1
@@ -795,82 +796,82 @@ $PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns4.test$n || ret=1
 # Note - this is looking for failure, hence the &&
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 # Try validating with a revoked trusted key.
 # This should fail.
 
-echo "I:checking that validation returns insecure due to revoked trusted key ($n)"
+echo_i "checking that validation returns insecure due to revoked trusted key ($n)"
 ret=0
 $DIG $DIGOPTS example. soa @10.53.0.5 > dig.out.ns5.test$n || ret=1
 grep "flags:.*; QUERY" dig.out.ns5.test$n > /dev/null || ret=1
 grep "flags:.* ad.*; QUERY" dig.out.ns5.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that revoked key is present ($n)"
+echo_i "checking that revoked key is present ($n)"
 ret=0
 id=`cat rev.key`
 $DIG $DIGOPTS +multi dnskey . @10.53.0.1 > dig.out.ns1.test$n || ret=1
 grep '; key id = '"$id"'$' dig.out.ns1.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that revoked key self-signs ($n)"
+echo_i "checking that revoked key self-signs ($n)"
 ret=0
 id=`cat rev.key`
 $DIG $DIGOPTS dnskey . @10.53.0.1 > dig.out.ns1.test$n || ret=1
 grep 'RRSIG.*'" $id "'\. ' dig.out.ns1.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking for unpublished key ($n)"
+echo_i "checking for unpublished key ($n)"
 ret=0
 id=`sed 's/^K.+007+0*\([0-9]\)/\1/' < unpub.key`
 $DIG $DIGOPTS +multi dnskey . @10.53.0.1 > dig.out.ns1.test$n || ret=1
 grep '; key id = '"$id"'$' dig.out.ns1.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking for activated but unpublished key ($n)"
+echo_i "checking for activated but unpublished key ($n)"
 ret=0
 id=`sed 's/^K.+007+0*\([0-9]\)/\1/' < activate-now-publish-1day.key`
 $DIG $DIGOPTS +multi dnskey . @10.53.0.1 > dig.out.ns1.test$n || ret=1
 grep '; key id = '"$id"'$' dig.out.ns1.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that standby key does not sign records ($n)"
+echo_i "checking that standby key does not sign records ($n)"
 ret=0
 id=`sed 's/^K.+007+0*\([0-9]\)/\1/' < standby.key`
 $DIG $DIGOPTS dnskey . @10.53.0.1 > dig.out.ns1.test$n || ret=1
 grep 'RRSIG.*'" $id "'\. ' dig.out.ns1.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that deactivated key does not sign records  ($n)"
+echo_i "checking that deactivated key does not sign records  ($n)"
 ret=0
 id=`sed 's/^K.+007+0*\([0-9]\)/\1/' < inact.key`
 $DIG $DIGOPTS dnskey . @10.53.0.1 > dig.out.ns1.test$n || ret=1
 grep 'RRSIG.*'" $id "'\. ' dig.out.ns1.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking insertion of public-only key ($n)"
+echo_i "checking insertion of public-only key ($n)"
 ret=0
 id=`sed 's/^K.+007+0*\([0-9]\)/\1/' < nopriv.key`
 file="ns1/`cat nopriv.key`.key"
 keydata=`grep DNSKEY $file`
 $NSUPDATE > /dev/null 2>&1 <<END       || status=1
-server 10.53.0.1 5300
+server 10.53.0.1 ${PORT}
 zone .
 ttl 3600
 update add $keydata
@@ -880,22 +881,22 @@ sleep 1
 $DIG $DIGOPTS dnskey . @10.53.0.1 > dig.out.ns1.test$n || ret=1
 grep 'RRSIG.*'" $id "'\. ' dig.out.ns1.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking key deletion ($n)"
+echo_i "checking key deletion ($n)"
 ret=0
 id=`sed 's/^K.+007+0*\([0-9]\)/\1/' < del.key`
 $DIG $DIGOPTS +multi dnskey . @10.53.0.1 > dig.out.ns1.test$n || ret=1
 grep '; key id = '"$id"'$' dig.out.ns1.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking secure-to-insecure transition, nsupdate ($n)"
+echo_i "checking secure-to-insecure transition, nsupdate ($n)"
 ret=0
 $NSUPDATE > /dev/null 2>&1 <<END       || status=1
-server 10.53.0.3 5300
+server 10.53.0.3 ${PORT}
 zone secure-to-insecure.example
 update delete secure-to-insecure.example dnskey
 send
@@ -905,40 +906,40 @@ for i in 0 1 2 3 4 5 6 7 8 9; do
        $DIG $DIGOPTS axfr secure-to-insecure.example @10.53.0.3 > dig.out.ns3.test$n || ret=1
        egrep '(RRSIG|DNSKEY|NSEC)' dig.out.ns3.test$n > /dev/null && ret=1
        [ $ret -eq 0 ] && break
-       echo "I:waiting ... ($i)"
+       echo_i "waiting ... ($i)"
        sleep 2
 done
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking secure-to-insecure transition, scheduled ($n)"
+echo_i "checking secure-to-insecure transition, scheduled ($n)"
 ret=0
 file="ns3/`cat del1.key`.key"
 $SETTIME -I now -D now $file > /dev/null
 file="ns3/`cat del2.key`.key"
 $SETTIME -I now -D now $file > /dev/null
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 sign secure-to-insecure2.example. 2>&1 | sed 's/^/I:ns3 /'
+$RNDCCMD 10.53.0.3 sign secure-to-insecure2.example. 2>&1 | sed 's/^/I:ns3 /'
 for i in 0 1 2 3 4 5 6 7 8 9; do
        ret=0
        $DIG $DIGOPTS axfr secure-to-insecure2.example @10.53.0.3 > dig.out.ns3.test$n || ret=1
        egrep '(RRSIG|DNSKEY|NSEC3)' dig.out.ns3.test$n > /dev/null && ret=1
        [ $ret -eq 0 ] && break
-       echo "I:waiting ... ($i)"
+       echo_i "waiting ... ($i)"
        sleep 2
 done
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that serial number and RRSIGs are both updated (rt21045) ($n)"
+echo_i "checking that serial number and RRSIGs are both updated (rt21045) ($n)"
 ret=0
 oldserial=`$DIG $DIGOPTS +short soa prepub.example @10.53.0.3 | awk '$0 !~ /SOA/ {print $3}'`
 oldinception=`$DIG $DIGOPTS +short soa prepub.example @10.53.0.3 | awk '/SOA/ {print $6}' | sort -u`
 
 $KEYGEN -3 -q -r $RANDFILE -K ns3 -P 0 -A +6d -I +38d -D +45d prepub.example > /dev/null
 
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 sign prepub.example 2>&1 | sed 's/^/I:ns1 /'
+$RNDCCMD 10.53.0.3 sign prepub.example 2>&1 | sed 's/^/I:ns1 /'
 newserial=$oldserial
 try=0
 while [ $oldserial -eq $newserial -a $try -lt 42 ]
@@ -955,15 +956,15 @@ newinception=`$DIG $DIGOPTS +short soa prepub.example @10.53.0.3 | awk '/SOA/ {p
 [ "$oldserial" = "$newserial" ] && ret=1
 [ "$oldinception" = "$newinception" ] && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:preparing to test key change corner cases"
-echo "I:removing a private key file"
+echo_i "preparing to test key change corner cases"
+echo_i "removing a private key file"
 file="ns1/`cat vanishing.key`.private"
 rm -f $file
 
-echo "I:preparing ZSK roll"
+echo_i "preparing ZSK roll"
 starttime=`$PERL -e 'print time(), "\n";'`
 oldfile=`cat active.key`
 oldid=`sed 's/^K.+007+0*\([0-9]\)/\1/' < active.key`
@@ -975,35 +976,35 @@ $SETTIME -K ns1 -i 0 -S $oldfile $newfile > /dev/null
 # note previous zone serial number
 oldserial=`$DIG $DIGOPTS +short soa . @10.53.0.1 | awk '{print $3}'`
 
-$RNDC -c ../common/rndc.conf -s 10.53.0.1 -p 9953 loadkeys . 2>&1 | sed 's/^/I:ns1 /'
+$RNDCCMD 10.53.0.1 loadkeys . 2>&1 | sed 's/^/I:ns1 /'
 sleep 4
 
-echo "I:revoking key to duplicated key ID"
+echo_i "revoking key to duplicated key ID"
 $SETTIME -R now -K ns2 Kbar.+005+30676.key > /dev/null
 
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 loadkeys bar. 2>&1 | sed 's/^/I:ns2 /'
+$RNDCCMD 10.53.0.2 loadkeys bar. 2>&1 | sed 's/^/I:ns2 /'
 
-echo "I:waiting for changes to take effect"
+echo_i "waiting for changes to take effect"
 sleep 5
 
-echo "I:checking former standby key is now active ($n)"
+echo_i "checking former standby key is now active ($n)"
 ret=0
 $DIG $DIGOPTS dnskey . @10.53.0.1 > dig.out.ns1.test$n || ret=1
 grep 'RRSIG.*'" $newid "'\. ' dig.out.ns1.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking former standby key has only signed incrementally ($n)"
+echo_i "checking former standby key has only signed incrementally ($n)"
 ret=0
 $DIG $DIGOPTS txt . @10.53.0.1 > dig.out.ns1.test$n || ret=1
 grep 'RRSIG.*'" $newid "'\. ' dig.out.ns1.test$n > /dev/null && ret=1
 grep 'RRSIG.*'" $oldid "'\. ' dig.out.ns1.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that signing records have been marked as complete ($n)"
+echo_i "checking that signing records have been marked as complete ($n)"
 ret=0
 checkprivate . 10.53.0.1 || ret=1
 checkprivate bar 10.53.0.2 || ret=1
@@ -1033,29 +1034,29 @@ checkprivate ttl4.example 10.53.0.3 || ret=1
 n=`expr $n + 1`
 status=`expr $status + $ret`
 
-echo "I:forcing full sign"
-$RNDC -c ../common/rndc.conf -s 10.53.0.1 -p 9953 sign . 2>&1 | sed 's/^/I:ns1 /'
+echo_i "forcing full sign"
+$RNDCCMD 10.53.0.1 sign . 2>&1 | sed 's/^/I:ns1 /'
 
-echo "I:waiting for change to take effect"
+echo_i "waiting for change to take effect"
 sleep 5
 
-echo "I:checking former standby key has now signed fully ($n)"
+echo_i "checking former standby key has now signed fully ($n)"
 ret=0
 $DIG $DIGOPTS txt . @10.53.0.1 > dig.out.ns1.test$n || ret=1
 grep 'RRSIG.*'" $newid "'\. ' dig.out.ns1.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking SOA serial number has been incremented ($n)"
+echo_i "checking SOA serial number has been incremented ($n)"
 ret=0
 newserial=`$DIG $DIGOPTS +short soa . @10.53.0.1 | awk '{print $3}'`
 [ "$newserial" != "$oldserial" ] || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking delayed key publication/activation ($n)"
+echo_i "checking delayed key publication/activation ($n)"
 ret=0
 zsk=`cat delayzsk.key`
 ksk=`cat delayksk.key`
@@ -1066,16 +1067,16 @@ $DIG $DIGOPTS +noall +answer dnskey delay.example. @10.53.0.3 > dig.out.ns3.test
 # DNSKEY not expected:
 awk 'BEGIN {r=1} $4=="DNSKEY" {r=0} END {exit r}' dig.out.ns3.test$n && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking scheduled key publication, not activation ($n)"
+echo_i "checking scheduled key publication, not activation ($n)"
 ret=0
 $SETTIME -K ns3 -P now+3s -A none $zsk > /dev/null 2>&1
 $SETTIME -K ns3 -P now+3s -A none $ksk > /dev/null 2>&1
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 loadkeys delay.example. 2>&1 | sed 's/^/I:ns2 /'
+$RNDCCMD 10.53.0.3 loadkeys delay.example. 2>&1 | sed 's/^/I:ns2 /'
 
-echo "I:waiting for changes to take effect"
+echo_i "waiting for changes to take effect"
 sleep 5
 
 $DIG $DIGOPTS +noall +answer dnskey delay.example. @10.53.0.3 > dig.out.ns3.test$n || ret=1
@@ -1084,16 +1085,16 @@ awk 'BEGIN {r=1} $4=="DNSKEY" {r=0} END {exit r}' dig.out.ns3.test$n || ret=1
 # RRSIG not expected:
 awk 'BEGIN {r=1} $4=="RRSIG" {r=0} END {exit r}' dig.out.ns3.test$n && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking scheduled key activation ($n)"
+echo_i "checking scheduled key activation ($n)"
 ret=0
 $SETTIME -K ns3 -A now+3s $zsk > /dev/null 2>&1
 $SETTIME -K ns3 -A now+3s $ksk > /dev/null 2>&1
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 loadkeys delay.example. 2>&1 | sed 's/^/I:ns2 /'
+$RNDCCMD 10.53.0.3 loadkeys delay.example. 2>&1 | sed 's/^/I:ns2 /'
 
-echo "I:waiting for changes to take effect"
+echo_i "waiting for changes to take effect"
 sleep 5
 
 $DIG $DIGOPTS +noall +answer dnskey delay.example. @10.53.0.3 > dig.out.ns3.1.test$n || ret=1
@@ -1107,10 +1108,10 @@ awk 'BEGIN {r=1} $4=="A" {r=0} END {exit r}' dig.out.ns3.2.test$n || ret=1
 # RRSIG expected:
 awk 'BEGIN {r=1} $4=="RRSIG" {r=0} END {exit r}' dig.out.ns3.2.test$n || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking former active key was removed ($n)"
+echo_i "checking former active key was removed ($n)"
 #
 # Work out how long we need to sleep. Allow 4 seconds for the records
 # to be removed.
@@ -1119,25 +1120,25 @@ now=`$PERL -e 'print time(), "\n";'`
 sleep=`expr $starttime + 29 - $now`
 case $sleep in
 -*|0);;
-*) echo "I:waiting for timer to have activated"; sleep $sleep;;
+*) echo_i "waiting for timer to have activated"; sleep $sleep;;
 esac
 ret=0
 $DIG $DIGOPTS +multi dnskey . @10.53.0.1 > dig.out.ns1.test$n || ret=1
 grep '; key id = '"$oldid"'$' dig.out.ns1.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking private key file removal caused no immediate harm ($n)"
+echo_i "checking private key file removal caused no immediate harm ($n)"
 ret=0
 id=`sed 's/^K.+007+0*\([0-9]\)/\1/' < vanishing.key`
 $DIG $DIGOPTS dnskey . @10.53.0.1 > dig.out.ns1.test$n || ret=1
 grep 'RRSIG.*'" $id "'\. ' dig.out.ns1.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking revoked key with duplicate key ID (failure expected) ($n)"
+echo_i "checking revoked key with duplicate key ID (failure expected) ($n)"
 lret=0
 id=30676
 $DIG $DIGOPTS +multi dnskey bar @10.53.0.2 > dig.out.ns2.test$n || lret=1
@@ -1145,15 +1146,15 @@ grep '; key id = '"$id"'$' dig.out.ns2.test$n > /dev/null || lret=1
 $DIG $DIGOPTS dnskey bar @10.53.0.4 > dig.out.ns4.test$n || lret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || lret=1
 n=`expr $n + 1`
-if [ $lret != 0 ]; then echo "I:not yet implemented"; fi
+if [ $lret != 0 ]; then echo_i "not yet implemented"; fi
 
-echo "I:checking key event timers are always set ($n)"
+echo_i "checking key event timers are always set ($n)"
 # this is a regression test for a bug in which the next key event could
 # be scheduled for the present moment, and then never fire.  check for
 # visible evidence of this error in the logs:
 awk '/next key event/ {if ($1 == $8 && $2 == $9) exit 1}' */named.run || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 # this confirms that key events are never scheduled more than
@@ -1183,60 +1184,59 @@ check_interval () {
         return $?
 }
 
-echo "I:checking automatic key reloading interval ($n)"
+echo_i "checking automatic key reloading interval ($n)"
 ret=0
 check_interval ns1 3600 || ret=1
 check_interval ns2 1800 || ret=1
 check_interval ns3 600 || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking for key reloading loops ($n)"
+echo_i "checking for key reloading loops ($n)"
 ret=0
 # every key event should schedule a successor, so these should be equal
 rekey_calls=`grep "reconfiguring zone keys" ns*/named.run | wc -l`
 rekey_events=`grep "next key event" ns*/named.run | wc -l`
 [ "$rekey_calls" = "$rekey_events" ] || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:forcing full sign with unreadable keys ($n)"
+echo_i "forcing full sign with unreadable keys ($n)"
 ret=0
 chmod 0 ns1/K.+*+*.key ns1/K.+*+*.private || ret=1
-$RNDC -c ../common/rndc.conf -s 10.53.0.1 -p 9953 sign . 2>&1 | sed 's/^/I:ns1 /'
+$RNDCCMD 10.53.0.1 sign . 2>&1 | sed 's/^/I:ns1 /'
 $DIG $DIGOPTS . @10.53.0.1 dnskey > dig.out.ns1.test$n || ret=1
 grep "status: NOERROR" dig.out.ns1.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:test turning on auto-dnssec during reconfig ($n)"
+echo_i "test turning on auto-dnssec during reconfig ($n)"
 ret=0
 # first create a zone that doesn't have auto-dnssec
-rm -f ns3/*.nzf
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 addzone reconf.example '{ type master; file "reconf.example.db"; };' 2>&1 | sed 's/^/I:ns3 /'
+$RNDCCMD 10.53.0.3 addzone reconf.example '{ type master; file "reconf.example.db"; };' 2>&1 | sed 's/^/I:ns3 /'
 rekey_calls=`grep "zone reconf.example.*next key event" ns3/named.run | wc -l`
 [ "$rekey_calls" -eq 0 ] || ret=1
 # ...then we add auto-dnssec and reconfigure
 nzf=`ls ns3/*.nzf`
-echo 'zone reconf.example { type master; file "reconf.example.db"; allow-update { any; }; auto-dnssec maintain; };' > $nzf
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 reconfig 2>&1 | sed 's/^/I:ns3 /'
+$RNDCCMD 10.53.0.3 modzone reconf.example '{ type master; file "reconf.example.db"; allow-update { any; }; auto-dnssec maintain; };' > $nzf
+$RNDCCMD 10.53.0.3 reconfig 2>&1 | sed 's/^/I:ns3 /'
 for i in 0 1 2 3 4 5 6 7 8 9; do
     lret=0
     rekey_calls=`grep "zone reconf.example.*next key event" ns3/named.run | wc -l`
     [ "$rekey_calls" -gt 0 ] || lret=1
     if [ "$lret" -eq 0 ]; then break; fi
-    echo "I:waiting ... ($i)"
+    echo_i "waiting ... ($i)"
     sleep 1
 done
 n=`expr $n + 1`
 if [ "$lret" != 0 ]; then ret=$lret; fi
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that zone with inactive KSK and active ZSK is properly autosigned ($n)"
+echo_i "check that zone with inactive KSK and active ZSK is properly autosigned ($n)"
 ret=0
 $DIG  $DIGOPTS @10.53.0.3 axfr inacksk2.example > dig.out.ns3.test$n
 
@@ -1251,23 +1251,23 @@ pattern="DNSKEY 7 2 [0-9]* [0-9]* [0-9]* ${kskid} "
 grep "${pattern}" dig.out.ns3.test$n > /dev/null && ret=1
 
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that zone with inactive ZSK and active KSK is properly autosigned ($n)"
+echo_i "check that zone with inactive ZSK and active KSK is properly autosigned ($n)"
 ret=0
 $DIG  $DIGOPTS @10.53.0.3 axfr inaczsk2.example > dig.out.ns3.test$n
 grep "SOA 7 2" dig.out.ns3.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 #
 # Check that DNSKEY is now signed with the ZSK.
 #
-echo "I:check that zone with active and inactive KSK and active ZSK is properly"
-echo "I:  resigned after the active KSK is deleted - stage 2: Verify that DNSKEY"
-echo "I:  is now signed with the ZSK. ($n)"
+echo_i "check that zone with active and inactive KSK and active ZSK is properly"
+echo_i "  resigned after the active KSK is deleted - stage 2: Verify that DNSKEY"
+echo_i "  is now signed with the ZSK. ($n)"
 ret=0
 
 $DIG  $DIGOPTS @10.53.0.3 axfr inacksk3.example > dig.out.ns3.test$n
@@ -1288,15 +1288,15 @@ count=`awk 'BEGIN { count = 0 }
 test $count -eq 2 || ret=1
 
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 #
 # Check that zone is now signed with the KSK.
 #
-echo "I:check that zone with active and inactive ZSK and active KSK is properly"
-echo "I:  resigned after the active ZSK is deleted - stage 2: Verify that zone"
-echo "I:  is now signed with the KSK. ($n)"
+echo_i "check that zone with active and inactive ZSK and active KSK is properly"
+echo_i "  resigned after the active ZSK is deleted - stage 2: Verify that zone"
+echo_i "  is now signed with the KSK. ($n)"
 ret=0
 $DIG  $DIGOPTS @10.53.0.3 axfr inaczsk3.example > dig.out.ns3.test$n
 kskid=`awk '$4 == "DNSKEY" && $5 == 257 { print }' dig.out.ns3.test$n |
@@ -1311,8 +1311,8 @@ count=`awk 'BEGIN { count = 0 }
        END {print count}' dig.out.ns3.test$n`
 test $count -eq 2 || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index 352d096aa371bfe67ca6c9009ed15362ebec9b58..7bce09475144514d4bd3b61580272e12a6c3a5eb 100644 (file)
@@ -16,5 +16,6 @@
 
 rm -f ns?/named.run
 rm -f ns?/named.memstats
+rm -f ns?/named.conf
 rm -f rndc.status.ns*
 rm -f dig.out.ns*
similarity index 87%
rename from bin/tests/system/builtin/ns1/named.conf
rename to bin/tests/system/builtin/ns1/named.conf.in
index 3656d7362d30ac52028fba8a9ff1f4c148172cc7..9a6ed7323dbd81c81c2eed83f9cde90954e8b521 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.3 2011/08/09 04:12:25 tbox Exp $ */
-
 include "../../common/rndc.key";
 
-controls { inet 10.53.0.1 port 9953 allow { any; } keys { rndc_key; }; };
+controls {
+       inet 10.53.0.1 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
+};
 
 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 87%
rename from bin/tests/system/builtin/ns2/named.conf
rename to bin/tests/system/builtin/ns2/named.conf.in
index 49feac5388a1aada03b73cc901176c0fe32d1f4b..46129f24e49668d0e8f99a1726ad6575bc8f3ee4 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.3 2011/08/09 04:12:25 tbox Exp $ */
-
 include "../../common/rndc.key";
 
-controls { inet 10.53.0.2 port 9953 allow { any; } keys { rndc_key; }; };
+controls {
+       inet 10.53.0.2 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
+};
 
 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 88%
rename from bin/tests/system/builtin/ns3/named.conf
rename to bin/tests/system/builtin/ns3/named.conf.in
index 30e21d4ce0f6e5d636607d48959f530ed1541ee3..2b53bdadb25366b48dbdb02a54849493d6e73ab7 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.3 2011/08/09 04:12:25 tbox Exp $ */
-
 include "../../common/rndc.key";
 
-controls { inet 10.53.0.3 port 9953 allow { any; } keys { rndc_key; }; };
+controls {
+       inet 10.53.0.3 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
+};
 
 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/builtin/setup.sh b/bin/tests/system/builtin/setup.sh
new file mode 100644 (file)
index 0000000..08a9c49
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# Copyright (C) 2018  Internet Systems Consortium, Inc. ("ISC")
+#
+# 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 http://mozilla.org/MPL/2.0/.
+
+SYSTEMTESTTOP=..
+. $SYSTEMTESTTOP/conf.sh
+
+$SHELL clean.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 8053a6977ffddd59743c4f9ca0b138b11ef66292..f33f28e689fe6c001b20217d717a5a194e077024 100644 (file)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: tests.sh,v 1.3 2011/08/09 04:12:25 tbox Exp $
-
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
+DIGOPTS="-p ${PORT}"
+RNDCCMD="$RNDC -c $SYSTEMTESTTOP/common/rndc.conf -p ${CONTROLPORT} -s"
+
 status=0
 n=0
 
 n=`expr $n + 1`
-echo "I:Checking that reconfiguring empty zones is silent ($n)"
-$RNDC -c ../common/rndc.conf -s 10.53.0.1 -p 9953 reconfig
+echo_i "Checking that reconfiguring empty zones is silent ($n)"
+$RNDCCMD 10.53.0.1 reconfig
 ret=0
 grep "automatic empty zone" ns1/named.run > /dev/null || ret=1
 grep "received control channel command 'reconfig'" ns1/named.run > /dev/null || ret=1
 grep "reloading configuration succeeded" ns1/named.run > /dev/null || ret=1
 sleep 1
 grep "zone serial (0) unchanged." ns1/named.run > /dev/null && ret=1
-if [ $ret != 0 ] ; then echo I:failed; status=`expr $status + $ret`; fi
+if [ $ret != 0 ] ; then echo_i "failed; status=`expr $status + $ret`"; fi
 
 n=`expr $n + 1`
-echo "I:Checking that reloading empty zones is silent ($n)"
-$RNDC -c ../common/rndc.conf -s 10.53.0.1 -p 9953 reload > /dev/null
+echo_i "Checking that reloading empty zones is silent ($n)"
+$RNDCCMD 10.53.0.1 reload > /dev/null
 ret=0
 grep "automatic empty zone" ns1/named.run > /dev/null || ret=1
 grep "received control channel command 'reload'" ns1/named.run > /dev/null || ret=1
 grep "reloading configuration succeeded" ns1/named.run > /dev/null || ret=1
 sleep 1
 grep "zone serial (0) unchanged." ns1/named.run > /dev/null && ret=1
-if [ $ret != 0 ] ; then echo I:failed; status=`expr $status + $ret`; fi
+if [ $ret != 0 ] ; then echo_i "failed; status=`expr $status + $ret`"; fi
 
 VERSION=`../../../../isc-config.sh  --version | cut -d = -f 2`
 HOSTNAME=`$FEATURETEST --gethostname`
@@ -48,81 +49,81 @@ NSID=`$FEATURETEST --gethostname | sed -e 's/\(.\)/(\1)/g' -e 's/)(/) (/g'`
 
 n=`expr $n + 1`
 ret=0
-echo "I:Checking that default version works for rndc ($n)"
-$RNDC -c ../common/rndc.conf -s 10.53.0.1 -p 9953 status > rndc.status.ns1.$n 2>&1
+echo_i "Checking that default version works for rndc ($n)"
+$RNDCCMD 10.53.0.1 status > rndc.status.ns1.$n 2>&1
 grep "^version: BIND $VERSION " rndc.status.ns1.$n > /dev/null || ret=1
-if [ $ret != 0 ] ; then echo I:failed; status=`expr $status + $ret`; fi
+if [ $ret != 0 ] ; then echo_i "failed; status=`expr $status + $ret`"; fi
 
 n=`expr $n + 1`
 ret=0
-echo "I:Checking that custom version works for rndc ($n)"
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 status > rndc.status.ns3.$n 2>&1
+echo_i "Checking that custom version works for rndc ($n)"
+$RNDCCMD 10.53.0.3 status > rndc.status.ns3.$n 2>&1
 grep "^version: BIND $VERSION ${DESCRIPTION}${DESCRIPTION:+ }<id:........*> (this is a test of version)" rndc.status.ns3.$n > /dev/null || ret=1
-if [ $ret != 0 ] ; then echo I:failed; status=`expr $status + $ret`; fi
+if [ $ret != 0 ] ; then echo_i "failed; status=`expr $status + $ret`"; fi
 
 n=`expr $n + 1`
 ret=0
-echo "I:Checking that default version works for query ($n)"
-$DIG +short version.bind txt ch @10.53.0.1 -p 5300 > dig.out.ns1.$n
+echo_i "Checking that default version works for query ($n)"
+$DIG $DIGOPTS +short version.bind txt ch @10.53.0.1 > dig.out.ns1.$n
 grep "^\"$VERSION\"$" dig.out.ns1.$n > /dev/null || ret=1
-if [ $ret != 0 ] ; then echo I:failed; status=`expr $status + $ret`; fi
+if [ $ret != 0 ] ; then echo_i "failed; status=`expr $status + $ret`"; fi
 
 n=`expr $n + 1`
 ret=0
-echo "I:Checking that custom version works for query ($n)"
-$DIG +short version.bind txt ch @10.53.0.3 -p 5300 > dig.out.ns3.$n
+echo_i "Checking that custom version works for query ($n)"
+$DIG $DIGOPTS +short version.bind txt ch @10.53.0.3 > dig.out.ns3.$n
 grep "^\"this is a test of version\"$" dig.out.ns3.$n > /dev/null || ret=1
-if [ $ret != 0 ] ; then echo I:failed; status=`expr $status + $ret`; fi
+if [ $ret != 0 ] ; then echo_i "failed; status=`expr $status + $ret`"; fi
 
 n=`expr $n + 1`
 ret=0
-echo "I:Checking that default hostname works for query ($n)"
-$DIG +short hostname.bind txt ch @10.53.0.1 -p 5300 > dig.out.ns1.$n
+echo_i "Checking that default hostname works for query ($n)"
+$DIG $DIGOPTS +short hostname.bind txt ch @10.53.0.1 > dig.out.ns1.$n
 grep "^\"$HOSTNAME\"$" dig.out.ns1.$n > /dev/null || ret=1
-if [ $ret != 0 ] ; then echo I:failed; status=`expr $status + $ret`; fi
+if [ $ret != 0 ] ; then echo_i "failed; status=`expr $status + $ret`"; fi
 
 n=`expr $n + 1`
 ret=0
-echo "I:Checking that custom hostname works for query ($n)"
-$DIG +short hostname.bind txt ch @10.53.0.3 -p 5300 > dig.out.ns3.$n
+echo_i "Checking that custom hostname works for query ($n)"
+$DIG $DIGOPTS +short hostname.bind txt ch @10.53.0.3 > dig.out.ns3.$n
 grep "^\"this.is.a.test.of.hostname\"$" dig.out.ns3.$n > /dev/null || ret=1
-if [ $ret != 0 ] ; then echo I:failed; status=`expr $status + $ret`; fi
+if [ $ret != 0 ] ; then echo_i "failed; status=`expr $status + $ret`"; fi
 
 n=`expr $n + 1`
 ret=0
-echo "I:Checking that default server-id is none for query ($n)"
-$DIG id.server txt ch @10.53.0.1 -p 5300 > dig.out.ns1.$n
+echo_i "Checking that default server-id is none for query ($n)"
+$DIG $DIGOPTS id.server txt ch @10.53.0.1 > dig.out.ns1.$n
 grep "status: NOERROR" dig.out.ns1.$n > /dev/null || ret=1
 grep "ANSWER: 0" dig.out.ns1.$n > /dev/null || ret=1
-if [ $ret != 0 ] ; then echo I:failed; status=`expr $status + $ret`; fi
+if [ $ret != 0 ] ; then echo_i "failed; status=`expr $status + $ret`"; fi
 
 n=`expr $n + 1`
 ret=0
-echo "I:Checking that server-id hostname works for query ($n)"
-$DIG +short id.server txt ch @10.53.0.2 -p 5300 > dig.out.ns2.$n
+echo_i "Checking that server-id hostname works for query ($n)"
+$DIG $DIGOPTS +short id.server txt ch @10.53.0.2 > dig.out.ns2.$n
 grep "^\"$HOSTNAME\"$" dig.out.ns2.$n > /dev/null || ret=1
-if [ $ret != 0 ] ; then echo I:failed; status=`expr $status + $ret`; fi
+if [ $ret != 0 ] ; then echo_i "failed; status=`expr $status + $ret`"; fi
 
 n=`expr $n + 1`
 ret=0
-echo "I:Checking that server-id hostname works for EDNS name server ID request ($n)"
-$DIG +norec +nsid foo @10.53.0.2 -p 5300 > dig.out.ns2.$n
+echo_i "Checking that server-id hostname works for EDNS name server ID request ($n)"
+$DIG $DIGOPTS +norec +nsid foo @10.53.0.2 > dig.out.ns2.$n
 grep "^; NSID: .* $NSID" dig.out.ns2.$n > /dev/null || ret=1
-if [ $ret != 0 ] ; then echo I:failed; status=`expr $status + $ret`; fi
+if [ $ret != 0 ] ; then echo_i "failed; status=`expr $status + $ret`; fi
 
 n=`expr $n + 1`
 ret=0
-echo "I:Checking that custom server-id works for query ($n)"
-$DIG +short id.server txt ch @10.53.0.3 -p 5300 > dig.out.ns3.$n
+echo_i "Checking that custom server-id works for query ($n)"
+$DIG $DIGOPTS +short id.server txt ch @10.53.0.3 > dig.out.ns3.$n
 grep "^\"this.is.a.test.of.server-id\"$" dig.out.ns3.$n > /dev/null || ret=1
-if [ $ret != 0 ] ; then echo I:failed; status=`expr $status + $ret`; fi
+if [ $ret != 0 ] ; then echo_i "failed; status=`expr $status + $ret`"; fi
 
 n=`expr $n + 1`
 ret=0
-echo "I:Checking that custom server-id works for EDNS name server ID request ($n)"
-$DIG +norec +nsid foo @10.53.0.3 -p 5300 > dig.out.ns3.$n
+echo_i "Checking that custom server-id works for EDNS name server ID request ($n)"
+$DIG $DIGOPTS +norec +nsid foo @10.53.0.3 > dig.out.ns3.$n
 grep "^; NSID: .* (t) (h) (i) (s) (.) (i) (s) (.) (a) (.) (t) (e) (s) (t) (.) (o) (f) (.) (s) (e) (r) (v) (e) (r) (-) (i) (d)" dig.out.ns3.$n > /dev/null || ret=1
-if [ $ret != 0 ] ; then echo I:failed; status=`expr $status + $ret`; fi
+if [ $ret != 0 ] ; then echo_i "failed; status=`expr $status + $ret`; fi
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index e04d826977388781ae467bae393422a1681a31be..a8c7c8440087373b49532a355ea71785f57c24e1 100644 (file)
@@ -22,4 +22,5 @@
 rm -f dig.out.ns2
 rm -f */named.memstats
 rm -f */named.run
+rm -f */named.conf
 rm -f ns2/named_dump.db.*
similarity index 92%
rename from bin/tests/system/cacheclean/ns1/named.conf
rename to bin/tests/system/cacheclean/ns1/named.conf.in
index 708de1a3ab1da52d5e4c1bce5a5792a165c9348f..02cad01d5067805265f55ff77bfc3e0da4a048fb 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.11 2011/08/02 23:47:52 tbox Exp $ */
-
-controls { /* empty */ };
-
 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 89%
rename from bin/tests/system/cacheclean/ns2/named.conf
rename to bin/tests/system/cacheclean/ns2/named.conf.in
index cb675d2a65c657fcfb26b7e766ce31bb8531946d..775ff6216a9a81efe7664ce98f2f207251a03098 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.10 2011/08/02 23:47:52 tbox Exp $ */
-
-controls { /* empty */ };
-
 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; };
@@ -38,7 +34,7 @@ key rndc_key {
 };
 
 controls {
-       inet 10.53.0.2 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.2 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 zone "." {
diff --git a/bin/tests/system/cacheclean/setup.sh b/bin/tests/system/cacheclean/setup.sh
new file mode 100644 (file)
index 0000000..d4f9dbc
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh
+#
+# Copyright (C)  2018  Internet Systems Consortium, Inc. ("ISC")
+#
+# 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 http://mozilla.org/MPL/2.0/.
+
+SYSTEMTESTTOP=..
+. $SYSTEMTESTTOP/conf.sh
+
+$SHELL clean.sh
+copy_setports ns1/named.conf.in ns1/named.conf
+copy_setports ns2/named.conf.in ns2/named.conf
index 37a2e743c2826b312dc0b09a75a0129450d292dc..745981992cdbb6ea87dd9c71c71b0eb61a9db63f 100644 (file)
@@ -21,9 +21,9 @@ SYSTEMTESTTOP=..
 status=0
 n=0
 
-RNDCOPTS="-c ../common/rndc.conf -s 10.53.0.2 -p 9953"
+RNDCOPTS="-c ../common/rndc.conf -s 10.53.0.2 -p ${CONTROLPORT}"
 DIGOPTS="+nosea +nocomm +nocmd +noquest +noadd +noauth +nocomm \
-         +nostat @10.53.0.2 -p 5300"
+         +nostat @10.53.0.2 -p ${PORT}"
 
 # fill the cache with nodes from flushtest.example zone
 load_cache () {
@@ -88,40 +88,40 @@ in_cache () {
 }
 
 n=`expr $n + 1`
-echo "I:check correctness of routine cache cleaning ($n)"
+echo_i "check correctness of routine cache cleaning ($n)"
 $DIG $DIGOPTS +tcp +keepopen -b 10.53.0.7 -f dig.batch > dig.out.ns2 || status=1
 grep ";" dig.out.ns2
 
 $PERL ../digcomp.pl --lc dig.out.ns2 knowngood.dig.out || status=1
 
 n=`expr $n + 1`
-echo "I:only one tcp socket was used ($n)"
+echo_i "only one tcp socket was used ($n)"
 tcpclients=`grep "client 10.53.0.7#[0-9]*:" ns2/named.run | awk '{print $4}' | sort | uniq -c | wc -l`
 
-test $tcpclients -eq 1 || { status=1; echo "I:failed"; }
+test $tcpclients -eq 1 || { status=1; echo_i "failed"; }
 
 n=`expr $n + 1`
-echo "I:reset and check that records are correctly cached initially ($n)"
+echo_i "reset and check that records are correctly cached initially ($n)"
 ret=0
 load_cache
 dump_cache
 nrecords=`grep flushtest.example ns2/named_dump.db.$n | grep -v '^;' | wc -l`
 [ $nrecords -eq 20 ] || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:check flushing of the full cache ($n)"
+echo_i "check flushing of the full cache ($n)"
 ret=0
 clear_cache
 dump_cache
 nrecords=`grep flushtest.example ns2/named_dump.db.$n | grep -v '^;' | wc -l`
 [ $nrecords -eq 0 ] || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:check flushing of individual nodes (interior node) ($n)"
+echo_i "check flushing of individual nodes (interior node) ($n)"
 ret=0
 clear_cache
 load_cache
@@ -129,21 +129,21 @@ load_cache
 in_cache txt top1.flushtest.example || ret=1
 $RNDC $RNDCOPTS flushname top1.flushtest.example
 in_cache txt top1.flushtest.example && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:check flushing of individual nodes (leaf node, under the interior node) ($n)"
+echo_i "check flushing of individual nodes (leaf node, under the interior node) ($n)"
 ret=0
 # leaf node, under the interior node (should still exist)
 in_cache txt third2.second1.top1.flushtest.example || ret=1
 $RNDC $RNDCOPTS flushname third2.second1.top1.flushtest.example
 in_cache txt third2.second1.top1.flushtest.example && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:check flushing of individual nodes (another leaf node, with both positive and negative cache entries) ($n)"
+echo_i "check flushing of individual nodes (another leaf node, with both positive and negative cache entries) ($n)"
 ret=0
 # another leaf node, with both positive and negative cache entries
 in_cache a third1.second1.top1.flushtest.example || ret=1
@@ -151,18 +151,18 @@ in_cache txt third1.second1.top1.flushtest.example || ret=1
 $RNDC $RNDCOPTS flushname third1.second1.top1.flushtest.example
 in_cache a third1.second1.top1.flushtest.example && ret=1
 in_cache txt third1.second1.top1.flushtest.example && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:check flushing a nonexistent name ($n)"
+echo_i "check flushing a nonexistent name ($n)"
 ret=0
 $RNDC $RNDCOPTS flushname fake.flushtest.example || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:check flushing of namespaces ($n)"
+echo_i "check flushing of namespaces ($n)"
 ret=0
 clear_cache
 load_cache
@@ -185,42 +185,42 @@ $RNDC $RNDCOPTS flushtree top2.flushtest.example
 in_cache txt second1.top2.flushtest.example && ret=1
 in_cache txt second2.top2.flushtest.example && ret=1
 in_cache txt second3.top2.flushtest.example && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:check flushing a nonexistent namespace ($n)"
+echo_i "check flushing a nonexistent namespace ($n)"
 ret=0
 $RNDC $RNDCOPTS flushtree fake.flushtest.example || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:check the number of cached records remaining ($n)"
+echo_i "check the number of cached records remaining ($n)"
 ret=0
 dump_cache
 nrecords=`grep flushtest.example ns2/named_dump.db.$n | grep -v '^;' | wc -l`
 [ $nrecords -eq 19 ] || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:check the check that flushname of a partial match works ($n)"
+echo_i "check the check that flushname of a partial match works ($n)"
 ret=0
 in_cache txt second2.top1.flushtest.example || ret=1
 $RNDC $RNDCOPTS flushtree example
 in_cache txt second2.top1.flushtest.example && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:check the number of cached records remaining ($n)"
+echo_i "check the number of cached records remaining ($n)"
 ret=0
 dump_cache
 nrecords=`grep flushtest.example ns2/named_dump.db.$n | grep -v '^;' | egrep '(TXT|ANY)' |  wc -l`
-[ $nrecords -eq 1 ] || { ret=1; echo "I: found $nrecords records expected 1"; }
-if [ $ret != 0 ]; then echo "I:failed"; fi
+[ $nrecords -eq 1 ] || { ret=1; echo_i "found $nrecords records expected 1"; }
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
diff --git a/bin/tests/system/case/clean.sh b/bin/tests/system/case/clean.sh
deleted file mode 100644 (file)
index e58da9b..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2013-2015  Internet Systems Consortium, Inc. ("ISC")
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
-# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-# AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
-# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-# PERFORMANCE OF THIS SOFTWARE.
-
-rm -f dig.ns*.test*
-rm -f ns*/named.memstats
-rm -f ns*/named.run
-rm -f ns2/example.bk
diff --git a/bin/tests/system/case/ns1/example.db b/bin/tests/system/case/ns1/example.db
deleted file mode 100644 (file)
index 961315e..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-; Copyright (C) 2013  Internet Systems Consortium, Inc. ("ISC")
-;
-; Permission to use, copy, modify, and/or distribute this software for any
-; purpose with or without fee is hereby granted, provided that the above
-; copyright notice and this permission notice appear in all copies.
-;
-; THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
-; REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-; AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
-; INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-; LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-; OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-; PERFORMANCE OF THIS SOFTWARE.
-
-
-$TTL 300       ; 5 minutes
-@                      IN SOA  mname1. . (
-                               2000042407 ; serial
-                               20         ; refresh (20 seconds)
-                               20         ; retry (20 seconds)
-                               1814400    ; expire (3 weeks)
-                               3600       ; minimum (1 hour)
-                               )
-                       NS      ns1
-ns1                    A       10.53.0.1
-@                      MX      0 mail.eXaMpLe.
-mAiL                   A       10.53.0.1
diff --git a/bin/tests/system/case/ns1/named.conf b/bin/tests/system/case/ns1/named.conf
deleted file mode 100644 (file)
index 2fcc608..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2013  Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-controls { /* empty */ };
-
-options {
-       query-source address 10.53.0.1;
-       notify-source 10.53.0.1;
-       transfer-source 10.53.0.1;
-       port 5300;
-       pid-file "named.pid";
-       listen-on { 10.53.0.1; };
-       listen-on-v6 { none; };
-       recursion no;
-       notify yes;
-       ixfr-from-differences yes;
-       check-integrity no;
-};
-
-zone "example" {
-       type master;
-       file "example.db";
-};
diff --git a/bin/tests/system/case/ns2/named.conf b/bin/tests/system/case/ns2/named.conf
deleted file mode 100644 (file)
index f8735c2..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2014  Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-controls { /* empty */ };
-
-options {
-       query-source address 10.53.0.2;
-       notify-source 10.53.0.2;
-       transfer-source 10.53.0.2;
-       port 5300;
-       pid-file "named.pid";
-       listen-on { 10.53.0.2; };
-       listen-on-v6 { none; };
-       recursion no;
-       notify yes;
-       ixfr-from-differences yes;
-       check-integrity no;
-       no-case-compress { 10.53.0.2; };
-};
-
-zone "example" {
-       type slave;
-       file "example.bk";
-       masters { 10.53.0.1; };
-};
diff --git a/bin/tests/system/case/tests.sh b/bin/tests/system/case/tests.sh
deleted file mode 100644 (file)
index 4f5836d..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2013, 2014, 2016  Internet Systems Consortium, Inc. ("ISC")
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
-# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-# AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
-# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-# PERFORMANCE OF THIS SOFTWARE.
-
-SYSTEMTESTTOP=..
-. $SYSTEMTESTTOP/conf.sh
-
-DIGOPTS="+tcp +nosea +nostat +noquest +nocomm +nocmd"
-
-status=0
-n=0
-
-n=`expr $n + 1`
-echo "I:waiting for zone transfer to complete ($n)"
-ret=0
-for i in 1 2 3 4 5 6 7 8 9
-do
-       $DIG $DIGOPTS soa example. @10.53.0.2 -p 5300 > dig.ns2.test$n
-       grep SOA dig.ns2.test$n > /dev/null && break
-done
-
-n=`expr $n + 1`
-echo "I:testing case preserving responses - no acl ($n)"
-ret=0
-$DIG $DIGOPTS mx example. @10.53.0.1 -p 5300 > dig.ns1.test$n
-grep "0.mail.eXaMpLe" dig.ns1.test$n > /dev/null || ret=1
-grep "mAiL.example" dig.ns1.test$n > /dev/null || ret=1
-test $ret -eq 0 || echo "I:failed"
-status=`expr $status + $ret`
-
-n=`expr $n + 1`
-echo "I:testing no-case-compress acl '{ 10.53.0.2; }' ($n)"
-ret=0
-
-# check that we preserve zone case for non-matching query (10.53.0.1)
-$DIG $DIGOPTS mx example. -b 10.53.0.1 @10.53.0.1 -p 5300 > dig.ns1.test$n
-grep "0.mail.eXaMpLe" dig.ns1.test$n > /dev/null || ret=1
-grep "mAiL.example" dig.ns1.test$n > /dev/null || ret=1
-
-# check that we don't preserve zone case for match (10.53.0.2)
-$DIG $DIGOPTS mx example. -b 10.53.0.2 @10.53.0.2 -p 5300 > dig.ns2.test$n
-grep "0.mail.example" dig.ns2.test$n > /dev/null || ret=1
-grep "mail.example" dig.ns2.test$n > /dev/null || ret=1
-
-test $ret -eq 0 || echo "I:failed"
-status=`expr $status + $ret`
-
-echo "I:exit status: $status"
-[ $status -eq 0 ] || exit 1
index af338fe39b8aca77d36fcfbfabb6335184da947c..1d5c047f46d72e6472daf210638fbcd8e3d55c7b 100644 (file)
@@ -30,7 +30,10 @@ $SIG{INT} = \&rmpid;
 $SIG{TERM} = \&rmpid;
 
 my $localaddr = "10.53.0.3";
-my $localport = 5300;
+
+my $localport = int($ENV{'PORT'});
+if (!$localport) { $localport = 5300; }
+
 my $verbose = 0;
 my $ttl = 60;
 my $zone = "example.broken";
index 1d6c55091d4aa67c4a60e0c21ed973f4aa61ddb8..3688eeb0ed37c32b2e681020c03317a31e3d61e2 100644 (file)
@@ -6,8 +6,9 @@ ans.py requires at least dnspython 1.12.0.
 
 "ans.py" is a fairly simple Python script that will respond as an
 authoritative server to DNS queries. It opens a UDP socket on 10.53.0.4
-and fd92:7065:b8e:ffff::8, port 5300 (these are for DNS queries) and a TCP
-socket addresses on 10.53.0.4 at port 5301 (this is the control channel).
+and fd92:7065:b8e:ffff::8, port 5300 (or PORT) (these are for DNS queries)
+and a TCP socket addresses on 10.53.0.4 at port 5301 (or EXTRAPORT1)
+(this is the control channel).
 
 Please note that all functionality and formatting are subject to change as
 we determine what features the tool will need.
index 82f6dfd74744c02f60fa78b64832a28fc5492e0e..326134006fc23bde190db63821d76b0ee94f0a88 100755 (executable)
@@ -274,16 +274,21 @@ def sigterm(signum, frame):
 ############################################################################
 ip4 = "10.53.0.4"
 ip6 = "fd92:7065:b8e:ffff::4"
-sock = 5300
+
+try: port=int(os.environ['PORT'])
+except: port=5300
+
+try: ctrlport=int(os.environ['EXTRAPORT1'])
+except: ctrlport=5300
 
 query4_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
-query4_socket.bind((ip4, sock))
+query4_socket.bind((ip4, port))
 
 havev6 = True
 try:
     query6_socket = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM)
     try:
-        query6_socket.bind((ip6, sock))
+        query6_socket.bind((ip6, port))
     except:
         query6_socket.close()
         havev6 = False
@@ -291,7 +296,7 @@ except:
     havev6 = False
 
 ctrl_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-ctrl_socket.bind((ip4, sock + 1))
+ctrl_socket.bind((ip4, ctrlport))
 ctrl_socket.listen(5)
 
 signal.signal(signal.SIGTERM, sigterm)
@@ -303,10 +308,10 @@ f.close()
 
 running = True
 
-print ("Listening on %s port %d" % (ip4, sock))
+print ("Listening on %s port %d" % (ip4, port))
 if havev6:
-    print ("Listening on %s port %d" % (ip6, sock))
-print ("Control channel on %s port %d" % (ip4, sock + 1))
+    print ("Listening on %s port %d" % (ip6, port))
+print ("Control channel on %s port %d" % (ip4, ctrlport))
 print ("Ctrl-c to quit")
 
 if havev6:
index 5af823dac5d0ac81355ee7cd8821b155ba3301f4..f0030d9c45eacaf07c90637d24e7af6d5d2b8472 100755 (executable)
@@ -15,5 +15,6 @@
 # PERFORMANCE OF THIS SOFTWARE.
 
 rm -f dig.out.* named*.pid
+rm -f ns*/named.conf
 rm -f */named.memstats */named.recursing */named.lock */named.run */ans.run
 rm -f ns2/K* ns2/dsset-* ns2/example.db.signed
similarity index 96%
rename from bin/tests/system/chain/ns1/named.conf
rename to bin/tests/system/chain/ns1/named.conf.in
index b2b0eb240bd1eb80f06931db4e7618081b739c12..c8b64d424c85a2a4dc1d87ae7859749191582b77 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-controls { /* empty */ };
-
 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 97%
rename from bin/tests/system/chain/ns2/named.conf
rename to bin/tests/system/chain/ns2/named.conf.in
index 9123a453d01ee5e649e8b5ba4afafa3cb3c50a2a..977a1bde2184c6ca9f271783c19fc777fd79733a 100644 (file)
 
 // NS2
 
-controls { /* empty */ };
-
 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 96%
rename from bin/tests/system/chain/ns5/named.conf
rename to bin/tests/system/chain/ns5/named.conf.in
index 499c049e351edd04ee7b84e6cb61b87687864985..aaf57a19d47e9081e8725dfddbda915335c33aff 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-controls { /* empty */ };
-
 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";
        listen-on { 10.53.0.5; };
        listen-on-v6 { none; };
similarity index 92%
rename from bin/tests/system/chain/ns7/named.conf
rename to bin/tests/system/chain/ns7/named.conf.in
index 007afff60960d43ccc764848bcbecf13b5afa90d..a57885227c1aec74cb930347f8794eefb65354be 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-controls { /* empty */ };
-
 options {
        directory ".";
        query-source address 10.53.0.7;
        notify-source 10.53.0.7;
        transfer-source 10.53.0.7;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.7; };
        listen-on-v6 { fd92:7065:b8e:ffff::7; };
@@ -35,7 +33,7 @@ key rndc_key {
 };
 
 controls {
-       inet 10.53.0.7 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.7 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 zone "." {
index d3f7bdb0d6579019787db8554539d98e6e91b920..b4e3aad11d9909a9f763e348d35c7f36e3b154fa 100644 (file)
@@ -25,11 +25,11 @@ then
     then
         :
     else
-        echo "I:This test requires the dnspython module." >&2
+        echo_i "This test requires the dnspython module." >&2
         exit 1
     fi
 else
-    echo "I:This test requires Python and the dnspython module." >&2
+    echo_i "This test requires Python and the dnspython module." >&2
     exit 1
 fi
 
@@ -39,17 +39,17 @@ then
     then
         :
     else
-        echo "I:Net::DNS versions 0.69 to 0.74 have bugs that cause this test to fail: please update." >&2
+        echo_i "Net::DNS versions 0.69 to 0.74 have bugs that cause this test to fail: please update." >&2
         exit 1
     fi
 else
-    echo "I:This test requires the perl Net::DNS library." >&2
+    echo_i "This test requires the perl Net::DNS library." >&2
     exit 1
 fi
 if $PERL -e 'use Net::DNS::Nameserver;' 2>/dev/null
 then
        :
 else
-    echo "I:This test requires the Net::DNS::Nameserver library." >&2
+    echo_i "This test requires the Net::DNS::Nameserver library." >&2
     exit 1
 fi
index 1cfd2af7df99e36af40604e72198b3c551f1b6d1..70180ce3dc473eca4fdcd82c1766ddb3be9a5160 100644 (file)
@@ -21,5 +21,10 @@ $SHELL clean.sh
 
 test -r $RANDFILE || $GENRANDOM 400 $RANDFILE
 
+copy_setports ns1/named.conf.in ns1/named.conf
+copy_setports ns2/named.conf.in ns2/named.conf
+copy_setports ns5/named.conf.in ns5/named.conf
+copy_setports ns7/named.conf.in ns7/named.conf
+
 cd ns2
 $SHELL sign.sh
index aac03e75ab807941fc56d308fb1d258f7b227138..98362dc088c6a03df8645f5718e8eecbb54aabff 100644 (file)
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
-DIGOPTS="-p 5300 "
-SEND="$PERL $SYSTEMTESTTOP/send.pl 10.53.0.4 5301"
+DIGOPTS="-p ${PORT}"
+RNDCCMD="$RNDC -c $SYSTEMTESTTOP/common/rndc.conf -p ${CONTROLPORT} -s"
+SEND="$PERL $SYSTEMTESTTOP/send.pl 10.53.0.4 ${EXTRAPORT1}"
 status=0
 n=0
 
 n=`expr $n + 1`
-echo "I:checking short DNAME from authoritative ($n)"
+echo_i "checking short DNAME from authoritative ($n)"
 ret=0
-$DIG a.short-dname.example @10.53.0.2 a -p 5300 > dig.out.ns2.short || ret=1
+$DIG $DIGOPTS a.short-dname.example @10.53.0.2 a > dig.out.ns2.short || ret=1
 grep "status: NOERROR" dig.out.ns2.short > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking short DNAME from recursive ($n)"
+echo_i "checking short DNAME from recursive ($n)"
 ret=0
-$DIG a.short-dname.example @10.53.0.7 a -p 5300 > dig.out.ns4.short || ret=1
+$DIG $DIGOPTS a.short-dname.example @10.53.0.7 a > dig.out.ns4.short || ret=1
 grep "status: NOERROR" dig.out.ns4.short > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking long DNAME from authoritative ($n)"
+echo_i "checking long DNAME from authoritative ($n)"
 ret=0
-$DIG a.long-dname.example @10.53.0.2 a -p 5300 > dig.out.ns2.long || ret=1
+$DIG $DIGOPTS a.long-dname.example @10.53.0.2 a > dig.out.ns2.long || ret=1
 grep "status: NOERROR" dig.out.ns2.long > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking long DNAME from recursive ($n)"
+echo_i "checking long DNAME from recursive ($n)"
 ret=0
-$DIG a.long-dname.example @10.53.0.7 a -p 5300 > dig.out.ns4.long || ret=1
+$DIG $DIGOPTS a.long-dname.example @10.53.0.7 a > dig.out.ns4.long || ret=1
 grep "status: NOERROR" dig.out.ns4.long > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking (too) long DNAME from authoritative ($n)"
+echo_i "checking (too) long DNAME from authoritative ($n)"
 ret=0
-$DIG 01234567890123456789012345678901234567890123456789.longlonglonglonglonglonglonglonglonglonglonglonglonglonglong.longlonglonglonglonglonglonglonglonglonglonglonglonglonglong.longlonglonglonglonglonglonglonglonglonglonglonglonglonglong.long-dname.example @10.53.0.2 a -p 5300 > dig.out.ns2.toolong || ret=1
+$DIG $DIGOPTS 01234567890123456789012345678901234567890123456789.longlonglonglonglonglonglonglonglonglonglonglonglonglonglong.longlonglonglonglonglonglonglonglonglonglonglonglonglonglong.longlonglonglonglonglonglonglonglonglonglonglonglonglonglong.long-dname.example @10.53.0.2 a > dig.out.ns2.toolong || ret=1
 grep "status: YXDOMAIN" dig.out.ns2.toolong > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking (too) long DNAME from recursive with cached DNAME ($n)"
+echo_i "checking (too) long DNAME from recursive with cached DNAME ($n)"
 ret=0
-$DIG 01234567890123456789012345678901234567890123456789.longlonglonglonglonglonglonglonglonglonglonglonglonglonglong.longlonglonglonglonglonglonglonglonglonglonglonglonglonglong.longlonglonglonglonglonglonglonglonglonglonglonglonglonglong.long-dname.example @10.53.0.7 a -p 5300 > dig.out.ns4.cachedtoolong || ret=1
+$DIG $DIGOPTS 01234567890123456789012345678901234567890123456789.longlonglonglonglonglonglonglonglonglonglonglonglonglonglong.longlonglonglonglonglonglonglonglonglonglonglonglonglonglong.longlonglonglonglonglonglonglonglonglonglonglonglonglonglong.long-dname.example @10.53.0.7 a > dig.out.ns4.cachedtoolong || ret=1
 grep "status: YXDOMAIN" dig.out.ns4.cachedtoolong > /dev/null || ret=1
 grep '^long-dname\.example\..*DNAME.*long' dig.out.ns4.cachedtoolong > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking (too) long DNAME from recursive without cached DNAME ($n)"
+echo_i "checking (too) long DNAME from recursive without cached DNAME ($n)"
 ret=0
-$DIG 01234567890123456789012345678901234567890123456789.longlonglonglonglonglonglonglonglonglonglonglonglonglonglong.longlonglonglonglonglonglonglonglonglonglonglonglonglonglong.longlonglonglonglonglonglonglonglonglonglonglonglonglong.toolong-dname.example @10.53.0.7 a -p 5300 > dig.out.ns4.uncachedtoolong || ret=1
+$DIG $DIGOPTS 01234567890123456789012345678901234567890123456789.longlonglonglonglonglonglonglonglonglonglonglonglonglonglong.longlonglonglonglonglonglonglonglonglonglonglonglonglonglong.longlonglonglonglonglonglonglonglonglonglonglonglonglong.toolong-dname.example @10.53.0.7 a > dig.out.ns4.uncachedtoolong || ret=1
 grep "status: YXDOMAIN" dig.out.ns4.uncachedtoolong > /dev/null || ret=1
 grep '^toolong-dname\.example\..*DNAME.*long' dig.out.ns4.uncachedtoolong > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking CNAME to DNAME from authoritative ($n)"
+echo_i "checking CNAME to DNAME from authoritative ($n)"
 ret=0
-$DIG cname.example @10.53.0.2 a -p 5300 > dig.out.ns2.cname
+$DIG $DIGOPTS cname.example @10.53.0.2 a > dig.out.ns2.cname
 grep "status: NOERROR" dig.out.ns2.cname > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking CNAME to DNAME from recursive"
+echo_i "checking CNAME to DNAME from recursive"
 ret=0
-$DIG cname.example @10.53.0.7 a -p 5300 > dig.out.ns4.cname
+$DIG $DIGOPTS cname.example @10.53.0.7 a > dig.out.ns4.cname
 grep "status: NOERROR" dig.out.ns4.cname > /dev/null || ret=1
 grep '^cname.example.' dig.out.ns4.cname > /dev/null || ret=1
 grep '^cnamedname.example.' dig.out.ns4.cname > /dev/null || ret=1
 grep '^a.cnamedname.example.' dig.out.ns4.cname > /dev/null || ret=1
 grep '^a.target.example.' dig.out.ns4.cname > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking DNAME is returned with synthesized CNAME before DNAME ($n)"
+echo_i "checking DNAME is returned with synthesized CNAME before DNAME ($n)"
 ret=0
-$DIG @10.53.0.7 -p 5300 name.synth-then-dname.example.broken A > dig.out.test$n
+$DIG $DIGOPTS @10.53.0.7 name.synth-then-dname.example.broken A > dig.out.test$n
 grep "status: NXDOMAIN" dig.out.test$n > /dev/null || ret=1
 grep '^name.synth-then-dname\.example\.broken\..*CNAME.*name.$' dig.out.test$n > /dev/null || ret=1
 grep '^synth-then-dname\.example\.broken\..*DNAME.*\.$' dig.out.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking DNAME is returned with CNAME to synthesized CNAME before DNAME ($n)"
+echo_i "checking DNAME is returned with CNAME to synthesized CNAME before DNAME ($n)"
 ret=0
-$DIG @10.53.0.7 -p 5300 cname-to-synth2-then-dname.example.broken A > dig.out.test$n
+$DIG $DIGOPTS @10.53.0.7 cname-to-synth2-then-dname.example.broken A > dig.out.test$n
 grep "status: NXDOMAIN" dig.out.test$n > /dev/null || ret=1
 grep '^cname-to-synth2-then-dname\.example\.broken\..*CNAME.*name\.synth2-then-dname\.example\.broken.$' dig.out.test$n > /dev/null || ret=1
 grep '^name\.synth2-then-dname\.example\.broken\..*CNAME.*name.$' dig.out.test$n > /dev/null || ret=1
 grep '^synth2-then-dname\.example\.broken\..*DNAME.*\.$' dig.out.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking CNAME loops are detected ($n)"
+echo_i "checking CNAME loops are detected ($n)"
 ret=0
-$DIG @10.53.0.7 -p 5300 loop.example > dig.out.test$n
+$DIG $DIGOPTS @10.53.0.7 loop.example > dig.out.test$n
 grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
 grep "ANSWER: 17" dig.out.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking CNAME to external delegated zones is handled ($n)"
+echo_i "checking CNAME to external delegated zones is handled ($n)"
 ret=0
-$DIG @10.53.0.7 -p 5300 a.example > dig.out.test$n
+$DIG $DIGOPTS @10.53.0.7 a.example > dig.out.test$n
 grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
 grep "ANSWER: 2" dig.out.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking CNAME to internal delegated zones is handled ($n)"
+echo_i "checking CNAME to internal delegated zones is handled ($n)"
 ret=0
-$DIG @10.53.0.7 -p 5300 b.example > dig.out.test$n
+$DIG $DIGOPTS @10.53.0.7 b.example > dig.out.test$n
 grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
 grep "ANSWER: 2" dig.out.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking CNAME to signed external delgation is handled ($n)"
+echo_i "checking CNAME to signed external delgation is handled ($n)"
 ret=0
-$DIG $DIGOPTS @10.53.0.7 -p 5300 c.example > dig.out.$n
+$DIG $DIGOPTS @10.53.0.7 c.example > dig.out.$n
 grep "status: NOERROR" dig.out.$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I: failed"; fi
+if [ $ret != 0 ]; then echo_i " failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking CNAME to signed internal delgation is handled ($n)"
+echo_i "checking CNAME to signed internal delgation is handled ($n)"
 ret=0
-$DIG $DIGOPTS @10.53.0.7 -p 5300 d.example > dig.out.$n
+$DIG $DIGOPTS @10.53.0.7 d.example > dig.out.$n
 grep "status: NOERROR" dig.out.$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I: failed"; fi
+if [ $ret != 0 ]; then echo_i " failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking CNAME chains in various orders ($n)"
+echo_i "checking CNAME chains in various orders ($n)"
 ret=0
 echo "cname,cname,cname|1,2,3,4,s1,s2,s3,s4" | $SEND
 $DIG $DIGOPTS @10.53.0.7 test.domain.nil > dig.out.1.$n 2>&1
 grep 'status: NOERROR' dig.out.1.$n > /dev/null 2>&1 || ret=1
 grep 'ANSWER: 2' dig.out.1.$n > /dev/null 2>&1 || ret=1
-$RNDC -c ../common/rndc.conf -s 10.53.0.7 -p 9953 flush 2>&1 | sed 's/^/I:ns7 /'
+$RNDCCMD 10.53.0.7 flush 2>&1 | sed 's/^/ns7 /' | cat_i
 echo "cname,cname,cname|1,1,2,2,3,4,s4,s3,s1" | $SEND
 $DIG $DIGOPTS @10.53.0.7 test.domain.nil > dig.out.2.$n 2>&1
 grep 'status: NOERROR' dig.out.2.$n > /dev/null 2>&1 || ret=1
 grep 'ANSWER: 2' dig.out.2.$n > /dev/null 2>&1 || ret=1
-$RNDC -c ../common/rndc.conf -s 10.53.0.7 -p 9953 flush 2>&1 | sed 's/^/I:ns7 /'
+$RNDCCMD 10.53.0.7 flush 2>&1 | sed 's/^/ns7 /' | cat_i
 echo "cname,cname,cname|2,1,3,4,s3,s1,s2,s4" | $SEND
 $DIG $DIGOPTS @10.53.0.7 test.domain.nil > dig.out.3.$n 2>&1
 grep 'status: NOERROR' dig.out.3.$n > /dev/null 2>&1 || ret=1
 grep 'ANSWER: 2' dig.out.3.$n > /dev/null 2>&1 || ret=1
-$RNDC -c ../common/rndc.conf -s 10.53.0.7 -p 9953 flush 2>&1 | sed 's/^/I:ns7 /'
+$RNDCCMD 10.53.0.7 flush 2>&1 | sed 's/^/ns7 /' | cat_i
 echo "cname,cname,cname|4,3,2,1,s4,s3,s2,s1" | $SEND
 $DIG $DIGOPTS @10.53.0.7 test.domain.nil > dig.out.4.$n 2>&1
 grep 'status: NOERROR' dig.out.4.$n > /dev/null 2>&1 || ret=1
 grep 'ANSWER: 2' dig.out.4.$n > /dev/null 2>&1 || ret=1
 echo "cname,cname,cname|4,3,2,1,s4,s3,s2,s1" | $SEND
-$RNDC -c ../common/rndc.conf -s 10.53.0.7 -p 9953 flush 2>&1 | sed 's/^/I:ns7 /'
+$RNDCCMD 10.53.0.7 flush 2>&1 | sed 's/^/ns7 /' | cat_i
 $DIG $DIGOPTS @10.53.0.7 test.domain.nil > dig.out.5.$n 2>&1
 grep 'status: NOERROR' dig.out.5.$n > /dev/null 2>&1 || ret=1
 grep 'ANSWER: 2' dig.out.5.$n > /dev/null 2>&1 || ret=1
-$RNDC -c ../common/rndc.conf -s 10.53.0.7 -p 9953 flush 2>&1 | sed 's/^/I:ns7 /'
+$RNDCCMD 10.53.0.7 flush 2>&1 | sed 's/^/ns7 /' | cat_i
 echo "cname,cname,cname|4,3,3,3,s1,s1,1,3,4" | $SEND
 $DIG $DIGOPTS @10.53.0.7 test.domain.nil > dig.out.6.$n 2>&1
 grep 'status: NOERROR' dig.out.6.$n > /dev/null 2>&1 || ret=1
 grep 'ANSWER: 2' dig.out.6.$n > /dev/null 2>&1 || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that only the initial CNAME is cached ($n)"
+echo_i "checking that only the initial CNAME is cached ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.7 -p 9953 flush 2>&1 | sed 's/^/I:ns7 /'
+$RNDCCMD 10.53.0.7 flush 2>&1 | sed 's/^/ns7 /' | cat_i
 echo "cname,cname,cname|1,2,3,4,s1,s2,s3,s4" | $SEND
 $DIG $DIGOPTS @10.53.0.7 test.domain.nil > dig.out.1.$n 2>&1
 sleep 1
 $DIG $DIGOPTS +noall +answer @10.53.0.7 cname1.domain.nil > dig.out.2.$n 2>&1
 ttl=`awk '{print $2}' dig.out.2.$n`
 [ "$ttl" -eq 86400 ] || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking DNAME chains in various orders ($n)"
+echo_i "checking DNAME chains in various orders ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.7 -p 9953 flush 2>&1 | sed 's/^/I:ns7 /'
+$RNDCCMD 10.53.0.7 flush 2>&1 | sed 's/^/ns7 /' | cat_i
 echo "dname,dname|5,4,3,2,1,s5,s4,s3,s2,s1" | $SEND
 $DIG $DIGOPTS @10.53.0.7 test.domain.nil > dig.out.1.$n 2>&1
 grep 'status: NOERROR' dig.out.1.$n > /dev/null 2>&1 || ret=1
 grep 'ANSWER: 3' dig.out.1.$n > /dev/null 2>&1 || ret=1
-$RNDC -c ../common/rndc.conf -s 10.53.0.7 -p 9953 flush 2>&1 | sed 's/^/I:ns7 /'
+$RNDCCMD 10.53.0.7 flush 2>&1 | sed 's/^/ns7 /' | cat_i
 echo "dname,dname|5,4,3,2,1,s5,s4,s3,s2,s1" | $SEND
 $DIG $DIGOPTS @10.53.0.7 test.domain.nil > dig.out.2.$n 2>&1
 grep 'status: NOERROR' dig.out.2.$n > /dev/null 2>&1 || ret=1
 grep 'ANSWER: 3' dig.out.2.$n > /dev/null 2>&1 || ret=1
-$RNDC -c ../common/rndc.conf -s 10.53.0.7 -p 9953 flush 2>&1 | sed 's/^/I:ns7 /'
+$RNDCCMD 10.53.0.7 flush 2>&1 | sed 's/^/ns7 /' | cat_i
 echo "dname,dname|2,3,s1,s2,s3,s4,1" | $SEND
 $DIG $DIGOPTS @10.53.0.7 test.domain.nil > dig.out.3.$n 2>&1
 grep 'status: NOERROR' dig.out.3.$n > /dev/null 2>&1 || ret=1
 grep 'ANSWER: 3' dig.out.3.$n > /dev/null 2>&1 || ret=1
-$RNDC -c ../common/rndc.conf -s 10.53.0.7 -p 9953 flush 2>&1 | sed 's/^/I:ns7 /'
-if [ $ret != 0 ]; then echo "I:failed"; fi
+$RNDCCMD 10.53.0.7 flush 2>&1 | sed 's/^/ns7 /' | cat_i
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking external CNAME/DNAME chains in various orders ($n)"
+echo_i "checking external CNAME/DNAME chains in various orders ($n)"
 ret=0
 echo "xname,dname|1,2,3,4,s1,s2,s3,s4" | $SEND
 $DIG $DIGOPTS @10.53.0.7 test.domain.nil > dig.out.1.$n 2>&1
 grep 'status: NOERROR' dig.out.1.$n > /dev/null 2>&1 || ret=1
 grep 'ANSWER: 2' dig.out.1.$n > /dev/null 2>&1 || ret=1
-$RNDC -c ../common/rndc.conf -s 10.53.0.7 -p 9953 flush 2>&1 | sed 's/^/I:ns7 /'
+$RNDCCMD 10.53.0.7 flush 2>&1 | sed 's/^/ns7 /' | cat_i
 echo "xname,dname|s2,2,s1,1,4,s4,3" | $SEND
 $DIG $DIGOPTS @10.53.0.7 test.domain.nil > dig.out.2.$n 2>&1
 grep 'status: NOERROR' dig.out.2.$n > /dev/null 2>&1 || ret=1
 grep 'ANSWER: 2' dig.out.2.$n > /dev/null 2>&1 || ret=1
-$RNDC -c ../common/rndc.conf -s 10.53.0.7 -p 9953 flush 2>&1 | sed 's/^/I:ns7 /'
+$RNDCCMD 10.53.0.7 flush 2>&1 | sed 's/^/ns7 /' | cat_i
 echo "xname,dname|s2,2,2,2" | $SEND
 $DIG $DIGOPTS @10.53.0.7 test.domain.nil > dig.out.3.$n 2>&1
 grep 'status: SERVFAIL' dig.out.3.$n > /dev/null 2>&1 || ret=1
-$RNDC -c ../common/rndc.conf -s 10.53.0.7 -p 9953 flush 2>&1 | sed 's/^/I:ns7 /'
-if [ $ret != 0 ]; then echo "I:failed"; fi
+$RNDCCMD 10.53.0.7 flush 2>&1 | sed 's/^/ns7 /' | cat_i
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index 4cfaef0c57680ff9cc38b0bfcbafcc65e1487cf4..fb938cd735b7ea07d59872e3fd0c87fa9be224a1 100644 (file)
@@ -12,8 +12,6 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id$
-
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
@@ -21,37 +19,37 @@ status=0
 n=0
 
 n=`expr $n + 1`
-echo "I: checking that named-checkconf handles a known good config ($n)"
+echo_i "checking that named-checkconf handles a known good config ($n)"
 ret=0
 $CHECKCONF good.conf > /dev/null 2>&1 || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: checking that named-checkconf prints a known good config ($n)"
+echo_i "checking that named-checkconf prints a known good config ($n)"
 ret=0
 awk 'BEGIN { ok = 0; } /cut here/ { ok = 1; getline } ok == 1 { print }' good.conf > good.conf.in
 [ -s good.conf.in ] || ret=1
 $CHECKCONF -p good.conf.in | grep -v '^good.conf.in:' > good.conf.out 2>&1 || ret=1
 cmp good.conf.in good.conf.out || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: checking that named-checkconf -x removes secrets ($n)"
+echo_i "checking that named-checkconf -x removes secrets ($n)"
 ret=0
 # ensure there is a secret and that it is not the check string.
 grep 'secret "' good.conf.in > /dev/null || ret=1
 grep 'secret "????????????????"' good.conf.in > /dev/null 2>&1 && ret=1
 $CHECKCONF -p -x good.conf.in | grep -v '^good.conf.in:' > good.conf.out 2>&1 || ret=1
 grep 'secret "????????????????"' good.conf.out > /dev/null 2>&1 || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 for bad in bad*.conf
 do
     n=`expr $n + 1`
-    echo "I: checking that named-checkconf detects error in $bad ($n)"
+    echo_i "checking that named-checkconf detects error in $bad ($n)"
     ret=0
     $CHECKCONF $bad > checkconf.out 2>&1
     if [ $? != 1 ]; then ret=1; fi
@@ -66,38 +64,38 @@ do
        grep "$pat" checkconf.out > /dev/null || ret=1
        ;;
     esac
-    if [ $ret != 0 ]; then echo "I:failed"; fi
+    if [ $ret != 0 ]; then echo_i "failed"; fi
     status=`expr $status + $ret`
 done
 
 for good in good-*.conf
 do
        n=`expr $n + 1`
-       echo "I: checking that named-checkconf detects no error in $good ($n)"
+       echo_i "checking that named-checkconf detects no error in $good ($n)"
        ret=0
        $CHECKCONF $good > /dev/null 2>&1
-       if [ $? != 0 ]; then echo "I:failed"; ret=1; fi
+       if [ $? != 0 ]; then echo_i "failed"; ret=1; fi
        status=`expr $status + $ret`
 done
 
 n=`expr $n + 1`
-echo "I: checking that named-checkconf -z catches missing hint file ($n)"
+echo_i "checking that named-checkconf -z catches missing hint file ($n)"
 ret=0
 $CHECKCONF -z hint-nofile.conf > hint-nofile.out 2>&1 && ret=1
 grep "could not configure root hints from 'nonexistent.db': file not found" hint-nofile.out > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: checking that named-checkconf warns of notify inconsistencies ($n)"
+echo_i "checking that named-checkconf warns of notify inconsistencies ($n)"
 ret=0
 warnings=`$CHECKCONF notify.conf 2>&1 | grep "'notify' is disabled" | wc -l`
 [ $warnings -eq 3 ] || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: checking named-checkconf dnssec warnings ($n)"
+echo_i "checking named-checkconf dnssec warnings ($n)"
 ret=0
 $CHECKCONF dnssec.1 2>&1 | grep 'validation yes.*enable no' > /dev/null || ret=1
 $CHECKCONF dnssec.2 2>&1 | grep 'auto-dnssec may only be ' > /dev/null || ret=1
@@ -105,11 +103,11 @@ $CHECKCONF dnssec.2 2>&1 | grep 'validation auto.*enable no' > /dev/null || ret=
 $CHECKCONF dnssec.2 2>&1 | grep 'validation yes.*enable no' > /dev/null || ret=1
 # this one should have no warnings
 $CHECKCONF dnssec.3 2>&1 | grep '.*' && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: range checking fields that do not allow zero ($n)"
+echo_i "range checking fields that do not allow zero ($n)"
 ret=0
 for field in max-retry-time min-retry-time max-refresh-time min-refresh-time; do
     cat > badzero.conf << EOF
@@ -118,14 +116,14 @@ options {
 };
 EOF
     $CHECKCONF badzero.conf > /dev/null 2>&1
-    [ $? -eq 1 ] || { echo "I: options $field failed" ; ret=1; }
+    [ $? -eq 1 ] || { echo_i "options $field failed" ; ret=1; }
     cat > badzero.conf << EOF
 view dummy {
     $field 0;
 };
 EOF
     $CHECKCONF badzero.conf > /dev/null 2>&1
-    [ $? -eq 1 ] || { echo "I: view $field failed" ; ret=1; }
+    [ $? -eq 1 ] || { echo_i "view $field failed" ; ret=1; }
     cat > badzero.conf << EOF
 options {
     $field 0;
@@ -134,7 +132,7 @@ view dummy {
 };
 EOF
     $CHECKCONF badzero.conf > /dev/null 2>&1
-    [ $? -eq 1 ] || { echo "I: options + view $field failed" ; ret=1; }
+    [ $? -eq 1 ] || { echo_i "options + view $field failed" ; ret=1; }
     cat > badzero.conf << EOF
 zone dummy {
     type slave;
@@ -143,13 +141,13 @@ zone dummy {
 };
 EOF
     $CHECKCONF badzero.conf > /dev/null 2>&1
-    [ $? -eq 1 ] || { echo "I: zone $field failed" ; ret=1; }
+    [ $? -eq 1 ] || { echo_i "zone $field failed" ; ret=1; }
 done
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: checking options allowed in inline-signing slaves ($n)"
+echo_i "checking options allowed in inline-signing slaves ($n)"
 ret=0
 l=`$CHECKCONF bad-dnssec.conf 2>&1 | grep "dnssec-dnskey-kskonly.*requires inline" | wc -l`
 [ $l -eq 1 ] || ret=1
@@ -157,22 +155,22 @@ l=`$CHECKCONF bad-dnssec.conf 2>&1 | grep "dnssec-loadkeys-interval.*requires in
 [ $l -eq 1 ] || ret=1
 l=`$CHECKCONF bad-dnssec.conf 2>&1 | grep "update-check-ksk.*requires inline" | wc -l`
 [ $l -eq 1 ] || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: check file + inline-signing for slave zones ($n)"
+echo_i "check file + inline-signing for slave zones ($n)"
 l=`$CHECKCONF inline-no.conf 2>&1 | grep "missing 'file' entry" | wc -l`
 [ $l -eq 0 ] || ret=1
 l=`$CHECKCONF inline-good.conf 2>&1 | grep "missing 'file' entry" | wc -l`
 [ $l -eq 0 ] || ret=1
 l=`$CHECKCONF inline-bad.conf 2>&1 | grep "missing 'file' entry" | wc -l`
 [ $l -eq 1 ] || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: checking for missing key directory warning ($n)"
+echo_i "checking for missing key directory warning ($n)"
 ret=0
 rm -rf test.keydir
 l=`$CHECKCONF warn-keydir.conf 2>&1 | grep "'test.keydir' does not exist" | wc -l`
@@ -185,160 +183,160 @@ mkdir test.keydir
 l=`$CHECKCONF warn-keydir.conf 2>&1 | grep "key-directory" | wc -l`
 [ $l -eq 0 ] || ret=1
 rm -rf test.keydir
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: checking that named-checkconf -z skips zone check with alternate databases ($n)"
+echo_i "checking that named-checkconf -z skips zone check with alternate databases ($n)"
 ret=0
 $CHECKCONF -z altdb.conf > /dev/null 2>&1 || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; ret=1; fi
+if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: checking that named-checkconf -z fails on view with ANY class ($n)"
+echo_i "checking that named-checkconf -z fails on view with ANY class ($n)"
 ret=0
 $CHECKCONF -z view-class-any1.conf > /dev/null 2>&1 && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; ret=1; fi
+if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: checking that named-checkconf -z fails on view with CLASS255 class ($n)"
+echo_i "checking that named-checkconf -z fails on view with CLASS255 class ($n)"
 ret=0
 $CHECKCONF -z view-class-any2.conf > /dev/null 2>&1 && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; ret=1; fi
+if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: checking that named-checkconf -z passes on view with IN class ($n)"
+echo_i "checking that named-checkconf -z passes on view with IN class ($n)"
 ret=0
 $CHECKCONF -z view-class-in1.conf > /dev/null 2>&1 || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; ret=1; fi
+if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: checking that named-checkconf -z passes on view with CLASS1 class ($n)"
+echo_i "checking that named-checkconf -z passes on view with CLASS1 class ($n)"
 ret=0
 $CHECKCONF -z view-class-in2.conf > /dev/null 2>&1 || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; ret=1; fi
+if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: check that check-names fails as configured ($n)"
+echo_i "check that check-names fails as configured ($n)"
 ret=0
 $CHECKCONF -z check-names-fail.conf > checkconf.out$n 2>&1 && ret=1
 grep "near '_underscore': bad name (check-names)" checkconf.out$n > /dev/null || ret=1
 grep "zone check-names/IN: loaded serial" < checkconf.out$n > /dev/null && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; ret=1; fi
+if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: check that check-mx fails as configured ($n)"
+echo_i "check that check-mx fails as configured ($n)"
 ret=0
 $CHECKCONF -z check-mx-fail.conf > checkconf.out$n 2>&1 && ret=1
 grep "near '10.0.0.1': MX is an address" checkconf.out$n > /dev/null || ret=1
 grep "zone check-mx/IN: loaded serial" < checkconf.out$n > /dev/null && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; ret=1; fi
+if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: check that check-dup-records fails as configured ($n)"
+echo_i "check that check-dup-records fails as configured ($n)"
 ret=0
 $CHECKCONF -z check-dup-records-fail.conf > checkconf.out$n 2>&1 && ret=1
 grep "has semantically identical records" checkconf.out$n > /dev/null || ret=1
 grep "zone check-dup-records/IN: loaded serial" < checkconf.out$n > /dev/null && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; ret=1; fi
+if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: check that check-mx fails as configured ($n)"
+echo_i "check that check-mx fails as configured ($n)"
 ret=0
 $CHECKCONF -z check-mx-fail.conf > checkconf.out$n 2>&1 && ret=1
 grep "failed: MX is an address" checkconf.out$n > /dev/null || ret=1
 grep "zone check-mx/IN: loaded serial" < checkconf.out$n > /dev/null && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; ret=1; fi
+if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: check that check-mx-cname fails as configured ($n)"
+echo_i "check that check-mx-cname fails as configured ($n)"
 ret=0
 $CHECKCONF -z check-mx-cname-fail.conf > checkconf.out$n 2>&1 && ret=1
 grep "MX.* is a CNAME (illegal)" checkconf.out$n > /dev/null || ret=1
 grep "zone check-mx-cname/IN: loaded serial" < checkconf.out$n > /dev/null && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; ret=1; fi
+if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: check that check-srv-cname fails as configured ($n)"
+echo_i "check that check-srv-cname fails as configured ($n)"
 ret=0
 $CHECKCONF -z check-srv-cname-fail.conf > checkconf.out$n 2>&1 && ret=1
 grep "SRV.* is a CNAME (illegal)" checkconf.out$n > /dev/null || ret=1
 grep "zone check-mx-cname/IN: loaded serial" < checkconf.out$n > /dev/null && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; ret=1; fi
+if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: check that named-checkconf -p properly print a port range ($n)"
+echo_i "check that named-checkconf -p properly print a port range ($n)"
 ret=0
 $CHECKCONF -p portrange-good.conf > checkconf.out$n 2>&1 || ret=1
 grep "range 8610 8614;" checkconf.out$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; ret=1; fi
+if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: check that 'dnssec-lookaside auto;' generates a warning ($n)"
+echo_i "check that 'dnssec-lookaside auto;' generates a warning ($n)"
 ret=0
 $CHECKCONF warn-dlv-auto.conf > checkconf.out$n 2>/dev/null || ret=1
 grep "dnssec-lookaside 'auto' is no longer supported" checkconf.out$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; ret=1; fi
+if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: check that 'dnssec-lookaside . trust-anchor dlv.isc.org;' generates a warning ($n)"
+echo_i "check that 'dnssec-lookaside . trust-anchor dlv.isc.org;' generates a warning ($n)"
 ret=0
 $CHECKCONF warn-dlv-dlv.isc.org.conf > checkconf.out$n 2>/dev/null || ret=1
 grep "dlv.isc.org has been shut down" checkconf.out$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; ret=1; fi
+if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: check that 'dnssec-lookaside . trust-anchor dlv.example.com;' doesn't generates a warning ($n)"
+echo_i "check that 'dnssec-lookaside . trust-anchor dlv.example.com;' doesn't generates a warning ($n)"
 ret=0
 $CHECKCONF good-dlv-dlv.example.com.conf > checkconf.out$n 2>/dev/null || ret=1
 [ -s checkconf.out$n ] && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; ret=1; fi
+if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: check that the 2010 ICANN ROOT KSK without the 2017 ICANN ROOT KSK generates a warning ($n)"
+echo_i "check that the 2010 ICANN ROOT KSK without the 2017 ICANN ROOT KSK generates a warning ($n)"
 ret=0
 $CHECKCONF check-root-ksk-2010.conf > checkconf.out$n 2>/dev/null || ret=1
 [ -s checkconf.out$n ] || ret=1
 grep "trusted-key for root from 2010 without updated" checkconf.out$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; ret=1; fi
+if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
 status=`expr $status + $ret`
 
-echo "I: check that the 2010 ICANN ROOT KSK with the 2017 ICANN ROOT KSK does not warning ($n)"
+echo_i "check that the 2010 ICANN ROOT KSK with the 2017 ICANN ROOT KSK does not warning ($n)"
 ret=0
 $CHECKCONF check-root-ksk-both.conf > checkconf.out$n 2>/dev/null || ret=1
 [ -s checkconf.out$n ] && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; ret=1; fi
+if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
 status=`expr $status + $ret`
 
-echo "I: check that the 2017 ICANN ROOT KSK alone does not warning ($n)"
+echo_i "check that the 2017 ICANN ROOT KSK alone does not warning ($n)"
 ret=0
 $CHECKCONF check-root-ksk-2017.conf > checkconf.out$n 2>/dev/null || ret=1
 [ -s checkconf.out$n ] && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; ret=1; fi
+if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
 status=`expr $status + $ret`
 
-echo "I: check that the dlv.isc.org KSK generates a warning ($n)"
+echo_i "check that the dlv.isc.org KSK generates a warning ($n)"
 ret=0
 $CHECKCONF check-dlv-ksk-key.conf > checkconf.out$n 2>/dev/null || ret=1
 [ -s checkconf.out$n ] || ret=1
 grep "trusted-key for dlv.isc.org still present" checkconf.out$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; ret=1; fi
+if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
 status=`expr $status + $ret`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index 314c741501bf0c3b447a87d68c1c39a98563e227..41e55cd5fceec8502b753592110a908c655f8a3a 100644 (file)
@@ -25,80 +25,80 @@ CHECKDS="$CHECKDS -d $DIG -D $DSFROMKEY"
 status=0
 n=1
 
-echo "I:checking for correct DS, looking up key via 'dig' ($n)"
+echo_i "checking for correct DS, looking up key via 'dig' ($n)"
 ret=0
 $CHECKDS ok.example > checkds.out.$n 2>&1 || ret=1
 grep 'SHA-1' checkds.out.$n > /dev/null 2>&1 || ret=1
 grep 'SHA-256' checkds.out.$n > /dev/null 2>&1 || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking for correct DS, obtaining key from file ($n)"
+echo_i "checking for correct DS, obtaining key from file ($n)"
 ret=0
 $CHECKDS -f ok.example.dnskey.db ok.example > checkds.out.$n || ret=1
 grep 'SHA-1' checkds.out.$n > /dev/null 2>&1 || ret=1
 grep 'SHA-256' checkds.out.$n > /dev/null 2>&1 || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking for correct DLV, looking up key via 'dig' ($n)"
+echo_i "checking for correct DLV, looking up key via 'dig' ($n)"
 ret=0
 $CHECKDS -l dlv.example ok.example > checkds.out.$n || ret=1
 grep 'SHA-1' checkds.out.$n > /dev/null 2>&1 || ret=1
 grep 'SHA-256' checkds.out.$n > /dev/null 2>&1 || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking for correct DLV, obtaining key from file ($n)"
+echo_i "checking for correct DLV, obtaining key from file ($n)"
 ret=0
 $CHECKDS -l dlv.example -f ok.example.dnskey.db ok.example > checkds.out.$n || ret=1
 grep 'SHA-1' checkds.out.$n > /dev/null 2>&1 || ret=1
 grep 'SHA-256' checkds.out.$n > /dev/null 2>&1 || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking for incorrect DS, lowronging up key via 'dig' ($n)"
+echo_i "checking for incorrect DS, lowronging up key via 'dig' ($n)"
 ret=0
 $CHECKDS wrong.example > checkds.out.$n || ret=1
 grep 'SHA-1' checkds.out.$n > /dev/null 2>&1 || ret=1
 grep 'SHA-256' checkds.out.$n > /dev/null 2>&1 || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking for incorrect DS, obtaining key from file ($n)"
+echo_i "checking for incorrect DS, obtaining key from file ($n)"
 ret=0
 $CHECKDS -f wrong.example.dnskey.db wrong.example > checkds.out.$n || ret=1
 grep 'SHA-1' checkds.out.$n > /dev/null 2>&1 || ret=1
 grep 'SHA-256' checkds.out.$n > /dev/null 2>&1 || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking for incorrect DLV, lowronging up key via 'dig' ($n)"
+echo_i "checking for incorrect DLV, lowronging up key via 'dig' ($n)"
 ret=0
 $CHECKDS -l dlv.example wrong.example > checkds.out.$n || ret=1
 grep 'SHA-1' checkds.out.$n > /dev/null 2>&1 || ret=1
 grep 'SHA-256' checkds.out.$n > /dev/null 2>&1 || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking for incorrect DLV, obtaining key from file ($n)"
+echo_i "checking for incorrect DLV, obtaining key from file ($n)"
 ret=0
 $CHECKDS -l dlv.example -f wrong.example.dnskey.db wrong.example > checkds.out.$n || ret=1
 grep 'SHA-1' checkds.out.$n > /dev/null 2>&1 || ret=1
 grep 'SHA-256' checkds.out.$n > /dev/null 2>&1 || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 
-echo "I:checking for partially missing DS, looking up key via 'dig' ($n)"
+echo_i "checking for partially missing DS, looking up key via 'dig' ($n)"
 ret=0
 $CHECKDS missing.example > checkds.out.$n || ret=1
 grep 'SHA-1.*found' checkds.out.$n > /dev/null 2>&1 || ret=1
@@ -106,10 +106,10 @@ grep 'SHA-256.*found' checkds.out.$n > /dev/null 2>&1 || ret=1
 grep 'SHA-1.*missing' checkds.out.$n > /dev/null 2>&1 || ret=1
 grep 'SHA-256.*missing' checkds.out.$n > /dev/null 2>&1 || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking for partially missing DS, obtaining key from file ($n)"
+echo_i "checking for partially missing DS, obtaining key from file ($n)"
 ret=0
 $CHECKDS -f missing.example.dnskey.db missing.example > checkds.out.$n || ret=1
 grep 'SHA-1.*found' checkds.out.$n > /dev/null 2>&1 || ret=1
@@ -117,10 +117,10 @@ grep 'SHA-256.*found' checkds.out.$n > /dev/null 2>&1 || ret=1
 grep 'SHA-1.*missing' checkds.out.$n > /dev/null 2>&1 || ret=1
 grep 'SHA-256.*missing' checkds.out.$n > /dev/null 2>&1 || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking for partially missing DLV, looking up key via 'dig' ($n)"
+echo_i "checking for partially missing DLV, looking up key via 'dig' ($n)"
 ret=0
 $CHECKDS -l dlv.example missing.example > checkds.out.$n || ret=1
 grep 'SHA-1.*found' checkds.out.$n > /dev/null 2>&1 || ret=1
@@ -128,10 +128,10 @@ grep 'SHA-256.*found' checkds.out.$n > /dev/null 2>&1 || ret=1
 grep 'SHA-1.*missing' checkds.out.$n > /dev/null 2>&1 || ret=1
 grep 'SHA-256.*missing' checkds.out.$n > /dev/null 2>&1 || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking for partially missing DLV, obtaining key from file ($n)"
+echo_i "checking for partially missing DLV, obtaining key from file ($n)"
 ret=0
 $CHECKDS -l dlv.example -f missing.example.dnskey.db missing.example > checkds.out.$n || ret=1
 grep 'SHA-1.*found' checkds.out.$n > /dev/null 2>&1 || ret=1
@@ -139,41 +139,41 @@ grep 'SHA-256.*found' checkds.out.$n > /dev/null 2>&1 || ret=1
 grep 'SHA-1.*missing' checkds.out.$n > /dev/null 2>&1 || ret=1
 grep 'SHA-256.*missing' checkds.out.$n > /dev/null 2>&1 || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking for entirely missing DS, looking up key via 'dig' ($n)"
+echo_i "checking for entirely missing DS, looking up key via 'dig' ($n)"
 ret=0
 $CHECKDS none.example > checkds.out.$n && ret=1
 grep 'No DS' checkds.out.$n > /dev/null 2>&1 || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking for entirely missing DS, obtaining key from file ($n)"
+echo_i "checking for entirely missing DS, obtaining key from file ($n)"
 ret=0
 $CHECKDS -f none.example.dnskey.db none.example > checkds.out.$n && ret=1
 grep 'No DS' checkds.out.$n > /dev/null 2>&1 || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking for entirely missing DLV, looking up key via 'dig' ($n)"
+echo_i "checking for entirely missing DLV, looking up key via 'dig' ($n)"
 ret=0
 $CHECKDS -l dlv.example none.example > checkds.out.$n && ret=1
 grep 'No DLV' checkds.out.$n > /dev/null 2>&1 || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking for entirely missing DLV, obtaining key from file ($n)"
+echo_i "checking for entirely missing DLV, obtaining key from file ($n)"
 ret=0
 $CHECKDS -l dlv.example -f none.example.dnskey.db none.example > checkds.out.$n && ret=1
 grep 'No DLV' checkds.out.$n > /dev/null 2>&1 || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 if [ $status = 0 ]; then $SHELL clean.sh; fi
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index 575c2ea0e1e8cda787e10546f86392eefc9b1cb6..52ef25ca64213af3cc4e0c9bbf47902228b3f177 100644 (file)
@@ -14,8 +14,7 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: clean.sh,v 1.6 2007/09/26 03:22:43 marka Exp $
-
+rm -f ns*/named.conf
 rm -f dig.out.ns?.test*
 rm -f nsupdate.out.test*
 rm -f ns1/*.example.db
similarity index 80%
rename from bin/tests/system/checknames/ns1/named.conf
rename to bin/tests/system/checknames/ns1/named.conf.in
index 51bf9080133fd7e0fa2f85ad5397ea06d1dbcb53..d9ce15ddd263f179b86065f6dc2fc81e56d9431c 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.9 2007/06/19 23:47:01 tbox Exp $ */
-
-controls { /* empty */ };
-
 options {
-        query-source address 10.53.0.1;
-        notify-source 10.53.0.1;
-        transfer-source 10.53.0.1;
-        port 5300;
-        pid-file "named.pid";
-        listen-on { 10.53.0.1; };
-        listen-on-v6 { none; };
-        recursion no;
-        notify yes;
+       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 no;
+       notify yes;
        check-integrity no;
 };
 
diff --git a/bin/tests/system/checknames/ns2/named.conf b/bin/tests/system/checknames/ns2/named.conf
deleted file mode 100644 (file)
index fd22e7d..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2004, 2007  Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: named.conf,v 1.7 2007/06/18 23:47:27 tbox Exp $ */
-
-controls { /* empty */ };
-
-options {
-        query-source address 10.53.0.2;
-        notify-source 10.53.0.2;
-        transfer-source 10.53.0.2;
-        port 5300;
-        pid-file "named.pid";
-        listen-on { 10.53.0.2; };
-        listen-on-v6 { none; };
-        recursion yes;
-       acache-enable yes;
-       check-names response warn;
-        notify yes;
-};
-
-zone "." {
-       type hint;
-       file "root.hints";
-};
similarity index 78%
rename from bin/tests/system/fetchlimit/lameserver/ns2/named.conf
rename to bin/tests/system/checknames/ns2/named.conf.in
index 2a5667a714d9359599804db38c753f24ac12b1f9..4aee139ec7ee3d6afdb33ed06d7412f48f2aba3c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015  Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2007  Internet Systems Consortium, Inc. ("ISC")
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-controls { /* empty */ };
-
 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; };
-       recursion no;
-       notify yes;
+       recursion yes;
+       acache-enable yes;
+       check-names response warn;
+        notify yes;
 };
 
-include "../../common/controls.conf";
-
-zone "example" {
-       type master;
-       file "example.db";
-       allow-update { any; };
+zone "." {
+       type hint;
+       file "root.hints";
 };
diff --git a/bin/tests/system/checknames/ns3/named.conf b/bin/tests/system/checknames/ns3/named.conf
deleted file mode 100644 (file)
index 2702b5c..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2004, 2007  Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: named.conf,v 1.7 2007/06/18 23:47:27 tbox Exp $ */
-
-controls { /* empty */ };
-
-options {
-        query-source address 10.53.0.3;
-        notify-source 10.53.0.3;
-        transfer-source 10.53.0.3;
-        port 5300;
-        pid-file "named.pid";
-        listen-on { 10.53.0.3; };
-        listen-on-v6 { none; };
-        recursion yes;
-       acache-enable yes;
-       check-names response fail;
-        notify yes;
-};
-
-zone "." {
-       type hint;
-       file "root.hints";
-};
diff --git a/bin/tests/system/checknames/ns3/named.conf.in b/bin/tests/system/checknames/ns3/named.conf.in
new file mode 100644 (file)
index 0000000..23a9607
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2004, 2007  Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+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 yes;
+       acache-enable yes;
+       check-names response fail;
+        notify yes;
+};
+
+zone "." {
+       type hint;
+       file "root.hints";
+};
similarity index 92%
rename from bin/tests/system/checknames/ns4/named.conf
rename to bin/tests/system/checknames/ns4/named.conf.in
index 9ada8739ea582153bce82cce4055600ba79e0a29..68e1384bb2dea4035760c3555cefeb7b84a8ea0c 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.7 2007/06/18 23:47:27 tbox Exp $ */
-
-controls { /* empty */ };
-
 options {
        query-source address 10.53.0.4;
        notify-source 10.53.0.4;
        transfer-source 10.53.0.4;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.4; };
        listen-on-v6 { none; };
index 3fea32aa3d25a48a64e84af020e38f78cb64c13a..61f65546c57efafbbba68d95e88d05fa44b25a0c 100644 (file)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: setup.sh,v 1.5 2007/06/19 23:47:01 tbox Exp $
+SYSTEMTESTTOP=..
+. $SYSTEMTESTTOP/conf.sh
+
+$SHELL clean.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
+copy_setports ns4/named.conf.in ns4/named.conf
 
 cp ns1/ignore.example.db.in ns1/ignore.example.db
 cp ns1/warn.example.db.in ns1/warn.example.db
index ad734eac6bf0ce00b4b1a047a040d393c562960a..1717616dd2d26b1ba8e7340da33f5685ac8c0bc6 100644 (file)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: tests.sh,v 1.5 2007/06/19 23:47:01 tbox Exp $
-
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
 status=0
 n=1
 
-DIGOPTS="+tcp +noadd +nosea +nostat +nocmd -p 5300"
+DIGOPTS="+tcp +noadd +nosea +nostat +nocmd -p ${PORT}"
 
 # Entry should exist.
-echo "I: check for failure from on zone load for 'check-names fail;' ($n)"
+echo_i "check for failure from on zone load for 'check-names fail;' ($n)"
 ret=0
 $DIG $DIGOPTS fail.example. @10.53.0.1 a > dig.out.ns1.test$n || ret=1
 grep SERVFAIL dig.out.ns1.test$n > /dev/null || ret=1
 grep 'xx_xx.fail.example: bad owner name (check-names)' ns1/named.run > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 n=`expr $n + 1`
 
 # Entry should exist.
-echo "I: check for warnings from on zone load for 'check-names warn;' ($n)"
+echo_i "check for warnings from on zone load for 'check-names warn;' ($n)"
 ret=0
 grep 'xx_xx.warn.example: bad owner name (check-names)' ns1/named.run > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 n=`expr $n + 1`
 
 # Entry should not exist.
-echo "I: check for warnings from on zone load for 'check-names ignore;' ($n)"
+echo_i "check for warnings from on zone load for 'check-names ignore;' ($n)"
 ret=1
 grep 'yy_yy.ignore.example: bad owner name (check-names)' ns1/named.run || ret=0
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 n=`expr $n + 1`
 
 # Entry should exist
-echo "I: check that 'check-names response warn;' works ($n)"
+echo_i "check that 'check-names response warn;' works ($n)"
 ret=0
 $DIG $DIGOPTS yy_yy.ignore.example. @10.53.0.1 a > dig.out.ns1.test$n || ret=1
 $DIG $DIGOPTS yy_yy.ignore.example. @10.53.0.2 a > dig.out.ns2.test$n || ret=1
 $PERL ../digcomp.pl dig.out.ns1.test$n dig.out.ns2.test$n || ret=1
 grep "check-names warning yy_yy.ignore.example/A/IN" ns2/named.run > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 n=`expr $n + 1`
 
 # Entry should exist
-echo "I: check that 'check-names response (owner) fails;' works ($n)"
+echo_i "check that 'check-names response (owner) fails;' works ($n)"
 ret=0
 $DIG $DIGOPTS yy_yy.ignore.example. @10.53.0.1 a > dig.out.ns1.test$n || ret=1
 $DIG $DIGOPTS yy_yy.ignore.example. @10.53.0.3 a > dig.out.ns3.test$n || ret=1
 grep NOERROR dig.out.ns1.test$n > /dev/null || ret=1
 grep REFUSED dig.out.ns3.test$n > /dev/null || ret=1
 grep "check-names failure yy_yy.ignore.example/A/IN" ns3/named.run > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 n=`expr $n + 1`
 
 # Entry should exist
-echo "I: check that 'check-names response (rdata) fails;' works ($n)"
+echo_i "check that 'check-names response (rdata) fails;' works ($n)"
 ret=0
 $DIG $DIGOPTS mx.ignore.example. @10.53.0.1 MX > dig.out.ns1.test$n || ret=1
 $DIG $DIGOPTS mx.ignore.example. @10.53.0.3 MX > dig.out.ns3.test$n || ret=1
 grep NOERROR dig.out.ns1.test$n > /dev/null || ret=1
 grep SERVFAIL dig.out.ns3.test$n > /dev/null || ret=1
 grep "check-names failure mx.ignore.example/MX/IN" ns3/named.run > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 n=`expr $n + 1`
 
-echo "I: check that updates to 'check-names fail;' are rejected ($n)"
+echo_i "check that updates to 'check-names fail;' are rejected ($n)"
 ret=0
 not=1
 $NSUPDATE -d <<END> nsupdate.out.test$n 2>&1 || not=0
-server 10.53.0.1 5300
+server 10.53.0.1 ${PORT}
 update add xxx_xxx.fail.update. 600 A 10.10.10.1
 send
 END
@@ -97,29 +95,29 @@ if [ $not != 0 ]; then ret=1; fi
 $DIG $DIGOPTS xxx_xxx.fail.update @10.53.0.1 A > dig.out.ns1.test$n || ret=1
 grep "xxx_xxx.fail.update/A: bad owner name (check-names)" ns1/named.run > /dev/null || ret=1
 grep NXDOMAIN dig.out.ns1.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 n=`expr $n + 1`
 
-echo "I: check that updates to 'check-names warn;' succeed and are logged ($n)"
+echo_i "check that updates to 'check-names warn;' succeed and are logged ($n)"
 ret=0
 $NSUPDATE -d <<END> nsupdate.out.test$n  2>&1|| ret=1
-server 10.53.0.1 5300
+server 10.53.0.1 ${PORT}
 update add xxx_xxx.warn.update. 600 A 10.10.10.1
 send
 END
 $DIG $DIGOPTS xxx_xxx.warn.update @10.53.0.1 A > dig.out.ns1.test$n || ret=1
 grep "xxx_xxx.warn.update/A: bad owner name (check-names)" ns1/named.run > /dev/null || ret=1
 grep NOERROR dig.out.ns1.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 n=`expr $n + 1`
 
-echo "I: check that updates to 'check-names ignore;' succeed and are not logged ($n)"
+echo_i "check that updates to 'check-names ignore;' succeed and are not logged ($n)"
 ret=0
 not=1
 $NSUPDATE -d <<END> nsupdate.out.test$n 2>&1 || ret=1
-server 10.53.0.1 5300
+server 10.53.0.1 ${PORT}
 update add xxx_xxx.ignore.update. 600 A 10.10.10.1
 send
 END
@@ -127,15 +125,15 @@ grep "xxx_xxx.ignore.update/A.*(check-names)" ns1/named.run > /dev/null || not=0
 if [ $not != 0 ]; then ret=1; fi
 $DIG $DIGOPTS xxx_xxx.ignore.update @10.53.0.1 A > dig.out.ns1.test$n || ret=1
 grep NOERROR dig.out.ns1.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 n=`expr $n + 1`
 
-echo "I: check that updates to 'check-names master ignore;' succeed and are not logged ($n)"
+echo_i "check that updates to 'check-names master ignore;' succeed and are not logged ($n)"
 ret=0
 not=1
 $NSUPDATE -d <<END> nsupdate.out.test$n 2>&1 || ret=1
-server 10.53.0.4 5300
+server 10.53.0.4 ${PORT}
 update add xxx_xxx.master-ignore.update. 600 A 10.10.10.1
 send
 END
@@ -143,9 +141,9 @@ grep "xxx_xxx.master-ignore.update/A.*(check-names)" ns1/named.run > /dev/null |
 if [ $not != 0 ]; then ret=1; fi
 $DIG $DIGOPTS xxx_xxx.master-ignore.update @10.53.0.4 A > dig.out.ns4.test$n || ret=1
 grep NOERROR dig.out.ns4.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 n=`expr $n + 1`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index b1f89fbcff54e3e8514dc1547ae467b878fcffcf..147ccb53c6d4e3838f81e104d1bd7df57bda8f31 100644 (file)
@@ -12,8 +12,6 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: tests.sh,v 1.2 2011/03/02 04:20:33 marka Exp $
-
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
@@ -22,7 +20,7 @@ n=1
 
 for db in zones/good*.db
 do
-       echo "I:checking $db ($n)"
+       echo_i "checking $db ($n)"
        ret=0
        case $db in
        zones/good-gc-msdcs.db)
@@ -36,13 +34,13 @@ do
                ;;
        esac
        n=`expr $n + 1`
-       if [ $ret != 0 ]; then echo "I:failed"; fi
+       if [ $ret != 0 ]; then echo_i "failed"; fi
        status=`expr $status + $ret`
 done
 
 for db in zones/bad*.db
 do
-       echo "I:checking $db ($n)"
+       echo_i "checking $db ($n)"
        ret=0
        case $db in
        zones/bad-dns-sd-reverse.db)
@@ -53,11 +51,11 @@ do
                ;;
        esac
        n=`expr $n + 1`
-       if [ $ret != 0 ]; then echo "I:failed"; fi
+       if [ $ret != 0 ]; then echo_i "failed"; fi
        status=`expr $status + $ret`
 done
 
-echo "I:checking with spf warnings ($n)"
+echo_i "checking with spf warnings ($n)"
 ret=0
 $CHECKZONE example zones/spf.db > test.out1.$n 2>&1 || ret=1
 $CHECKZONE -T ignore example zones/spf.db > test.out2.$n 2>&1 || ret=1
@@ -68,42 +66,42 @@ grep "'x.example' found type SPF" test.out2.$n > /dev/null && ret=1
 grep "'y.example' found type SPF" test.out2.$n > /dev/null && ret=1
 grep "'example' found type SPF" test.out2.$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking for no 'inherited owner' warning on '\$INCLUDE file' with no new \$ORIGIN ($n)"
+echo_i "checking for no 'inherited owner' warning on '\$INCLUDE file' with no new \$ORIGIN ($n)"
 ret=0
 $CHECKZONE example zones/nowarn.inherited.owner.db > test.out1.$n 2>&1 || ret=1
 grep "inherited.owner" test.out1.$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking for 'inherited owner' warning on '\$ORIGIN + \$INCLUDE file' ($n)"
+echo_i "checking for 'inherited owner' warning on '\$ORIGIN + \$INCLUDE file' ($n)"
 ret=0
 $CHECKZONE example zones/warn.inherit.origin.db > test.out1.$n 2>&1 || ret=1
 grep "inherited.owner" test.out1.$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking for 'inherited owner' warning on '\$INCLUDE file origin' ($n)"
+echo_i "checking for 'inherited owner' warning on '\$INCLUDE file origin' ($n)"
 ret=0
 $CHECKZONE example zones/warn.inherited.owner.db > test.out1.$n 2>&1 || ret=1
 grep "inherited.owner" test.out1.$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that raw zone with bad class is handled ($n)"
+echo_i "checking that raw zone with bad class is handled ($n)"
 ret=0
 $CHECKZONE -f raw example zones/bad-badclass.raw > test.out.$n 2>&1 && ret=1
 grep "failed: bad class" test.out.$n >/dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that expirations that loop using serial arithmetic are handled ($n)"
+echo_i "checking that expirations that loop using serial arithmetic are handled ($n)"
 ret=0
 q=-q
 test $ret -eq 1 || $CHECKZONE $q dyn.example.net zones/crashzone.db || ret=1
@@ -129,24 +127,24 @@ test $ret -eq 1 || $CHECKZONE $q dyn.example.net zones/crashzone.db || ret=1
 test $ret -eq 1 || $CHECKZONE $q dyn.example.net zones/crashzone.db || ret=1
 test $ret -eq 1 || $CHECKZONE $q dyn.example.net zones/crashzone.db || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that nameserver below DNAME is reported even with occulted address record present ($n)"
+echo_i "checking that nameserver below DNAME is reported even with occulted address record present ($n)"
 ret=0
 $CHECKZONE example.com zones/ns-address-below-dname.db > test.out.$n 2>&1 && ret=1
 grep "is below a DNAME" test.out.$n >/dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that delegating nameserver below DNAME is reported even with occulted address record present ($n)"
+echo_i "checking that delegating nameserver below DNAME is reported even with occulted address record present ($n)"
 ret=0
 $CHECKZONE example.com zones/delegating-ns-address-below-dname.db > test.out.$n 2>&1 || ret=1
 grep "is below a DNAME" test.out.$n >/dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index 6088d1b5bb19fec4c5f287af06b9300bd5fce495..31f8c532d0103cfe734f252f00ecb1ff15dca764 100644 (file)
@@ -31,6 +31,8 @@ find . -type f \( \
 
 status=0
 
+rm -f $SYSTEMTESTTOP/random.data
+
 for d in $SUBDIRS
 do
    test ! -f $d/clean.sh || ( cd $d && $SHELL clean.sh )
index e409d4dae999bc673dc2b8618197ad2306cdcacd..0f3d9a9896e218e6872413ce74ef9b0d4f05f462 100644 (file)
@@ -66,10 +66,21 @@ KRB5_CONFIG=/dev/null
 
 # The "stress" test is not run by default since it creates enough
 # load on the machine to make it unusable to other users.
-# v6synth
-SUBDIRS="acl additional allow_query addzone autosign builtin
-        cacheclean case chain checkconf @CHECKDS@ checknames checkzone
-        @COVERAGE@ database digdelv dlv dlz dlzexternal
+# The "dialup" and "delzone" tests are also not run by default because
+# they take a very long time to complete.
+#
+# List of tests hard-coded to use ports 5300 and 9953. For this
+# reason, these must be run sequentially.
+SEQUENTIALDIRS="ecdsa eddsa gost lwresd pkcs11 tkey"
+
+# List of tests that use ports assigned by caller (other than 5300
+# and 9953). Because separate blocks of ports can be used for teach
+# test, these tests can be run in parallel.
+#
+# This symbol must be kept in step with the PARALLEL macro in Makefile.in
+PARALLELDIRS="acl additional allow_query addzone autosign builtin
+        cacheclean case chain checkconf @CHECKDS@ checknames
+         checkzone @COVERAGE@ database digdelv dlv dlz dlzexternal
         dns64 dnssec ecdsa eddsa emptyzones fetchlimit filter-aaaa
         formerr forward glue gost inline integrity ixfr legacy
         limits logfileconfig lwresd masterfile masterformat metadata
@@ -78,6 +89,8 @@ SUBDIRS="acl additional allow_query addzone autosign builtin
         sortlist spf staticstub stub tkey tsig tsiggss unknown
         upforwd verify views wildcard xfer xferquota zero zonechecks"
 
+SUBDIRS="$SEQUENTIALDIRS $PARALLELDIRS"
+
 # Things that are different on Windows
 KILL=kill
 DIFF=diff
@@ -167,6 +180,56 @@ else
        }
 fi
 
+SYSTESTDIR="`basename $PWD`"
+
+echo_i() {
+    echo "$@" | while read LINE ; do
+       echoinfo "I:$SYSTESTDIR:$LINE"
+    done
+}
+
+cat_i() {
+    while read LINE ; do
+       echoinfo "I:$SYSTESTDIR:$LINE"
+    done
+}
+
+#
+# Useful functions in test scripts
+#
+
+# nextpart: read everything that's been appended to a file since the
+# last time 'nextpart' was called.
+nextpart () {
+    [ -f $1.prev ] || echo "0" > $1.prev
+    prev=`cat $1.prev`
+    awk "NR > $prev "'{ print }
+         END          { print NR > "/dev/stderr" }' $1 2> $1.prev
+}
+
+# copy_setports - Copy Configuration File and Replace Ports
+#
+# Convenience function to copy a configuration file, replacing the tokens
+# QUERYPORT, CONTROLPORT and EXTRAPORT[1-8] with the values of the equivalent
+# environment variables. (These values are set by "run.sh", which calls the
+# scripts invoking this function.)
+#
+# Usage:
+#   copy_setports infile outfile
+
+copy_setports() {
+    sed -e "s/@PORT@/${PORT}/g" \
+        -e "s/@EXTRAPORT1@/${EXTRAPORT1}/g" \
+        -e "s/@EXTRAPORT2@/${EXTRAPORT2}/g" \
+        -e "s/@EXTRAPORT3@/${EXTRAPORT3}/g" \
+        -e "s/@EXTRAPORT4@/${EXTRAPORT4}/g" \
+        -e "s/@EXTRAPORT5@/${EXTRAPORT5}/g" \
+        -e "s/@EXTRAPORT6@/${EXTRAPORT6}/g" \
+        -e "s/@EXTRAPORT7@/${EXTRAPORT7}/g" \
+        -e "s/@EXTRAPORT8@/${EXTRAPORT8}/g" \
+        -e "s/@CONTROLPORT@/${CONTROLPORT}/g" $1 > $2
+}
+
 #
 # Export command paths
 #
index 582c6ba6a7bb04dfc20e07faaeb69cf6bbf93ed9..5f298e28c84b4349aab60d870be4cdb3e05d81e2 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright (C) 2014  Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
 #
 # Permission to use, copy, modify, and/or distribute this software for any
 # purpose with or without fee is hereby granted, provided that the above
index 8503eee8c786bed37d0a9c2a4e5e4eb7280b94b1..5e151b014590e58e36d431b68114fed54462deea 100644 (file)
@@ -32,11 +32,11 @@ matchall () {
     done
 }
 
-echo "I:checking for DNSSEC key coverage issues"
+echo_i "checking for DNSSEC key coverage issues"
 ret=0
 for dir in [0-9][0-9]-*; do
         ret=0
-        echo "I:$dir"
+        echo_i "$dir"
         args= warn= error= ok= retcode= match=
         . $dir/expect
         $COVERAGE $args -K $dir example.com > coverage.$n 2>&1
@@ -60,9 +60,9 @@ for dir in [0-9][0-9]-*; do
         [ "$found" = "FAIL" ] && ret=1
 
         n=`expr $n + 1`
-        if [ $ret != 0 ]; then echo "I:failed"; fi
+        if [ $ret != 0 ]; then echo_i "failed"; fi
         status=`expr $status + $ret`
 done
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index d3e32dd532c55dbe3fe48584d94cc84a7f2d7771..96cb76143a29c38fbe6e833a75d8f4f57220834b 100644 (file)
@@ -14,7 +14,5 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: clean.sh,v 1.3 2011/03/01 23:48:05 tbox Exp $
-
 rm -f ns1/named.conf ns1/named.run ns1/named.memstats
 rm -f dig.out.*
similarity index 89%
rename from bin/tests/system/database/ns1/named.conf1
rename to bin/tests/system/database/ns1/named1.conf.in
index 08dedc8cb73efab7e0a526d99a7532cff7f98044..09b17b6249e0055d1013899ea3003c682f8e3eb0 100644 (file)
@@ -14,8 +14,6 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf1,v 1.3 2011/03/01 23:48:06 tbox Exp $ */
-
 // NS1
 
 key rndc_key {
@@ -24,14 +22,14 @@ key rndc_key {
 };
 
 controls {
-        inet 10.53.0.1 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.1 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 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 89%
rename from bin/tests/system/database/ns1/named.conf2
rename to bin/tests/system/database/ns1/named2.conf.in
index c79bf9b742ea0859fe88b4ef5ba23f7744c0fe3e..56b568143bed92ed2175e9352a585c159d7076c6 100644 (file)
@@ -14,8 +14,6 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf2,v 1.3 2011/03/01 23:48:06 tbox Exp $ */
-
 // NS1
 
 key rndc_key {
@@ -24,14 +22,14 @@ key rndc_key {
 };
 
 controls {
-        inet 10.53.0.1 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.1 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 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; };
index 1e6c912b1123c13364d285e30e1d3d43eb74367d..8cf4bbdd5f41bc1a594271d9504d46d9cd09bb0f 100644 (file)
@@ -14,6 +14,8 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: setup.sh,v 1.3 2011/03/01 23:48:05 tbox Exp $
+SYSTEMTESTTOP=..
+. $SYSTEMTESTTOP/conf.sh
 
-cp ns1/named.conf1 ns1/named.conf
+$SHELL clean.sh
+copy_setports ns1/named1.conf.in ns1/named.conf
index 71697ca3e399d751e1a26dd3db274fca52d53781..46afe69682e96825013d7fa691701e00f9c7818a 100644 (file)
@@ -14,8 +14,6 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: tests.sh,v 1.3 2011/03/01 23:48:05 tbox Exp $
-
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
@@ -24,23 +22,23 @@ n=0
 
 rm -f dig.out.*
 
-DIGOPTS="+tcp +noadd +nosea +nostat +nocmd +dnssec -p 5300"
-RNDCCMD="$RNDC -s 10.53.0.1 -p 9953 -c ../common/rndc.conf"
+DIGOPTS="+tcp +noadd +nosea +nostat +nocmd +dnssec -p ${PORT}"
+RNDCCMD="$RNDC -s 10.53.0.1 -p ${CONTROLPORT} -c ../common/rndc.conf"
 
 # Check the example. domain
 
-echo "I:checking pre reload zone ($n)"
+echo_i "checking pre reload zone ($n)"
 ret=0
 $DIG $DIGOPTS soa database. @10.53.0.1 > dig.out.ns1.test$n || ret=1
 grep "hostmaster\.isc\.org" dig.out.ns1.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-cp ns1/named.conf2 ns1/named.conf
+copy_setports ns1/named2.conf.in ns1/named.conf
 $RNDCCMD reload 2>&1 >/dev/null
 
-echo "I:checking post reload zone ($n)"
+echo_i "checking post reload zone ($n)"
 ret=1
 try=0
 while test $try -lt 6
@@ -53,8 +51,8 @@ do
        test $ret -eq 0 && break
 done
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index d56c5c55b5f0488df5313942bdd9ff7cd86ee615..820320a1973b101d2809b8c60fdbc2cee8dd8850 100644 (file)
@@ -18,4 +18,5 @@ rm -f dig.out.*test*
 rm -f delv.out.test*
 rm -f */named.memstats
 rm -f */named.run
+rm -f */named.conf
 rm -f ns*/named.lock
similarity index 96%
rename from bin/tests/system/digdelv/ns1/named.conf
rename to bin/tests/system/digdelv/ns1/named.conf.in
index c5f047084167cee09fb4d9745b5198a9c9297618..44a1be3cf6057968a360ebecb4094f1362978cf7 100644 (file)
 
 // NS1
 
-controls { /* empty */ };
-
 options {
        query-source address 10.53.0.1;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.1; };
        listen-on-v6 { fd92:7065:b8e:ffff::1; };
@@ -34,4 +32,3 @@ zone "." {
        type master;
        file "root.db";
 };
-
similarity index 96%
rename from bin/tests/system/digdelv/ns2/named.conf
rename to bin/tests/system/digdelv/ns2/named.conf.in
index 266e958188f260228f153717eceef0ae51e28667..53da3a1aee1087e4fdfcbea90833ef0411758e99 100644 (file)
 
 // NS2
 
-controls { /* empty */ };
-
 options {
        query-source address 10.53.0.2;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.2; };
        listen-on-v6 { fd92:7065:b8e:ffff::2; };
similarity index 95%
rename from bin/tests/system/digdelv/ns3/named.conf
rename to bin/tests/system/digdelv/ns3/named.conf.in
index e73c543ab337eee84b476f7a36f3229e457b7093..410086be80fc82192fa9dcbf8b674caa36ccc90c 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-// NS4
-
-controls { /* empty */ };
-
 options {
        query-source address 10.53.0.3;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.3; };
        listen-on-v6 { fd92:7065:b8e:ffff::3; };
diff --git a/bin/tests/system/digdelv/setup.sh b/bin/tests/system/digdelv/setup.sh
new file mode 100644 (file)
index 0000000..e877403
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# Copyright (C)  2018  Internet Systems Consortium, Inc. ("ISC")
+#
+# 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 http://mozilla.org/MPL/2.0/.
+
+SYSTEMTESTTOP=..
+. $SYSTEMTESTTOP/conf.sh
+
+$SHELL clean.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 d5da3dbacd06f7e870cc1dff3f2712d62bcea330..92affa59e9b37188b3577fcd10cb07774650c157 100644 (file)
@@ -18,118 +18,118 @@ SYSTEMTESTTOP=..
 status=0
 n=0
 # using dig insecure mode as not testing dnssec here
-DIGOPTS="-i -p 5300"
-SENDCMD="$PERL $SYSTEMTESTTOP/send.pl 10.53.0.4 5301"
+DIGOPTS="-i -p ${PORT}"
+SENDCMD="$PERL $SYSTEMTESTTOP/send.pl 10.53.0.4 ${EXTRAPORT1}"
 
 if [ -x ${DIG} ] ; then
   n=`expr $n + 1`
-  echo "I:checking dig short form works ($n)"
+  echo_i "checking dig short form works ($n)"
   ret=0
   $DIG $DIGOPTS @10.53.0.3 +short a a.example > dig.out.test$n || ret=1
   if test `wc -l < dig.out.test$n` != 1 ; then ret=1 ; fi
-  if [ $ret != 0 ]; then echo "I:failed"; fi 
+  if [ $ret != 0 ]; then echo_i "failed"; fi
   status=`expr $status + $ret`
 
   n=`expr $n + 1`
-  echo "I:checking dig split width works ($n)"
+  echo_i "checking dig split width works ($n)"
   ret=0
   $DIG $DIGOPTS @10.53.0.3 +split=4 -t sshfp foo.example > dig.out.test$n || ret=1
   grep " 9ABC DEF6 7890 " < dig.out.test$n > /dev/null || ret=1
-  if [ $ret != 0 ]; then echo "I:failed"; fi 
+  if [ $ret != 0 ]; then echo_i "failed"; fi
   status=`expr $status + $ret`
 
   n=`expr $n + 1`
-  echo "I:checking dig with reverse lookup works ($n)"
+  echo_i "checking dig with reverse lookup works ($n)"
   ret=0
   $DIG $DIGOPTS @10.53.0.3 -x 127.0.0.1 > dig.out.test$n 2>&1 || ret=1
   # doesn't matter if has answer
   grep -i "127\.in-addr\.arpa\." < dig.out.test$n > /dev/null || ret=1
-  if [ $ret != 0 ]; then echo "I:failed"; fi 
+  if [ $ret != 0 ]; then echo_i "failed"; fi
   status=`expr $status + $ret`
 
   n=`expr $n + 1`
-  echo "I:checking dig over TCP works ($n)"
+  echo_i "checking dig over TCP works ($n)"
   ret=0
   $DIG $DIGOPTS +tcp @10.53.0.3 a a.example > dig.out.test$n || ret=1
   grep "10\.0\.0\.1$" < dig.out.test$n > /dev/null || ret=1
-  if [ $ret != 0 ]; then echo "I:failed"; fi
+  if [ $ret != 0 ]; then echo_i "failed"; fi
   status=`expr $status + $ret`
 
   n=`expr $n + 1`
-  echo "I:checking dig +multi +norrcomments works for dnskey (when default is rrcomments)($n)"
+  echo_i "checking dig +multi +norrcomments works for dnskey (when default is rrcomments)($n)"
   ret=0
   $DIG $DIGOPTS +tcp @10.53.0.3 +multi +norrcomments DNSKEY dnskey.example > dig.out.test$n || ret=1
   grep "; ZSK; alg = RSAMD5 ; key id = 30795" < dig.out.test$n > /dev/null && ret=1
-  if [ $ret != 0 ]; then echo "I:failed"; fi
+  if [ $ret != 0 ]; then echo_i "failed"; fi
   status=`expr $status + $ret`
 
   n=`expr $n + 1`
-  echo "I:checking dig +multi +norrcomments works for soa (when default is rrcomments)($n)"
+  echo_i "checking dig +multi +norrcomments works for soa (when default is rrcomments)($n)"
   ret=0
   $DIG $DIGOPTS +tcp @10.53.0.3 +multi +norrcomments SOA example > dig.out.test$n || ret=1
   grep "; ZSK; alg = RSAMD5 ; key id = 30795" < dig.out.test$n > /dev/null && ret=1
-  if [ $ret != 0 ]; then echo "I:failed"; fi
+  if [ $ret != 0 ]; then echo_i "failed"; fi
   status=`expr $status + $ret`
 
   n=`expr $n + 1`
-  echo "I:checking dig +rrcomments works for DNSKEY($n)"
+  echo_i "checking dig +rrcomments works for DNSKEY($n)"
   ret=0
   $DIG $DIGOPTS +tcp @10.53.0.3 +rrcomments DNSKEY dnskey.example > dig.out.test$n || ret=1
   grep "; ZSK; alg = RSAMD5 ; key id = 30795" < dig.out.test$n > /dev/null || ret=1
-  if [ $ret != 0 ]; then echo "I:failed"; fi
+  if [ $ret != 0 ]; then echo_i "failed"; fi
   status=`expr $status + $ret`
 
   n=`expr $n + 1`
-  echo "I:checking dig +short +rrcomments works for DNSKEY ($n)"
+  echo_i "checking dig +short +rrcomments works for DNSKEY ($n)"
   ret=0
   $DIG $DIGOPTS +tcp @10.53.0.3 +short +rrcomments DNSKEY dnskey.example > dig.out.test$n || ret=1
   grep "; ZSK; alg = RSAMD5 ; key id = 30795" < dig.out.test$n > /dev/null || ret=1
-  if [ $ret != 0 ]; then echo "I:failed"; fi
+  if [ $ret != 0 ]; then echo_i "failed"; fi
   status=`expr $status + $ret`
 
   n=`expr $n + 1`
-  echo "I:checking dig +short +nosplit works($n)"
+  echo_i "checking dig +short +nosplit works($n)"
   ret=0
   $DIG $DIGOPTS +tcp @10.53.0.3 +short +nosplit DNSKEY dnskey.example > dig.out.test$n || ret=1
   grep "Z8plc4Rb9VIE5x7KNHAYTvTO5d4S8M=$" < dig.out.test$n > /dev/null || ret=1
-  if [ $ret != 0 ]; then echo "I:failed"; fi
+  if [ $ret != 0 ]; then echo_i "failed"; fi
   status=`expr $status + $ret`
 
   n=`expr $n + 1`
-  echo "I:checking dig +short +rrcomments works($n)"
+  echo_i "checking dig +short +rrcomments works($n)"
   ret=0
   $DIG $DIGOPTS +tcp @10.53.0.3 +short +rrcomments DNSKEY dnskey.example > dig.out.test$n || ret=1
   grep "S8M=  ; ZSK; alg = RSAMD5 ; key id = 30795$" < dig.out.test$n > /dev/null || ret=1
-  if [ $ret != 0 ]; then echo "I:failed"; fi
+  if [ $ret != 0 ]; then echo_i "failed"; fi
   status=`expr $status + $ret`
 
   n=`expr $n + 1`
-  echo "I:checking dig +short +rrcomments works($n)"
+  echo_i "checking dig +short +rrcomments works($n)"
   ret=0
   $DIG $DIGOPTS +tcp @10.53.0.3 +short +rrcomments DNSKEY dnskey.example > dig.out.test$n || ret=1
   grep "S8M=  ; ZSK; alg = RSAMD5 ; key id = 30795$" < dig.out.test$n > /dev/null || ret=1
-  if [ $ret != 0 ]; then echo "I:failed"; fi
+  if [ $ret != 0 ]; then echo_i "failed"; fi
   status=`expr $status + $ret`
 
 #  n=`expr $n + 1`
-#  echo "I:checking dig +zflag works, and that BIND properly ignores it ($n)"
+#  echo_i "checking dig +zflag works, and that BIND properly ignores it ($n)"
 #  ret=0
 #  $DIG $DIGOPTS +tcp @10.53.0.3 +zflag +qr A example > dig.out.test$n || ret=1
 #  sed -n '/Sending:/,/Got answer:/p' dig.out.test$n | grep "^;; flags: rd ad; MBZ: 0x4;" > /dev/null || ret=1
 #  sed -n '/Got answer:/,/AUTHORITY SECTION:/p' dig.out.test$n | grep "^;; flags: qr rd ra; QUERY: 1" > /dev/null || ret=1
-#  if [ $ret != 0 ]; then echo "I:failed"; fi
+#  if [ $ret != 0 ]; then echo_i "failed"; fi
 #  status=`expr $status + $ret`
 
 # n=`expr $n + 1`
-# echo "I:checking dig +qr +ednsopt=08 does not cause an INSIST failure ($n)"
+# echo_i "checking dig +qr +ednsopt=08 does not cause an INSIST failure ($n)"
 # ret=0
 # $DIG $DIGOPTS @10.53.0.3 +ednsopt=08 +qr a a.example > dig.out.test$n || ret=1
 # grep "INSIST" < dig.out.test$n > /dev/null && ret=1
 # grep "FORMERR" < dig.out.test$n > /dev/null || ret=1
-# if [ $ret != 0 ]; then echo "I:failed"; fi
+# if [ $ret != 0 ]; then echo_i "failed"; fi
 # status=`expr $status + $ret`
 
-# echo "I:checking dig +ttlunits works ($n)"
+# echo_i "checking dig +ttlunits works ($n)"
 # ret=0
 # $DIG $DIGOPTS +tcp @10.53.0.2 +ttlunits A weeks.example > dig.out.test$n || ret=1
 # grep "^weeks.example.                3w" < dig.out.test$n > /dev/null || ret=1
@@ -141,11 +141,11 @@ if [ -x ${DIG} ] ; then
 # grep "^minutes.example.      45m" < dig.out.test$n > /dev/null || ret=1
 # $DIG $DIGOPTS +tcp @10.53.0.2 +ttlunits A seconds.example > dig.out.test$n || ret=1
 # grep "^seconds.example.      45s" < dig.out.test$n > /dev/null || ret=1
-# if [ $ret != 0 ]; then echo "I:failed"; fi
+# if [ $ret != 0 ]; then echo_i "failed"; fi
 # status=`expr $status + $ret`
 
 # n=`expr $n + 1`
-# echo "I:checking dig respects precedence of options with +ttlunits ($n)"
+# echo_i "checking dig respects precedence of options with +ttlunits ($n)"
 # ret=0
 # $DIG $DIGOPTS +tcp @10.53.0.2 +ttlunits +nottlid A weeks.example > dig.out.test$n || ret=1
 # grep "^weeks.example.                IN" < dig.out.test$n > /dev/null || ret=1
@@ -153,11 +153,11 @@ if [ -x ${DIG} ] ; then
 # grep "^weeks.example.                3w" < dig.out.test$n > /dev/null || ret=1
 # $DIG $DIGOPTS +tcp @10.53.0.2 +nottlid +nottlunits A weeks.example > dig.out.test$n || ret=1
 # grep "^weeks.example.                1814400" < dig.out.test$n > /dev/null || ret=1
-# if [ $ret != 0 ]; then echo "I:failed"; fi
+# if [ $ret != 0 ]; then echo_i "failed"; fi
 # status=`expr $status + $ret`
   
   n=`expr $n + 1`
-  echo "I:checking dig preserves origin on TCP retries ($n)"
+  echo_i "checking dig preserves origin on TCP retries ($n)"
   ret=0
   # Ask ans4 to still accept TCP connections, but not respond to queries
   echo "//" | $SENDCMD
@@ -165,32 +165,32 @@ if [ -x ${DIG} ] ; then
   l=`grep "trying origin bar" dig.out.test$n | wc -l`
   [ ${l:-0} -eq 2 ] || ret=1
   grep "using root origin" < dig.out.test$n > /dev/null && ret=1
-  if [ $ret != 0 ]; then echo "I:failed"; fi
+  if [ $ret != 0 ]; then echo_i "failed"; fi
   status=`expr $status + $ret`
 
   n=`expr $n + 1`
-  echo "I:checking dig +ednsopt=8:00000000 (family=0, source=0, scope=0) ($n)"
+  echo_i "checking dig +ednsopt=8:00000000 (family=0, source=0, scope=0) ($n)"
   ret=0
   $DIG $DIGOPTS +tcp @10.53.0.2 -4 -6 A a.example > dig.out.test$n 2>&1 && ret=1
   grep "only one of -4 and -6 allowed" < dig.out.test$n > /dev/null || ret=1
-  if [ $ret != 0 ]; then echo "I:failed"; fi
+  if [ $ret != 0 ]; then echo_i "failed"; fi
   status=`expr $status + $ret`
   
   n=`expr $n + 1`
-  echo "I:checking dig @IPv6addr -4 A a.example ($n)"
+  echo_i "checking dig @IPv6addr -4 A a.example ($n)"
   if $TESTSOCK6 fd92:7065:b8e:ffff::2
   then
     ret=0
     $DIG $DIGOPTS +tcp @fd92:7065:b8e:ffff::2 -4 A a.example > dig.out.test$n 2>&1 && ret=1
     grep "address family not supported" < dig.out.test$n > /dev/null || ret=1
-    if [ $ret != 0 ]; then echo "I:failed"; fi
+    if [ $ret != 0 ]; then echo_i "failed"; fi
     status=`expr $status + $ret`
   else
-    echo "I:IPv6 unavailable; skipping"
+    echo_i "IPv6 unavailable; skipping"
   fi
   
   n=`expr $n + 1`
-  echo "I:checking dig @IPv4addr -6 A a.example ($n)"
+  echo_i "checking dig @IPv4addr -6 A a.example ($n)"
   if $TESTSOCK6 fd92:7065:b8e:ffff::2
   then
     ret=0
@@ -202,32 +202,32 @@ if [ -x ${DIG} ] ; then
       $DIG $DIGOPTS +tcp @10.53.0.2 -6 A a.example > dig.out.test$n 2>&1 && ret=1
       grep "::ffff:10.53.0.2" < dig.out.test$n > /dev/null || ret=1
     fi
-    if [ $ret != 0 ]; then echo "I:failed"; fi
+    if [ $ret != 0 ]; then echo_i "failed"; fi
     status=`expr $status + $ret`
   else
-    echo "I:IPv6 unavailable; skipping"
+    echo_i "IPv6 unavailable; skipping"
   fi
   
   n=`expr $n + 1`
-  echo "I:checking dig +sp works as an abbreviated form of split ($n)"
+  echo_i "checking dig +sp works as an abbreviated form of split ($n)"
   ret=0
   $DIG $DIGOPTS @10.53.0.3 +sp=4 -t sshfp foo.example > dig.out.test$n || ret=1
   grep " 9ABC DEF6 7890 " < dig.out.test$n > /dev/null || ret=1
-  if [ $ret != 0 ]; then echo "I:failed"; fi 
+  if [ $ret != 0 ]; then echo_i "failed"; fi
   status=`expr $status + $ret`
 
   n=`expr $n + 1`
-  echo "I:checking dig -c works ($n)"
+  echo_i "checking dig -c works ($n)"
   ret=0
   $DIG $DIGOPTS @10.53.0.3 -c CHAOS -t txt version.bind > dig.out.test$n || ret=1
   grep "version.bind.          0       CH      TXT" < dig.out.test$n > /dev/null || ret=1
-  if [ $ret != 0 ]; then echo "I:failed"; fi 
+  if [ $ret != 0 ]; then echo_i "failed"; fi
   status=`expr $status + $ret`
 
   n=`expr $n + 1`
   if $FEATURETEST --with-idn
   then
-    echo "I:checking dig +idnout ($n)"
+    echo_i "checking dig +idnout ($n)"
     ret=0
     $DIG $DIGOPTS @10.53.0.3 +noidnout xn--caf-dma.example. > dig.out.1.test$n 2>&1 || ret=1
     $DIG $DIGOPTS @10.53.0.3 +idnout xn--caf-dma.example. > dig.out.2.test$n 2>&1 || ret=1
@@ -235,170 +235,48 @@ if [ -x ${DIG} ] ; then
     grep "^xn--caf-dma.example" dig.out.2.test$n > /dev/null && ret=1
     grep 10.1.2.3 dig.out.1.test$n > /dev/null || ret=1
     grep 10.1.2.3 dig.out.2.test$n > /dev/null || ret=1
-    if [ $ret != 0 ]; then echo "I:failed"; fi
+    if [ $ret != 0 ]; then echo_i "failed"; fi
     status=`expr $status + $ret`
   else
-    echo "I:skipping 'dig +idnout' as IDN support is not enabled ($n)"
+    echo_i "skipping 'dig +idnout' as IDN support is not enabled ($n)"
   fi
 
   n=`expr $n + 1`
-  echo "I:checking that dig warns about .local queries ($n)"
+  echo_i "checking that dig warns about .local queries ($n)"
   ret=0
   $DIG $DIGOPTS @10.53.0.3 local soa > dig.out.test$n 2>&1 || ret=1
   grep ";; WARNING: .local is reserved for Multicast DNS" dig.out.test$n > /dev/null || ret=1
-  if [ $ret != 0 ]; then echo "I:failed"; fi
+  if [ $ret != 0 ]; then echo_i "failed"; fi
   status=`expr $status + $ret`
 
   #n=`expr $n + 1`
-  #echo "I:check that dig processes +ednsopt=14 (key tag) and FORMERR is returned ($n)"
+  #echo_i "check that dig processes +ednsopt=14 (key tag) and FORMERR is returned ($n)"
   #$DIG $DIGOPTS @10.53.0.3 +ednsopt=14 a.example +qr > dig.out.test$n 2>&1 || ret=1
   #grep "; KEY-TAG$" dig.out.test$n > /dev/null || ret=1
   #grep "status: FORMERR" dig.out.test$n > /dev/null || ret=1
-  #if [ $ret != 0 ]; then echo "I:failed"; fi
+  #if [ $ret != 0 ]; then echo_i "failed"; fi
   #status=`expr $status + $ret`
 
   #n=`expr $n + 1`
-  #echo "I:check that dig processes +ednsopt=14:<value-list> (keytag) ($n)"
+  #echo_i "check that dig processes +ednsopt=14:<value-list> (keytag) ($n)"
   #$DIG $DIGOPTS @10.53.0.3 +ednsopt=14:00010002 a.example +qr > dig.out.test$n 2>&1 || ret=1
   #grep "; KEY-TAG: 1, 2$" dig.out.test$n > /dev/null || ret=1
   #grep "status: FORMERR" dig.out.test$n > /dev/null && ret=1
-  #if [ $ret != 0 ]; then echo "I:failed"; fi
+  #if [ $ret != 0 ]; then echo_i "failed"; fi
   #status=`expr $status + $ret`
 
   #n=`expr $n + 1`
-  #echo "I:check that dig processes +ednsopt=14:<malformed-value-list> (keytag) and FORMERR is returned ($n)"
+  #echo_i "check that dig processes +ednsopt=14:<malformed-value-list> (keytag) and FORMERR is returned ($n)"
   #ret=0
   #$DIG $DIGOPTS @10.53.0.3 +ednsopt=14:0001000201 a.example +qr > dig.out.test$n 2>&1 || ret=1
   #grep "; KEY-TAG: 00 01 00 02 01" dig.out.test$n > /dev/null || ret=1
   #grep "status: FORMERR" dig.out.test$n > /dev/null || ret=1
-  #if [ $ret != 0 ]; then echo "I:failed"; fi
+  #if [ $ret != 0 ]; then echo_i "failed"; fi
   #status=`expr $status + $ret`
 
 else
-  echo "$DIG is needed, so skipping these dig tests"
+  echo_i "$DIG is needed, so skipping these dig tests"
 fi
 
-# using delv insecure mode as not testing dnssec here
-DELVOPTS="-i -p 5300"
-
-if [ -n "${DELV}" -a -x "${DELV}" ] ; then
-  n=`expr $n + 1`
-  echo "I:checking delv short form works ($n)"
-  ret=0
-  $DELV $DELVOPTS @10.53.0.3 +short a a.example > delv.out.test$n || ret=1
-  if test `wc -l < delv.out.test$n` != 1 ; then ret=1 ; fi
-  if [ $ret != 0 ]; then echo "I:failed"; fi 
-  status=`expr $status + $ret`
-
-  n=`expr $n + 1`
-  echo "I:checking delv split width works ($n)"
-  ret=0
-  $DELV $DELVOPTS @10.53.0.3 +split=4 -t sshfp foo.example > delv.out.test$n || ret=1
-  grep " 9ABC DEF6 7890 " < delv.out.test$n > /dev/null || ret=1
-  if [ $ret != 0 ]; then echo "I:failed"; fi 
-  status=`expr $status + $ret`
-
-  n=`expr $n + 1`
-  echo "I:checking delv with IPv6 on IPv4 does not work ($n)"
-  if $TESTSOCK6 fd92:7065:b8e:ffff::3
-  then
-    ret=0
-    # following should fail because @IPv4 overrides earlier @IPv6 above
-    # and -6 forces IPv6 so this should fail, such as:
-    # ;; getaddrinfo failed: hostname nor servname provided, or not known
-    # ;; resolution failed: not found
-    # note that delv returns success even on lookup failure
-    $DELV $DELVOPTS @fd92:7065:b8e:ffff::3 @10.53.0.3 -6 -t txt foo.example > delv.out.test$n 2>&1 || ret=1
-    # it should have no results but error output
-    grep "testing" < delv.out.test$n > /dev/null && ret=1
-    grep "getaddrinfo failed:" < delv.out.test$n > /dev/null || ret=1
-    if [ $ret != 0 ]; then echo "I:failed"; fi 
-    status=`expr $status + $ret`
-  else
-    echo "I:IPv6 unavailable; skipping"
-  fi
-
-  n=`expr $n + 1`
-  echo "I:checking delv with reverse lookup works ($n)"
-  ret=0
-  $DELV $DELVOPTS @10.53.0.3 -x 127.0.0.1 > delv.out.test$n 2>&1 || ret=1
-  # doesn't matter if has answer
-  grep -i "127\.in-addr\.arpa\." < delv.out.test$n > /dev/null || ret=1
-  if [ $ret != 0 ]; then echo "I:failed"; fi 
-  status=`expr $status + $ret`
-
-  n=`expr $n + 1`
-  echo "I:checking delv over TCP works ($n)"
-  ret=0
-  $DELV $DELVOPTS @10.53.0.3 a a.example > delv.out.test$n || ret=1
-  grep "10\.0\.0\.1$" < delv.out.test$n > /dev/null || ret=1
-  if [ $ret != 0 ]; then echo "I:failed"; fi
-  status=`expr $status + $ret`
-
-  n=`expr $n + 1`
-  echo "I:checking delv +multi +norrcomments works for dnskey (when default is rrcomments)($n)"
-  ret=0
-  $DELV $DELVOPTS @10.53.0.3 +multi +norrcomments DNSKEY dnskey.example > delv.out.test$n || ret=1
-  grep "; ZSK; alg = RSAMD5 ; key id = 30795" < delv.out.test$n > /dev/null && ret=1
-  if [ $ret != 0 ]; then echo "I:failed"; fi
-  status=`expr $status + $ret`
-
-  n=`expr $n + 1`
-  echo "I:checking delv +multi +norrcomments works for soa (when default is rrcomments)($n)"
-  ret=0
-  $DELV $DELVOPTS @10.53.0.3 +multi +norrcomments SOA example > delv.out.test$n || ret=1
-  grep "; ZSK; alg = RSAMD5 ; key id = 30795" < delv.out.test$n > /dev/null && ret=1
-  if [ $ret != 0 ]; then echo "I:failed"; fi
-  status=`expr $status + $ret`
-
-  n=`expr $n + 1`
-  echo "I:checking delv +rrcomments works for DNSKEY($n)"
-  ret=0
-  $DELV $DELVOPTS @10.53.0.3 +rrcomments DNSKEY dnskey.example > delv.out.test$n || ret=1
-  grep "; ZSK; alg = RSAMD5 ; key id = 30795" < delv.out.test$n > /dev/null || ret=1
-  if [ $ret != 0 ]; then echo "I:failed"; fi
-  status=`expr $status + $ret`
-
-  n=`expr $n + 1`
-  echo "I:checking delv +short +rrcomments works for DNSKEY ($n)"
-  ret=0
-  $DELV $DELVOPTS @10.53.0.3 +short +rrcomments DNSKEY dnskey.example > delv.out.test$n || ret=1
-  grep "; ZSK; alg = RSAMD5 ; key id = 30795" < delv.out.test$n > /dev/null || ret=1
-  if [ $ret != 0 ]; then echo "I:failed"; fi
-  status=`expr $status + $ret`
-
-  n=`expr $n + 1`
-  echo "I:checking delv +short +rrcomments works ($n)"
-  ret=0
-  $DELV $DELVOPTS @10.53.0.3 +short +rrcomments DNSKEY dnskey.example > delv.out.test$n || ret=1
-  grep "S8M=  ; ZSK; alg = RSAMD5 ; key id = 30795$" < delv.out.test$n > /dev/null || ret=1
-  if [ $ret != 0 ]; then echo "I:failed"; fi
-  status=`expr $status + $ret`
-
-  n=`expr $n + 1`
-  echo "I:checking delv +short +nosplit works ($n)"
-  ret=0
-  $DELV $DELVOPTS @10.53.0.3 +short +nosplit DNSKEY dnskey.example > delv.out.test$n || ret=1
-  grep "Z8plc4Rb9VIE5x7KNHAYTvTO5d4S8M=" < delv.out.test$n > /dev/null || ret=1
-  if test `wc -l < delv.out.test$n` != 1 ; then ret=1 ; fi
-  f=`awk '{print NF}' < delv.out.test$n`
-  test "${f:-0}" -eq 14 || ret=1
-  if [ $ret != 0 ]; then echo "I:failed"; fi
-  status=`expr $status + $ret`
-
-  n=`expr $n + 1`
-  echo "I:checking delv +short +nosplit +norrcomments works ($n)"
-  ret=0
-  $DELV $DELVOPTS @10.53.0.3 +short +nosplit +norrcomments DNSKEY dnskey.example > delv.out.test$n || ret=1
-  grep "Z8plc4Rb9VIE5x7KNHAYTvTO5d4S8M=$" < delv.out.test$n > /dev/null || ret=1
-  if test `wc -l < delv.out.test$n` != 1 ; then ret=1 ; fi
-  f=`awk '{print NF}' < delv.out.test$n`
-  test "${f:-0}" -eq 4 || ret=1
-  if [ $ret != 0 ]; then echo "I:failed"; fi
-  status=`expr $status + $ret`
-else
-  echo "${DELV:-delv} is not available, so skipping these delv tests"
-fi
-
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index 3316314dad33d5d60a324b471b4063818043aba1..9de49b99f3252f1fe082a110fc556ea2af012409 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright (C) 2004, 2007, 2010-2012, 2014  Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
 #
 # Permission to use, copy, modify, and/or distribute this software for any
 # purpose with or without fee is hereby granted, provided that the above
@@ -15,6 +15,7 @@
 # PERFORMANCE OF THIS SOFTWARE.
 
 rm -f ns*/named.run
+rm -f ns*/named.conf
 rm -f ns1/K*
 rm -f ns1/dsset-*
 rm -f ns1/*.signed
similarity index 85%
rename from bin/tests/system/dlv/ns1/named.conf
rename to bin/tests/system/dlv/ns1/named.conf.in
index e918d476ab5e2b4ea3726c32c3e786e7ad289295..c8a970e885c8e04cc8ea0ce00a0761f9c47c8af4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2004, 2007, 2011  Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.6 2011/05/26 23:47:28 tbox Exp $ */
-
-controls { /* empty */ };
-
 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; };
index e8a49bb005581cfd19196a5b738f66fb61f16258..fbfefe7baa567a9356c5509c449e2ddab80283b5 100644 (file)
@@ -1,4 +1,4 @@
-; Copyright (C) 2011  Internet Systems Consortium, Inc. ("ISC")
+; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
 ;
 ; Permission to use, copy, modify, and/or distribute this software for any
 ; purpose with or without fee is hereby granted, provided that the above
@@ -12,8 +12,6 @@
 ; OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 ; PERFORMANCE OF THIS SOFTWARE.
 
-; $Id: root.db.in,v 1.3 2011/05/26 23:47:28 tbox Exp $
-
 $TTL   120
 @              SOA     ns.rootservers.utld hostmaster.ns.rootservers.utld (
                        1 3600 1200 604800 60 )
index 26abb423b220d00c1c0b8c5c0236c600decbfadc..865e09cda14cd2e3be9a129154fa65da09544dea 100644 (file)
@@ -1,4 +1,4 @@
-; Copyright (C) 2004, 2007  Internet Systems Consortium, Inc. ("ISC")
+; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
 ;
 ; Permission to use, copy, modify, and/or distribute this software for any
 ; purpose with or without fee is hereby granted, provided that the above
@@ -12,8 +12,6 @@
 ; OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 ; PERFORMANCE OF THIS SOFTWARE.
 
-; $Id: rootservers.utld.db,v 1.4 2007/06/19 23:47:02 tbox Exp $
-
 $TTL   120
 @      SOA     ns hostmaster.ns 1 3600 1200 604800 60
 @      NS      ns
index 1c34311e41b2f182b90a5eb4e5b48497f58f5ee9..b3f09b81ea3bd2b095467927ad521600ac3130d2 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright (C) 2011, 2012, 2014  Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
 #
 # Permission to use, copy, modify, and/or distribute this software for any
 # purpose with or without fee is hereby granted, provided that the above
@@ -19,7 +19,7 @@ SYSTEMTESTTOP=../..
 
 (cd ../ns2 && $SHELL -e ./sign.sh || exit 1)
 
-echo "I:dlv/ns1/sign.sh"
+echo_i "dlv/ns1/sign.sh"
 
 zone=.
 infile=root.db.in
@@ -33,7 +33,7 @@ cat $infile $keyname1.key $keyname2.key >$zonefile
 
 $SIGNER -r $RANDFILE -g -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
 
-echo "I: signed $zone"
+echo_i "signed $zone"
 
 grep -v '^;' $keyname2.key | $PERL -n -e '
 local ($dn, $class, $type, $flags, $proto, $alg, @rest) = split;
index 77b6a70cab3dda1e7ca755cc9d666f92a3265d0b..3ec5f16e44dd19c182eed374814e81374a99e623 100644 (file)
@@ -1,4 +1,4 @@
-; Copyright (C) 2011  Internet Systems Consortium, Inc. ("ISC")
+; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
 ;
 ; Permission to use, copy, modify, and/or distribute this software for any
 ; purpose with or without fee is hereby granted, provided that the above
@@ -12,8 +12,6 @@
 ; OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 ; PERFORMANCE OF THIS SOFTWARE.
 
-; $Id: druz.db.in,v 1.4 2011/05/26 23:47:28 tbox Exp $
-
 $TTL   120
 @              SOA     ns hostmaster.ns 1 3600 1200 604800 60
 @              NS      ns
index a2e549a250cc425451a95e72c97fe8a0f7aaed69..bafa85a283b68dd022b483f3b1dbb25982eef1b2 100644 (file)
@@ -1,4 +1,4 @@
-; Copyright (C) 2004, 2007  Internet Systems Consortium, Inc. ("ISC")
+; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
 ;
 ; Permission to use, copy, modify, and/or distribute this software for any
 ; purpose with or without fee is hereby granted, provided that the above
@@ -12,7 +12,5 @@
 ; OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 ; PERFORMANCE OF THIS SOFTWARE.
 
-; $Id: hints,v 1.4 2007/06/19 23:47:02 tbox Exp $
-
 . 0 NS ns.rootservers.utld.
 ns.rootservers.utld. 0 A 10.53.0.1
similarity index 86%
rename from bin/tests/system/dlv/ns2/named.conf
rename to bin/tests/system/dlv/ns2/named.conf.in
index 13be48a8eed5614f092c3489bb46b7ee5a4b97ba..b0429b1fe2fb5d9e2553f9efc0a57bb898d0be35 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2004, 2007, 2011  Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.6 2011/05/26 23:47:28 tbox Exp $ */
-
-controls { /* empty */ };
-
 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; };
index c1cc83b1970506074cb80a9c1d18909ece8928dc..482aeadc603dcb5aa847dbb386810a73115c6f13 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright (C) 2011, 2012, 2014  Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
 #
 # Permission to use, copy, modify, and/or distribute this software for any
 # purpose with or without fee is hereby granted, provided that the above
@@ -19,7 +19,7 @@ SYSTEMTESTTOP=../..
 
 (cd ../ns3 && $SHELL -e ./sign.sh || exit 1)
 
-echo "I:dlv/ns2/sign.sh"
+echo_i "dlv/ns2/sign.sh"
 
 zone=druz.
 infile=druz.db.in
@@ -37,4 +37,4 @@ $SIGNER -r $RANDFILE -l $dlvzone -g -o $zone -f $outfile $zonefile > /dev/null 2
 $CHECKZONE -q -D -i none druz druz.pre |
 sed '/IN DNSKEY/s/\([a-z0-9A-Z/]\{10\}\)[a-z0-9A-Z/]\{16\}/\1XXXXXXXXXXXXXXXX/'> druz.signed
 
-echo "I: signed $zone"
+echo_i "signed $zone"
index ac9c3d0dc0e15c2cba9967c83530eb9167221cf1..8acfc3ae02c9e511008ef2a5f27ecea79de15678 100644 (file)
@@ -1,4 +1,4 @@
-; Copyright (C) 2004, 2007  Internet Systems Consortium, Inc. ("ISC")
+; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
 ;
 ; Permission to use, copy, modify, and/or distribute this software for any
 ; purpose with or without fee is hereby granted, provided that the above
@@ -12,8 +12,6 @@
 ; OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 ; PERFORMANCE OF THIS SOFTWARE.
 
-; $Id: utld.db,v 1.4 2007/06/19 23:47:02 tbox Exp $
-
 $TTL   120
 @              SOA     ns hostmaster.ns 1 3600 1200 604800 60
 @              NS      ns
index 40878f4032f14d10ee8b79a476b27a93035e6fd9..93b2e2ce1b9f29b8e6f64090b7b0f9abf23ae7e7 100644 (file)
@@ -1,4 +1,4 @@
-; Copyright (C) 2004, 2007, 2010  Internet Systems Consortium, Inc. ("ISC")
+; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
 ;
 ; Permission to use, copy, modify, and/or distribute this software for any
 ; purpose with or without fee is hereby granted, provided that the above
@@ -12,8 +12,6 @@
 ; OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 ; PERFORMANCE OF THIS SOFTWARE.
 
-; $Id: child.db.in,v 1.6 2010/05/27 23:51:08 tbox Exp $
-
 $TTL   120
 @              SOA     ns hostmaster.ns 1 3600 1200 604800 60
 @              NS      ns
index 3f0ef6baf360bfb33e9ef7a213ed23aefe9f9cc1..deff571a7ad921172d74e1f90d482cb0b3f4b301 100644 (file)
@@ -1,4 +1,4 @@
-; Copyright (C) 2004, 2007  Internet Systems Consortium, Inc. ("ISC")
+; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
 ;
 ; Permission to use, copy, modify, and/or distribute this software for any
 ; purpose with or without fee is hereby granted, provided that the above
@@ -12,8 +12,6 @@
 ; OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 ; PERFORMANCE OF THIS SOFTWARE.
 
-; $Id: dlv.db.in,v 1.4 2007/06/19 23:47:02 tbox Exp $
-
 $TTL   120
 @              SOA     ns hostmaster.ns 1 3600 1200 604800 60
 @              NS      ns
index a2e549a250cc425451a95e72c97fe8a0f7aaed69..bafa85a283b68dd022b483f3b1dbb25982eef1b2 100644 (file)
@@ -1,4 +1,4 @@
-; Copyright (C) 2004, 2007  Internet Systems Consortium, Inc. ("ISC")
+; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
 ;
 ; Permission to use, copy, modify, and/or distribute this software for any
 ; purpose with or without fee is hereby granted, provided that the above
@@ -12,7 +12,5 @@
 ; OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 ; PERFORMANCE OF THIS SOFTWARE.
 
-; $Id: hints,v 1.4 2007/06/19 23:47:02 tbox Exp $
-
 . 0 NS ns.rootservers.utld.
 ns.rootservers.utld. 0 A 10.53.0.1
similarity index 92%
rename from bin/tests/system/dlv/ns3/named.conf
rename to bin/tests/system/dlv/ns3/named.conf.in
index 48ba327b244d4600d3b6449bbd322058e808869a..df23c6d99c6d78ba687a5dc360109796fdf9ed86 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2004, 2007, 2011  Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.6 2011/05/26 23:47:28 tbox Exp $ */
-
-controls { /* empty */ };
-
 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; };
index 33bc50e16fba4cbe43c14a62ad8bd51d80637f6e..fb104cf8ecdd3353d1e83478fbe8fd257bdd695a 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright (C) 2004, 2007, 2009-2012, 2014  Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
 #
 # Permission to use, copy, modify, and/or distribute this software for any
 # purpose with or without fee is hereby granted, provided that the above
@@ -19,7 +19,7 @@ SYSTEMTESTTOP=../..
 
 (cd ../ns6 && $SHELL -e ./sign.sh)
 
-echo "I:dlv/ns3/sign.sh"
+echo_i "dlv/ns3/sign.sh"
 
 dlvzone=dlv.utld.
 dlvsets=
@@ -37,7 +37,7 @@ keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
 cat $infile $keyname1.key $keyname2.key ../ns6/dsset-grand.$zone >$zonefile
 
 $SIGNER -r $RANDFILE -l $dlvzone -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
-echo "I: signed $zone"
+echo_i "signed $zone"
 
 
 zone=child3.utld.
@@ -52,7 +52,7 @@ keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
 cat $infile $keyname1.key $keyname2.key ../ns6/dsset-grand.$zone >$zonefile
 
 $SIGNER -r $RANDFILE -l $dlvzone -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
-echo "I: signed $zone"
+echo_i "signed $zone"
 
 
 zone=child4.utld.
@@ -67,7 +67,7 @@ keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
 cat $infile $keyname1.key $keyname2.key >$zonefile
 
 $SIGNER -r $RANDFILE -l $dlvzone -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
-echo "I: signed $zone"
+echo_i "signed $zone"
 
 
 zone=child5.utld.
@@ -82,7 +82,7 @@ keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
 cat $infile $keyname1.key $keyname2.key ../ns6/dsset-grand.$zone >$zonefile
 
 $SIGNER -r $RANDFILE -l $dlvzone -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
-echo "I: signed $zone"
+echo_i "signed $zone"
 
 
 zone=child7.utld.
@@ -96,7 +96,7 @@ keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
 cat $infile $keyname1.key $keyname2.key ../ns6/dsset-grand.$zone >$zonefile
 
 $SIGNER -r $RANDFILE -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
-echo "I: signed $zone"
+echo_i "signed $zone"
 
 
 zone=child8.utld.
@@ -110,7 +110,7 @@ keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
 cat $infile $keyname1.key $keyname2.key >$zonefile
 
 $SIGNER -r $RANDFILE -l $dlvzone -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
-echo "I: signed $zone"
+echo_i "signed $zone"
 
 
 zone=child9.utld.
@@ -125,7 +125,7 @@ keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
 cat $infile $keyname1.key $keyname2.key >$zonefile
 
 $SIGNER -r $RANDFILE -l $dlvzone -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
-echo "I: signed $zone"
+echo_i "signed $zone"
 
 zone=child10.utld.
 infile=child.db.in
@@ -139,7 +139,7 @@ keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
 cat $infile $keyname1.key $keyname2.key >$zonefile
 
 $SIGNER -r $RANDFILE -l $dlvzone -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
-echo "I: signed $zone"
+echo_i "signed $zone"
 
 zone=child1.druz.
 infile=child.db.in
@@ -154,7 +154,7 @@ keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
 cat $infile $keyname1.key $keyname2.key ../ns6/dsset-grand.$zone >$zonefile
 
 $SIGNER -r $RANDFILE -l $dlvzone -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
-echo "I: signed $zone"
+echo_i "signed $zone"
 
 
 zone=child3.druz.
@@ -170,7 +170,7 @@ keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
 cat $infile $keyname1.key $keyname2.key ../ns6/dsset-grand.$zone >$zonefile
 
 $SIGNER -r $RANDFILE -l $dlvzone -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
-echo "I: signed $zone"
+echo_i "signed $zone"
 
 
 zone=child4.druz.
@@ -186,7 +186,7 @@ keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
 cat $infile $keyname1.key $keyname2.key >$zonefile
 
 $SIGNER -r $RANDFILE -l $dlvzone -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
-echo "I: signed $zone"
+echo_i "signed $zone"
 
 
 zone=child5.druz.
@@ -202,7 +202,7 @@ keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
 cat $infile $keyname1.key $keyname2.key ../ns6/dsset-grand.$zone >$zonefile
 
 $SIGNER -r $RANDFILE -l $dlvzone -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
-echo "I: signed $zone"
+echo_i "signed $zone"
 
 
 zone=child7.druz.
@@ -217,7 +217,7 @@ keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
 cat $infile $keyname1.key $keyname2.key ../ns6/dsset-grand.$zone >$zonefile
 
 $SIGNER -r $RANDFILE -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
-echo "I: signed $zone"
+echo_i "signed $zone"
 
 
 zone=child8.druz.
@@ -231,7 +231,7 @@ keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
 cat $infile $keyname1.key $keyname2.key >$zonefile
 
 $SIGNER -r $RANDFILE -l $dlvzone -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
-echo "I: signed $zone"
+echo_i "signed $zone"
 
 
 zone=child9.druz.
@@ -246,7 +246,7 @@ keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
 cat $infile $keyname1.key $keyname2.key >$zonefile
 
 $SIGNER -r $RANDFILE -l $dlvzone -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
-echo "I: signed $zone"
+echo_i "signed $zone"
 
 zone=child10.druz.
 infile=child.db.in
@@ -261,7 +261,7 @@ keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
 cat $infile $keyname1.key $keyname2.key >$zonefile
 
 $SIGNER -r $RANDFILE -l $dlvzone -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
-echo "I: signed $zone"
+echo_i "signed $zone"
 
 
 zone=dlv.utld.
@@ -275,7 +275,7 @@ keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
 cat $infile $dlvsets $keyname1.key $keyname2.key >$zonefile
 
 $SIGNER -r $RANDFILE -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
-echo "I: signed $zone"
+echo_i "signed $zone"
 
 
 grep -v '^;' $keyname2.key | $PERL -n -e '
index b4306f329a26d0116d52dc0903287f460adb3fd2..94b005e1689ede0b7b9b83d1ee31ac6205e422e2 100644 (file)
@@ -1,4 +1,4 @@
-; Copyright (C) 2004, 2007  Internet Systems Consortium, Inc. ("ISC")
+; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
 ;
 ; Permission to use, copy, modify, and/or distribute this software for any
 ; purpose with or without fee is hereby granted, provided that the above
@@ -12,8 +12,6 @@
 ; OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 ; PERFORMANCE OF THIS SOFTWARE.
 
-; $Id: child.db,v 1.4 2007/06/19 23:47:02 tbox Exp $
-
 $TTL   120
 @              SOA     ns hostmaster.ns 1 3600 1200 604800 60
 @              NS      ns
index a2e549a250cc425451a95e72c97fe8a0f7aaed69..bafa85a283b68dd022b483f3b1dbb25982eef1b2 100644 (file)
@@ -1,4 +1,4 @@
-; Copyright (C) 2004, 2007  Internet Systems Consortium, Inc. ("ISC")
+; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
 ;
 ; Permission to use, copy, modify, and/or distribute this software for any
 ; purpose with or without fee is hereby granted, provided that the above
@@ -12,7 +12,5 @@
 ; OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 ; PERFORMANCE OF THIS SOFTWARE.
 
-; $Id: hints,v 1.4 2007/06/19 23:47:02 tbox Exp $
-
 . 0 NS ns.rootservers.utld.
 ns.rootservers.utld. 0 A 10.53.0.1
similarity index 86%
rename from bin/tests/system/dlv/ns4/named.conf
rename to bin/tests/system/dlv/ns4/named.conf.in
index 4fa32c29a4873a14c30a6f97292dc08d880c1b4a..bd2ac8720879ddc648d22ed5cb5c5cbc0afd2a3b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2004, 2007  Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.4 2007/06/19 23:47:02 tbox Exp $ */
-
-controls { /* empty */ };
-
 options {
        query-source address 10.53.0.4;
        notify-source 10.53.0.4;
        transfer-source 10.53.0.4;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.4; };
        listen-on-v6 { none; };
index a2e549a250cc425451a95e72c97fe8a0f7aaed69..bafa85a283b68dd022b483f3b1dbb25982eef1b2 100644 (file)
@@ -1,4 +1,4 @@
-; Copyright (C) 2004, 2007  Internet Systems Consortium, Inc. ("ISC")
+; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
 ;
 ; Permission to use, copy, modify, and/or distribute this software for any
 ; purpose with or without fee is hereby granted, provided that the above
@@ -12,7 +12,5 @@
 ; OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 ; PERFORMANCE OF THIS SOFTWARE.
 
-; $Id: hints,v 1.4 2007/06/19 23:47:02 tbox Exp $
-
 . 0 NS ns.rootservers.utld.
 ns.rootservers.utld. 0 A 10.53.0.1
diff --git a/bin/tests/system/dlv/ns5/named.conf b/bin/tests/system/dlv/ns5/named.conf
deleted file mode 100644 (file)
index d886331..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (C) 2004, 2006, 2007, 2011  Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id: named.conf,v 1.10 2011/05/26 23:47:28 tbox Exp $ */
-
-/*
- * Choose a keyname that is unlikely to clash with any real key names.
- * This allows it to be added to the system's rndc.conf with minimal
- * likelyhood of collision.
- *
- * e.g.
- *     key "cc64b3d1db63fc88d7cb5d2f9f57d258" {
- *             algorithm hmac-md5;
- *             secret "34f88008d07deabbe65bd01f1d233d47";
- *     }; 
- *
- *     server "10.53.0.5" {
- *             key cc64b3d1db63fc88d7cb5d2f9f57d258;
- *             port 5353;
- *     };
- *
- *     rndc -s 10.53.0.5 <command>
- */
-
-key "cc64b3d1db63fc88d7cb5d2f9f57d258" {
-       algorithm hmac-md5;
-       secret "34f88008d07deabbe65bd01f1d233d47";
-};
-
-controls {
-       inet 10.53.0.5 port 5353 allow { any; }
-               keys { cc64b3d1db63fc88d7cb5d2f9f57d258; };
-};
-
-include "trusted.conf";
-include "trusted-dlv.conf";
-
-options {
-       query-source address 10.53.0.5;
-       notify-source 10.53.0.5;
-       transfer-source 10.53.0.5;
-       port 5300;
-       pid-file "named.pid";
-       listen-on { 10.53.0.5; };
-       listen-on-v6 { none; };
-       recursion yes;
-       acache-enable yes;
-       notify yes;
-       dnssec-enable yes;
-       dnssec-validation yes;
-       dnssec-lookaside "." trust-anchor "dlv.utld";
-};
-
-zone "." { type hint; file "hints"; };
diff --git a/bin/tests/system/dlv/ns5/named.conf.in b/bin/tests/system/dlv/ns5/named.conf.in
new file mode 100644 (file)
index 0000000..a930aba
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+include "trusted.conf";
+include "trusted-dlv.conf";
+
+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 yes;
+       acache-enable yes;
+       notify yes;
+       dnssec-enable yes;
+       dnssec-validation yes;
+       dnssec-lookaside "." trust-anchor "dlv.utld";
+};
+
+zone "." { type hint; file "hints"; };
index 958ee98ae3a499c8d223dd020cdf974dcf1d6e00..f401fda1b88f334fd2064921033478725f4d4081 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2004, 2007  Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: rndc.conf,v 1.5 2007/06/19 23:47:02 tbox Exp $ */
-
 key "cc64b3d1db63fc88d7cb5d2f9f57d258" {
        algorithm hmac-md5;
        secret "34f88008d07deabbe65bd01f1d233d47";
-}; 
+};
+
 options {
        default-server 10.53.0.5;
        default-port 5353;
index 591b8eb38e36fee0e76ccc196526714312b0a118..a9fbcc4545c186a5c0bdb31257a3976d6b759763 100644 (file)
@@ -1,4 +1,4 @@
-; Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
+; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
 ;
 ; Permission to use, copy, modify, and/or distribute this software for any
 ; purpose with or without fee is hereby granted, provided that the above
@@ -12,8 +12,6 @@
 ; OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 ; PERFORMANCE OF THIS SOFTWARE.
 
-; $Id: child.db.in,v 1.2 2010/05/26 06:28:00 marka Exp $
-
 $TTL   120
 @              SOA     ns hostmaster.ns6 1 3600 1200 604800 60
 @              NS      ns
index b2696f6ac04eb766bcbe92d783539cb830328b1f..bafa85a283b68dd022b483f3b1dbb25982eef1b2 100644 (file)
@@ -1,4 +1,4 @@
-; Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
+; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
 ;
 ; Permission to use, copy, modify, and/or distribute this software for any
 ; purpose with or without fee is hereby granted, provided that the above
@@ -12,7 +12,5 @@
 ; OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 ; PERFORMANCE OF THIS SOFTWARE.
 
-; $Id: hints,v 1.3 2010/05/26 23:50:47 tbox Exp $
-
 . 0 NS ns.rootservers.utld.
 ns.rootservers.utld. 0 A 10.53.0.1
similarity index 92%
rename from bin/tests/system/dlv/ns6/named.conf
rename to bin/tests/system/dlv/ns6/named.conf.in
index 9809fb75e726fcbc4b52856d05e86a4a05f31d1d..82bc51ce20d84df9ede25150368ccefa27cea416 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010, 2011  Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.6 2011/05/26 23:47:28 tbox Exp $ */
-
-controls { /* empty */ };
-
 options {
        query-source address 10.53.0.6;
        notify-source 10.53.0.6;
        transfer-source 10.53.0.6;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.6; };
        listen-on-v6 { none; };
index e6ed15db48ed283017300313ee9f649c26b5c487..a517a66ea03e5bac027f63d9d1c58b71127a9568 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright (C) 2010-2012, 2014  Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
 #
 # Permission to use, copy, modify, and/or distribute this software for any
 # purpose with or without fee is hereby granted, provided that the above
@@ -17,7 +17,7 @@
 SYSTEMTESTTOP=../..
 . $SYSTEMTESTTOP/conf.sh
 
-echo "I:dlv/ns6/sign.sh"
+echo_i "dlv/ns6/sign.sh"
 
 zone=grand.child1.utld.
 infile=child.db.in
@@ -30,7 +30,7 @@ keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
 cat $infile $keyname1.key $keyname2.key >$zonefile
 
 $SIGNER -g -r $RANDFILE -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
-echo "I: signed $zone"
+echo_i "signed $zone"
 
 
 zone=grand.child3.utld.
@@ -45,7 +45,7 @@ keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
 cat $infile $keyname1.key $keyname2.key >$zonefile
 
 $SIGNER -g -r $RANDFILE -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
-echo "I: signed $zone"
+echo_i "signed $zone"
 
 
 zone=grand.child4.utld.
@@ -60,7 +60,7 @@ keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
 cat $infile $keyname1.key $keyname2.key >$zonefile
 
 $SIGNER -g -r $RANDFILE -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
-echo "I: signed $zone"
+echo_i "signed $zone"
 
 
 zone=grand.child5.utld.
@@ -75,7 +75,7 @@ keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
 cat $infile $keyname1.key $keyname2.key >$zonefile
 
 $SIGNER -g -r $RANDFILE -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
-echo "I: signed $zone"
+echo_i "signed $zone"
 
 
 zone=grand.child7.utld.
@@ -90,7 +90,7 @@ keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
 cat $infile $keyname1.key $keyname2.key >$zonefile
 
 $SIGNER -g -r $RANDFILE -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
-echo "I: signed $zone"
+echo_i "signed $zone"
 
 
 zone=grand.child8.utld.
@@ -105,7 +105,7 @@ keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
 cat $infile $keyname1.key $keyname2.key >$zonefile
 
 $SIGNER -g -r $RANDFILE -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
-echo "I: signed $zone"
+echo_i "signed $zone"
 
 
 zone=grand.child9.utld.
@@ -120,7 +120,7 @@ keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
 cat $infile $keyname1.key $keyname2.key >$zonefile
 
 $SIGNER -g -r $RANDFILE -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
-echo "I: signed $zone"
+echo_i "signed $zone"
 
 zone=grand.child10.utld.
 infile=child.db.in
@@ -134,7 +134,7 @@ keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
 cat $infile $keyname1.key $keyname2.key >$zonefile
 
 $SIGNER -g -r $RANDFILE -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
-echo "I: signed $zone"
+echo_i "signed $zone"
 
 zone=grand.child1.druz.
 infile=child.db.in
@@ -147,7 +147,7 @@ keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
 cat $infile $keyname1.key $keyname2.key >$zonefile
 
 $SIGNER -g -r $RANDFILE -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
-echo "I: signed $zone"
+echo_i "signed $zone"
 
 
 zone=grand.child3.druz.
@@ -162,7 +162,7 @@ keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
 cat $infile $keyname1.key $keyname2.key >$zonefile
 
 $SIGNER -g -r $RANDFILE -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
-echo "I: signed $zone"
+echo_i "signed $zone"
 
 
 zone=grand.child4.druz.
@@ -177,7 +177,7 @@ keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
 cat $infile $keyname1.key $keyname2.key >$zonefile
 
 $SIGNER -g -r $RANDFILE -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
-echo "I: signed $zone"
+echo_i "signed $zone"
 
 
 zone=grand.child5.druz.
@@ -192,7 +192,7 @@ keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
 cat $infile $keyname1.key $keyname2.key >$zonefile
 
 $SIGNER -g -r $RANDFILE -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
-echo "I: signed $zone"
+echo_i "signed $zone"
 
 
 zone=grand.child7.druz.
@@ -207,7 +207,7 @@ keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
 cat $infile $keyname1.key $keyname2.key >$zonefile
 
 $SIGNER -g -r $RANDFILE -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
-echo "I: signed $zone"
+echo_i "signed $zone"
 
 
 zone=grand.child8.druz.
@@ -222,7 +222,7 @@ keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
 cat $infile $keyname1.key $keyname2.key >$zonefile
 
 $SIGNER -g -r $RANDFILE -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
-echo "I: signed $zone"
+echo_i "signed $zone"
 
 
 zone=grand.child9.druz.
@@ -237,7 +237,7 @@ keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
 cat $infile $keyname1.key $keyname2.key >$zonefile
 
 $SIGNER -g -r $RANDFILE -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
-echo "I: signed $zone"
+echo_i "signed $zone"
 
 zone=grand.child10.druz.
 infile=child.db.in
@@ -251,4 +251,4 @@ keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
 cat $infile $keyname1.key $keyname2.key >$zonefile
 
 $SIGNER -g -r $RANDFILE -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
-echo "I: signed $zone"
+echo_i "signed $zone"
index 582c6ba6a7bb04dfc20e07faaeb69cf6bbf93ed9..5f298e28c84b4349aab60d870be4cdb3e05d81e2 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright (C) 2014  Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
 #
 # Permission to use, copy, modify, and/or distribute this software for any
 # purpose with or without fee is hereby granted, provided that the above
index 5539f1bc732e67f3b956629e643a1352a6d1d133..ef6141fa3e3ebc1b74b80e81eb51676cac1b9bbc 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright (C) 2004, 2007, 2009, 2011, 2012, 2014  Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
 #
 # Permission to use, copy, modify, and/or distribute this software for any
 # purpose with or without fee is hereby granted, provided that the above
@@ -19,4 +19,11 @@ SYSTEMTESTTOP=..
 
 test -r $RANDFILE || $GENRANDOM 400 $RANDFILE
 
+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
+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
+
 (cd ns1 && $SHELL -e sign.sh)
index 281db431a3c7e47240c49e313cb87b3cd694f889..9b21a5674ce44492c627d7159409506e8a67a0d5 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright (C) 2004, 2007, 2010-2012, 2016  Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
 #
 # Permission to use, copy, modify, and/or distribute this software for any
 # purpose with or without fee is hereby granted, provided that the above
@@ -14,8 +14,6 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: tests.sh,v 1.8 2011/05/26 23:47:28 tbox Exp $
-
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
@@ -24,39 +22,39 @@ n=0
 
 rm -f dig.out.*
 
-DIGOPTS="+tcp +noadd +nosea +nostat +nocmd +dnssec -p 5300"
+DIGOPTS="+tcp +noadd +nosea +nostat +nocmd +dnssec -p ${PORT}"
 
-echo "I:checking that DNSKEY reference by DLV validates as secure ($n)"
+echo_i "checking that DNSKEY reference by DLV validates as secure ($n)"
 ret=0
 $DIG $DIGOPTS child1.utld dnskey @10.53.0.5 > dig.out.ns5.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns5.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that child DNSKEY reference by DLV validates as secure ($n)"
+echo_i "checking that child DNSKEY reference by DLV validates as secure ($n)"
 ret=0
 $DIG $DIGOPTS grand.child1.utld dnskey @10.53.0.5 > dig.out.ns5.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns5.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that SOA reference by DLV in a DRUZ with DS validates as secure ($n)"
+echo_i "checking that SOA reference by DLV in a DRUZ with DS validates as secure ($n)"
 ret=0
 $DIG $DIGOPTS child1.druz soa @10.53.0.5 > dig.out.ns5.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns5.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that child SOA reference by DLV in a DRUZ with DS validates as secure ($n)"
+echo_i "checking that child SOA reference by DLV in a DRUZ with DS validates as secure ($n)"
 ret=0
 $DIG $DIGOPTS grand.child1.druz soa @10.53.0.5 > dig.out.ns5.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns5.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index 5b2160b132cb31ea0b49e756bce0e8d5e5f15d81..5e2783dbd0cf4d1d934805d96199e1fcb2e2bdb3 100644 (file)
@@ -14,8 +14,7 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: clean.sh,v 1.2 2010/08/16 04:46:15 marka Exp $
-
+rm -f ns*/named.conf
 rm -f dig.out.*
 rm -f */named.memstats
 rm -f */named.run
similarity index 91%
rename from bin/tests/system/dlz/ns1/named.conf
rename to bin/tests/system/dlz/ns1/named.conf.in
index 537baa10d3d344ec392ff2cf2b58b99bfdc2d571..e4efc776ac622da4609eff0a0dd07f41da8aa082 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.2 2010/08/16 04:46:15 marka Exp $ */
-
-controls { /* empty */ };
-
 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; };
index 1f3b0f9385e893f89c31d4da197d310db5cfa41a..fbf3a3e510e14b1f9add27aef3726fe2a0091665 100644 (file)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: prereq.sh.in,v 1.2 2011/04/19 22:30:52 each Exp $
-
-TOP=${SYSTEMTESTTOP:=.}/../../../..
+SYSTEMTESTTOP=..
+. $SYSTEMTESTTOP/conf.sh
 
 if [ "@DLZ_SYSTEM_TEST@" != "filesystem" ]; then
-        echo "I:DLZ filesystem driver not supported"
+        echo_i "DLZ filesystem driver not supported"
         exit 255
 fi
 exit 0
diff --git a/bin/tests/system/dlz/setup.sh b/bin/tests/system/dlz/setup.sh
new file mode 100644 (file)
index 0000000..c69f051
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+#
+# Copyright (C)  2018  Internet Systems Consortium, Inc. ("ISC")
+#
+# 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 http://mozilla.org/MPL/2.0/.
+
+SYSTEMTESTTOP=..
+. $SYSTEMTESTTOP/conf.sh
+
+$SHELL clean.sh
+copy_setports ns1/named.conf.in ns1/named.conf
index f55471218f81173de7d41c4f21830ad896ee3fbd..79827ce82137e790d05a093947502701656c654c 100644 (file)
@@ -14,8 +14,6 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: tests.sh,v 1.4 2011/04/19 23:47:52 tbox Exp $
-
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
@@ -24,11 +22,11 @@ n=0
 
 rm -f dig.out.*
 
-DIGOPTS="+tcp +noadd +nosea +nostat +nocmd +dnssec -p 5300"
+DIGOPTS="+tcp +noadd +nosea +nostat +nocmd +dnssec -p ${PORT}"
 
 # Check the example.com. domain
 
-echo "I:checking DNAME at apex works ($n)"
+echo_i "checking DNAME at apex works ($n)"
 ret=0
 $DIG $DIGOPTS +norec foo.example.com. \
        @10.53.0.1 a > dig.out.ns1.test$n || ret=1
@@ -37,46 +35,46 @@ grep "example.com..*DNAME.*example.net." dig.out.ns1.test$n > /dev/null || ret=1
 grep "foo.example.com..*CNAME.*foo.example.net." dig.out.ns1.test$n > /dev/null || ret=1
 grep "flags:[^;]* aa[ ;]" dig.out.ns1.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking DLZ IXFR=2010062899 (less than serial) ($n)"
+echo_i "checking DLZ IXFR=2010062899 (less than serial) ($n)"
 ret=0
 $DIG $DIGOPTS ixfr=2010062899 example.com @10.53.0.1 +all > dig.out.ns1.test$n 
 grep "example.com..*IN.IXFR" dig.out.ns1.test$n > /dev/null || ret=1
 grep "example.com..*10.IN.DNAME.example.net." dig.out.ns1.test$n > /dev/null || ret=1
 grep "example.com..*10.IN.NS.example.com." dig.out.ns1.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking DLZ IXFR=2010062900 (equal serial) ($n)"
+echo_i "checking DLZ IXFR=2010062900 (equal serial) ($n)"
 ret=0
 $DIG $DIGOPTS ixfr=2010062900 example.com @10.53.0.1 +all > dig.out.ns1.test$n
 grep "example.com..*IN.IXFR" dig.out.ns1.test$n > /dev/null || ret=1
 grep "example.com..*10.IN.DNAME.example.net." dig.out.ns1.test$n > /dev/null && ret=1
 grep "example.com..*10.IN.NS.example.com." dig.out.ns1.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking DLZ IXFR=2010062901 (greater than serial) ($n)"
+echo_i "checking DLZ IXFR=2010062901 (greater than serial) ($n)"
 ret=0
 $DIG $DIGOPTS ixfr=2010062901 example.com @10.53.0.1 +all > dig.out.ns1.test$n
 grep "example.com..*IN.IXFR" dig.out.ns1.test$n > /dev/null || ret=1
 grep "example.com..*10.IN.DNAME.example.net." dig.out.ns1.test$n > /dev/null && ret=1
 grep "example.com..*10.IN.NS.example.com." dig.out.ns1.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking DLZ with a malformed SOA record"
+echo_i "checking DLZ with a malformed SOA record"
 ret=0
 $DIG $DIGOPTS broken.com type600 @10.53.0.1 > dig.out.ns1.test$n
 grep status: dig.out.ns1.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index 6453f7bb3c5544db118a4a0216a8ea25812141e9..9c038c4aa1927c71c8e39170609268dee93e4cc2 100644 (file)
@@ -5,5 +5,6 @@
 
 rm -f ns1/update.txt
 rm -f */named.memstats
+rm -f */named.conf
 rm -f */named.run
 rm -f ns1/ddns.key
index 58e5c9282dd50a602afb1d52c391136207ac06e5..40cc821d6cb8c0fea2fd3a8060159fa5877dbd70 100644 (file)
@@ -1 +1,2 @@
 named.conf
+dlzs.conf
diff --git a/bin/tests/system/dlzexternal/ns1/dlzs.conf.in b/bin/tests/system/dlzexternal/ns1/dlzs.conf.in
new file mode 100644 (file)
index 0000000..2d94556
--- /dev/null
@@ -0,0 +1,11 @@
+/*
+ * Copyright (C) 2011-2014, 2016  Internet Systems Consortium, Inc. ("ISC")
+ *
+ * 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 http://mozilla.org/MPL/2.0/.
+ */
+
+dlz "example zone" {
+       database "dlopen ../driver.@SO@ example.nil";
+};
index 65777611bb93bcef48b01e27e00ad34c52a1d910..28a94e65607cb81c996247f84d56f2f3df65895d 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf.in,v 1.3 2011/03/10 23:47:50 tbox Exp $ */
-
-controls { };
-
 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";
        session-keyfile "session.key";
        listen-on { 10.53.0.1; 127.0.0.1; };
@@ -39,9 +35,7 @@ key rndc_key {
 include "ddns.key";
 
 controls {
-       inet 10.53.0.1 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.1 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
-dlz "example zone" {
-       database "dlopen ../driver.@SO@ example.nil";
-};
+include "dlzs.conf";
index aa4f88f462fc142abba397672299f7b5936131c9..fbe133444c019812c96f748ad3223a38462e17e9 100644 (file)
@@ -18,7 +18,7 @@ SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
 $FEATURETEST --have-dlopen ||  {
-        echo "I:dlopen() not supported - skipping dlzexternal test"
+        echo_i "dlopen() not supported - skipping dlzexternal test"
         exit 255
 }
 exit 0
index 38a51aea03eb939eb1c4235f8cbab190f752b187..0d75e6ab16d081693466c44e2a4e6b8495fc3b6b 100644 (file)
@@ -20,3 +20,5 @@ SYSTEMTESTTOP=..
 test -r $RANDFILE || $GENRANDOM 400 $RANDFILE
 
 $DDNSCONFGEN -q -r $RANDFILE -z example.nil > ns1/ddns.key
+
+copy_setports ns1/named.conf.in ns1/named.conf
index b6107499db79f5261848a500a3b2756c0bc8f710..04f2e41b4509a30c34a88e0a735a8a78d9e16d56 100644 (file)
@@ -6,7 +6,8 @@ SYSTEMTESTTOP=..
 
 status=0
 
-DIGOPTS="@10.53.0.1 -p 5300"
+DIGOPTS="@10.53.0.1 -p ${PORT}"
+RNDCCMD="$RNDC -c $SYSTEMTESTTOP/common/rndc.conf -p ${CONTROLPORT} -s"
 
 test_update() {
     host="$1"
@@ -16,15 +17,15 @@ test_update() {
     should_fail="$5"
 
     cat <<EOF > ns1/update.txt
-server 10.53.0.1 5300
+server 10.53.0.1 ${PORT}
 update add $host $cmd
 send
 EOF
 
-    echo "I:testing update for $host $type $cmd $comment"
+    echo_i "testing update for $host $type $cmd $comment"
     $NSUPDATE -k ns1/ddns.key ns1/update.txt > /dev/null 2>&1 || {
        [ "$should_fail" ] || \
-             echo "I:update failed for $host $type $cmd"
+             echo_i "update failed for $host $type $cmd"
        return 1
     }
 
@@ -32,7 +33,7 @@ EOF
     lines=`echo "$out" | grep "$digout" | wc -l`
     [ $lines -eq 1 ] || {
        [ "$should_fail" ] || \
-            echo "I:dig output incorrect for $host $type $cmd: $out"
+            echo_i "dig output incorrect for $host $type $cmd: $out"
        return 1
     }
     return 0
@@ -52,24 +53,24 @@ status=`expr $status + $ret`
 test_update deny.example.nil. TXT "86400 TXT helloworld" "helloworld" should_fail && ret=1
 status=`expr $status + $ret`
 
-echo "I:testing passing client info into DLZ driver"
+echo_i "testing passing client info into DLZ driver"
 ret=0
 out=`$DIG $DIGOPTS +short -t txt -q source-addr.example.nil | grep -v '^;'`
 addr=`eval echo "$out" | cut -f1 -d'#'`
 [ "$addr" = "10.53.0.1" ] || ret=1
-[ "$ret" -eq 0 ] || echo "I:failed"
+[ "$ret" -eq 0 ] || echo_i "failed"
 status=`expr $status + $ret`
 
-echo "I:testing DLZ driver is cleaned up on reload"
-$RNDC -c ../common/rndc.conf -s 10.53.0.1 -p 9953 reload 2>&1 | sed 's/^/I:ns1 /'
+ccho_i "testing DLZ driver is cleaned up on reload"
+$RNDCCMD 10.53.0.1 reload 2>&1 | sed 's/^/I:ns1 /'
 for i in 0 1 2 3 4 5 6 7 8 9; do
     ret=0
     grep 'dlz_example: shutting down zone example.nil' ns1/named.run > /dev/null 2>&1 || ret=1
     [ "$ret" -eq 0 ] && break
     sleep 1
 done
-[ "$ret" -eq 0 ] || echo "I:failed"
+[ "$ret" -eq 0 ] || echo_i "failed"
 status=`expr $status + $ret`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index 9d548da229532025c02595ba61e6b71fcef16801..2969f70fbe5c3400fda2320fa58fcbcb1feec262 100644 (file)
@@ -14,6 +14,7 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
+rm -f ns*/named.conf
 rm -f ns1/K*
 rm -f ns1/signed.db*
 rm -f ns1/dsset-signed.
similarity index 93%
rename from bin/tests/system/dns64/ns1/named.conf
rename to bin/tests/system/dns64/ns1/named.conf.in
index 847df58627e69e45a22785e09d84e2c824924295..a0dd62c01d6f067fb08baf70e517b1d651cd9ce6 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.3 2010/12/08 23:51:56 tbox Exp $ */
-
 // NS1
 
-controls { /* empty */ };
-
 acl rfc1918 { 10/8; 192.168/16; 172.16/12; };
 
 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 95%
rename from bin/tests/system/dns64/ns2/named.conf
rename to bin/tests/system/dns64/ns2/named.conf.in
index 62f3174d7fab6faf881a0d49190f2f6c6f1dce07..5f430592fcd758652a6fdd81fe006ece2e09ef39 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.4 2011/01/07 23:47:07 tbox Exp $ */
-
 // NS2
 
-controls { /* empty */ };
-
 acl rfc1918 { 10/8; 192.168/16; 172.16/12; };
 
 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; };
index 4afe9e6cdb11e29b7faef723c80c1ed729d9538a..273dce290eb2a7b117d70003fb13aa256f7a98da 100644 (file)
@@ -21,4 +21,7 @@ $SHELL clean.sh
 
 test -r $RANDFILE || $GENRANDOM 400 $RANDFILE
 
+copy_setports ns1/named.conf.in ns1/named.conf
+copy_setports ns2/named.conf.in ns2/named.conf
+
 cd ns1 && $SHELL sign.sh
index 08ca6335687d191519787c742ecb03c226fa827d..d4f965501de65dd1e84998755d9ef72e2c3cce13 100644 (file)
@@ -14,8 +14,6 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: tests.sh,v 1.5 2011/02/03 07:35:55 marka Exp $
-
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
@@ -24,76 +22,76 @@ n=0
 
 rm -f dig.out.*
 
-DIGOPTS="+tcp +noadd +nosea +nostat +nocmd -p 5300"
+DIGOPTS="+tcp +noadd +nosea +nostat +nocmd -p ${PORT}"
 
 for conf in conf/good*.conf
 do
-        echo "I:checking that $conf is accepted ($n)"
+        echo_i "checking that $conf is accepted ($n)"
         ret=0
         $CHECKCONF "$conf" || ret=1
         n=`expr $n + 1`
-        if [ $ret != 0 ]; then echo "I:failed"; fi
+        if [ $ret != 0 ]; then echo_i "failed"; fi
         status=`expr $status + $ret`
 done
 
 for conf in conf/bad*.conf
 do
-        echo "I:checking that $conf is rejected ($n)"
+        echo_i "checking that $conf is rejected ($n)"
         ret=0
         $CHECKCONF "$conf" >/dev/null && ret=1
        n=`expr $n + 1`
-        if [ $ret != 0 ]; then echo "I:failed"; fi
+        if [ $ret != 0 ]; then echo_i "failed"; fi
         status=`expr $status + $ret`
 done
 
 # Check the example. domain
 
-echo "I: checking non-excluded AAAA lookup works ($n)"
+echo_i "checking non-excluded AAAA lookup works ($n)"
 ret=0
 $DIG $DIGOPTS aaaa-only.example. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::2" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking excluded only AAAA lookup works ($n)"
+echo_i "checking excluded only AAAA lookup works ($n)"
 ret=0
 $DIG $DIGOPTS excluded-only.example. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 0," dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking excluded AAAA and non-mapped A lookup works ($n)"
+echo_i "checking excluded AAAA and non-mapped A lookup works ($n)"
 ret=0
 $DIG $DIGOPTS excluded-bad-a.example. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 0," dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking excluded only AAAA and mapped A lookup works ($n)"
+echo_i "checking excluded only AAAA and mapped A lookup works ($n)"
 ret=0
 $DIG $DIGOPTS excluded-good-a.example. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001:aaaa::1.2.3.4" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking default exclude acl ignores mapped A records (all mapped) ($n)"
+echo_i "checking default exclude acl ignores mapped A records (all mapped) ($n)"
 ret=0
 $DIG $DIGOPTS a-and-mapped.example. @10.53.0.2 -b 10.53.0.4 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001:bbbb::1.2.3.5" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking default exclude acl ignores mapped A records (some mapped) ($n)"
+echo_i "checking default exclude acl ignores mapped A records (some mapped) ($n)"
 ret=0
 $DIG $DIGOPTS a-and-aaaa-and-mapped.example. @10.53.0.2 -b 10.53.0.4 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
@@ -101,457 +99,457 @@ grep "2001:eeee::4" dig.out.ns2.test$n > /dev/null || ret=1
 grep "::ffff:1.2.3.4" dig.out.ns2.test$n > /dev/null && ret=1
 grep "::ffff:1.2.3.5" dig.out.ns2.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking default exclude acl works with AAAA only ($n)"
+echo_i "checking default exclude acl works with AAAA only ($n)"
 ret=0
 $DIG $DIGOPTS aaaa-only.example. @10.53.0.2 -b 10.53.0.4 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::2" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking default exclude acl A only lookup works ($n)"
+echo_i "checking default exclude acl A only lookup works ($n)"
 ret=0
 $DIG $DIGOPTS a-only.example. @10.53.0.2 -b 10.53.0.4 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001:bbbb::102:305" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking partially excluded only AAAA lookup works ($n)"
+echo_i "checking partially excluded only AAAA lookup works ($n)"
 ret=0
 $DIG $DIGOPTS partially-excluded-only.example. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::3" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking partially-excluded AAAA and non-mapped A lookup works ($n)"
+echo_i "checking partially-excluded AAAA and non-mapped A lookup works ($n)"
 ret=0
 $DIG $DIGOPTS partially-excluded-bad-a.example. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::2" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking partially-excluded only AAAA and mapped A lookup works ($n)"
+echo_i "checking partially-excluded only AAAA and mapped A lookup works ($n)"
 ret=0
 $DIG $DIGOPTS partially-excluded-good-a.example. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::1" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking AAAA only lookup works ($n)"
+echo_i "checking AAAA only lookup works ($n)"
 ret=0
 $DIG $DIGOPTS aaaa-only.example. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::2" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking A only lookup works ($n)"
+echo_i "checking A only lookup works ($n)"
 ret=0
 $DIG $DIGOPTS a-only.example. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001:aaaa::102:305" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking A and AAAA lookup works ($n)"
+echo_i "checking A and AAAA lookup works ($n)"
 ret=0
 $DIG $DIGOPTS a-and-aaaa.example. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::1" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking non-mapped A lookup works ($n)"
+echo_i "checking non-mapped A lookup works ($n)"
 ret=0
 $DIG $DIGOPTS a-not-mapped.example. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 0" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking NODATA AAAA lookup works ($n)"
+echo_i "checking NODATA AAAA lookup works ($n)"
 ret=0
 $DIG $DIGOPTS mx-only.example. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 0" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking non-existent AAAA lookup works ($n)"
+echo_i "checking non-existent AAAA lookup works ($n)"
 ret=0
 $DIG $DIGOPTS non-existent.example. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NXDOMAIN" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking non-excluded AAAA via CNAME lookup works ($n)"
+echo_i "checking non-excluded AAAA via CNAME lookup works ($n)"
 ret=0
 $DIG $DIGOPTS cname-aaaa-only.example. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::2" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking excluded only AAAA via CNAME lookup works ($n)"
+echo_i "checking excluded only AAAA via CNAME lookup works ($n)"
 ret=0
 $DIG $DIGOPTS cname-excluded-only.example. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking excluded AAAA and non-mapped A via CNAME lookup works ($n)"
+echo_i "checking excluded AAAA and non-mapped A via CNAME lookup works ($n)"
 ret=0
 $DIG $DIGOPTS cname-excluded-bad-a.example. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking excluded only AAAA and mapped A via CNAME lookup works ($n)"
+echo_i "checking excluded only AAAA and mapped A via CNAME lookup works ($n)"
 ret=0
 $DIG $DIGOPTS cname-excluded-good-a.example. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001:aaaa::1.2.3.4" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking AAAA only via CNAME lookup works ($n)"
+echo_i "checking AAAA only via CNAME lookup works ($n)"
 ret=0
 $DIG $DIGOPTS cname-aaaa-only.example. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::2" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking A only via CNAME lookup works ($n)"
+echo_i "checking A only via CNAME lookup works ($n)"
 ret=0
 $DIG $DIGOPTS cname-a-only.example. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001:aaaa::102:305" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking A and AAAA via CNAME lookup works ($n)"
+echo_i "checking A and AAAA via CNAME lookup works ($n)"
 ret=0
 $DIG $DIGOPTS cname-a-and-aaaa.example. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::1" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking non-mapped A via CNAME lookup works ($n)"
+echo_i "checking non-mapped A via CNAME lookup works ($n)"
 ret=0
 $DIG $DIGOPTS cname-a-not-mapped.example. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns2.test$n > /dev/null || ret=1
 grep "CNAME    a-not-mapped.example." dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking NODATA AAAA via CNAME lookup works ($n)"
+echo_i "checking NODATA AAAA via CNAME lookup works ($n)"
 ret=0
 $DIG $DIGOPTS cname-mx-only.example. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns2.test$n > /dev/null || ret=1
 grep "CNAME    mx-only.example." dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking non-existent AAAA via CNAME lookup works ($n)"
+echo_i "checking non-existent AAAA via CNAME lookup works ($n)"
 ret=0
 $DIG $DIGOPTS cname-non-existent.example. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NXDOMAIN" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 # Check the example. domain recursive only
 
-echo "I: checking non-excluded AAAA lookup works, recursive only ($n)"
+echo_i "checking non-excluded AAAA lookup works, recursive only ($n)"
 ret=0
 $DIG $DIGOPTS aaaa-only.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::2" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking excluded only AAAA lookup works, recursive only ($n)"
+echo_i "checking excluded only AAAA lookup works, recursive only ($n)"
 ret=0
 $DIG $DIGOPTS excluded-only.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 0," dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking excluded AAAA and non-mapped A lookup works, recursive only ($n)"
+echo_i "checking excluded AAAA and non-mapped A lookup works, recursive only ($n)"
 ret=0
 $DIG $DIGOPTS excluded-bad-a.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 0," dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking excluded only AAAA and mapped A lookup works, recursive only ($n)"
+echo_i "checking excluded only AAAA and mapped A lookup works, recursive only ($n)"
 ret=0
 $DIG $DIGOPTS excluded-good-a.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001:bbbb::1.2.3.4" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking partially excluded only AAAA lookup works, recursive only ($n)"
+echo_i "checking partially excluded only AAAA lookup works, recursive only ($n)"
 ret=0
 $DIG $DIGOPTS partially-excluded-only.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::3" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking partially-excluded AAAA and non-mapped A lookup works, recursive only ($n)"
+echo_i "checking partially-excluded AAAA and non-mapped A lookup works, recursive only ($n)"
 ret=0
 $DIG $DIGOPTS partially-excluded-bad-a.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::2" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking partially-excluded only AAAA and mapped A lookup works, recursive only ($n)"
+echo_i "checking partially-excluded only AAAA and mapped A lookup works, recursive only ($n)"
 ret=0
 $DIG $DIGOPTS partially-excluded-good-a.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::1" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking AAAA only lookup works, recursive only ($n)"
+echo_i "checking AAAA only lookup works, recursive only ($n)"
 ret=0
 $DIG $DIGOPTS aaaa-only.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::2" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking A only lookup works, recursive only ($n)"
+echo_i "checking A only lookup works, recursive only ($n)"
 ret=0
 $DIG $DIGOPTS a-only.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001:bbbb::102:305" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking A and AAAA lookup works, recursive only ($n)"
+echo_i "checking A and AAAA lookup works, recursive only ($n)"
 ret=0
 $DIG $DIGOPTS a-and-aaaa.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::1" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking non-mapped A lookup works, recursive only ($n)"
+echo_i "checking non-mapped A lookup works, recursive only ($n)"
 ret=0
 $DIG $DIGOPTS a-not-mapped.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 0" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking NODATA AAAA lookup works, recursive only ($n)"
+echo_i "checking NODATA AAAA lookup works, recursive only ($n)"
 ret=0
 $DIG $DIGOPTS mx-only.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 0" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking non-existent AAAA lookup works, recursive only ($n)"
+echo_i "checking non-existent AAAA lookup works, recursive only ($n)"
 ret=0
 $DIG $DIGOPTS non-existent.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NXDOMAIN" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking non-excluded AAAA via CNAME lookup works, recursive only ($n)"
+echo_i "checking non-excluded AAAA via CNAME lookup works, recursive only ($n)"
 ret=0
 $DIG $DIGOPTS cname-aaaa-only.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::2" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking excluded only AAAA via CNAME lookup works, recursive only ($n)"
+echo_i "checking excluded only AAAA via CNAME lookup works, recursive only ($n)"
 ret=0
 $DIG $DIGOPTS cname-excluded-only.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking excluded AAAA and non-mapped A via CNAME lookup works, recursive only ($n)"
+echo_i "checking excluded AAAA and non-mapped A via CNAME lookup works, recursive only ($n)"
 ret=0
 $DIG $DIGOPTS cname-excluded-bad-a.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking excluded only AAAA and mapped A via CNAME lookup works, recursive only ($n)"
+echo_i "checking excluded only AAAA and mapped A via CNAME lookup works, recursive only ($n)"
 ret=0
 $DIG $DIGOPTS cname-excluded-good-a.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 2," dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001:bbbb::102:304" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking AAAA only via CNAME lookup works, recursive only ($n)"
+echo_i "checking AAAA only via CNAME lookup works, recursive only ($n)"
 ret=0
 $DIG $DIGOPTS cname-aaaa-only.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::2" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking A only via CNAME lookup works, recursive only ($n)"
+echo_i "checking A only via CNAME lookup works, recursive only ($n)"
 ret=0
 $DIG $DIGOPTS cname-a-only.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001:bbbb::102:305" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking A and AAAA via CNAME lookup works, recursive only ($n)"
+echo_i "checking A and AAAA via CNAME lookup works, recursive only ($n)"
 ret=0
 $DIG $DIGOPTS cname-a-and-aaaa.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::1" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking non-mapped A via CNAME lookup works, recursive only ($n)"
+echo_i "checking non-mapped A via CNAME lookup works, recursive only ($n)"
 ret=0
 $DIG $DIGOPTS cname-a-not-mapped.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns2.test$n > /dev/null || ret=1
 grep "CNAME    a-not-mapped.example." dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking NODATA AAAA via CNAME lookup works, recursive only ($n)"
+echo_i "checking NODATA AAAA via CNAME lookup works, recursive only ($n)"
 ret=0
 $DIG $DIGOPTS cname-mx-only.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns2.test$n > /dev/null || ret=1
 grep "CNAME    mx-only.example." dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking non-existent AAAA via CNAME lookup works, recursive only ($n)"
+echo_i "checking non-existent AAAA via CNAME lookup works, recursive only ($n)"
 ret=0
 $DIG $DIGOPTS cname-non-existent.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NXDOMAIN" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 # Check the example. domain recursive only w/o recursion
 
-echo "I: checking non-excluded AAAA lookup works, recursive only +norec ($n)"
+echo_i "checking non-excluded AAAA lookup works, recursive only +norec ($n)"
 ret=0
 $DIG $DIGOPTS +norec aaaa-only.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::2" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking excluded only AAAA lookup works, recursive only +norec ($n)"
+echo_i "checking excluded only AAAA lookup works, recursive only +norec ($n)"
 ret=0
 $DIG $DIGOPTS +norec excluded-only.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001:eeee::3" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking excluded AAAA and non-mapped A lookup works, recursive only +norec ($n)"
+echo_i "checking excluded AAAA and non-mapped A lookup works, recursive only +norec ($n)"
 ret=0
 $DIG $DIGOPTS +norec excluded-bad-a.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001:eeee::2" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking excluded only AAAA and mapped A lookup works, recursive only +norec ($n)"
+echo_i "checking excluded only AAAA and mapped A lookup works, recursive only +norec ($n)"
 ret=0
 $DIG $DIGOPTS +norec excluded-good-a.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001:eeee::1" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking partially excluded only AAAA lookup works, recursive only +norec ($n)"
+echo_i "checking partially excluded only AAAA lookup works, recursive only +norec ($n)"
 ret=0
 $DIG $DIGOPTS +norec partially-excluded-only.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
@@ -559,10 +557,10 @@ grep "ANSWER: 2," dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001:eeee:" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::3" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking partially-excluded AAAA and non-mapped A lookup works, recursive only +norec ($n)"
+echo_i "checking partially-excluded AAAA and non-mapped A lookup works, recursive only +norec ($n)"
 ret=0
 $DIG $DIGOPTS +norec partially-excluded-bad-a.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
@@ -570,10 +568,10 @@ grep "ANSWER: 2," dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001:eeee:" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::2" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking partially-excluded only AAAA and mapped A lookup works, recursive only +norec ($n)"
+echo_i "checking partially-excluded only AAAA and mapped A lookup works, recursive only +norec ($n)"
 ret=0
 $DIG $DIGOPTS +norec partially-excluded-good-a.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
@@ -581,724 +579,724 @@ grep "ANSWER: 2," dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001:eeee:" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::1" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking AAAA only lookup works, recursive only +norec ($n)"
+echo_i "checking AAAA only lookup works, recursive only +norec ($n)"
 ret=0
 $DIG $DIGOPTS +norec aaaa-only.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::2" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking A only lookup works, recursive only +norec ($n)"
+echo_i "checking A only lookup works, recursive only +norec ($n)"
 ret=0
 $DIG $DIGOPTS +norec a-only.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 0," dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking A and AAAA lookup works, recursive only +norec ($n)"
+echo_i "checking A and AAAA lookup works, recursive only +norec ($n)"
 ret=0
 $DIG $DIGOPTS +norec a-and-aaaa.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::1" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking non-mapped A lookup works, recursive only +norec ($n)"
+echo_i "checking non-mapped A lookup works, recursive only +norec ($n)"
 ret=0
 $DIG $DIGOPTS +norec a-not-mapped.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 0" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking NODATA AAAA lookup works, recursive only +norec ($n)"
+echo_i "checking NODATA AAAA lookup works, recursive only +norec ($n)"
 ret=0
 $DIG $DIGOPTS +norec mx-only.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 0" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking non-existent AAAA lookup works, recursive only +norec ($n)"
+echo_i "checking non-existent AAAA lookup works, recursive only +norec ($n)"
 ret=0
 $DIG $DIGOPTS +norec non-existent.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NXDOMAIN" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking non-excluded AAAA via CNAME lookup works, recursive only +norec ($n)"
+echo_i "checking non-excluded AAAA via CNAME lookup works, recursive only +norec ($n)"
 ret=0
 $DIG $DIGOPTS +norec cname-aaaa-only.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::2" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking excluded only AAAA via CNAME lookup works, recursive only +norec ($n)"
+echo_i "checking excluded only AAAA via CNAME lookup works, recursive only +norec ($n)"
 ret=0
 $DIG $DIGOPTS +norec cname-excluded-only.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 2," dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001:eeee::3" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking excluded AAAA and non-mapped A via CNAME lookup works, recursive only +norec ($n)"
+echo_i "checking excluded AAAA and non-mapped A via CNAME lookup works, recursive only +norec ($n)"
 ret=0
 $DIG $DIGOPTS +norec cname-excluded-bad-a.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 2," dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001:eeee::2" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking excluded only AAAA and mapped A via CNAME lookup works, recursive only +norec ($n)"
+echo_i "checking excluded only AAAA and mapped A via CNAME lookup works, recursive only +norec ($n)"
 ret=0
 $DIG $DIGOPTS +norec cname-excluded-good-a.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 2," dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001:eeee::1" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking AAAA only via CNAME lookup works, recursive only +norec ($n)"
+echo_i "checking AAAA only via CNAME lookup works, recursive only +norec ($n)"
 ret=0
 $DIG $DIGOPTS +norec cname-aaaa-only.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::2" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking A only via CNAME lookup works, recursive only +norec ($n)"
+echo_i "checking A only via CNAME lookup works, recursive only +norec ($n)"
 ret=0
 $DIG $DIGOPTS +norec cname-a-only.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns2.test$n > /dev/null || ret=1
 grep "CNAME    a-only.example." dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking A and AAAA via CNAME lookup works, recursive only +norec ($n)"
+echo_i "checking A and AAAA via CNAME lookup works, recursive only +norec ($n)"
 ret=0
 $DIG $DIGOPTS +norec cname-a-and-aaaa.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::1" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking non-mapped A via CNAME lookup works, recursive only +norec ($n)"
+echo_i "checking non-mapped A via CNAME lookup works, recursive only +norec ($n)"
 ret=0
 $DIG $DIGOPTS +norec cname-a-not-mapped.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns2.test$n > /dev/null || ret=1
 grep "CNAME    a-not-mapped.example." dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking NODATA AAAA via CNAME lookup works, recursive only +norec ($n)"
+echo_i "checking NODATA AAAA via CNAME lookup works, recursive only +norec ($n)"
 ret=0
 $DIG $DIGOPTS +norec cname-mx-only.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns2.test$n > /dev/null || ret=1
 grep "CNAME    mx-only.example." dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking non-existent AAAA via CNAME lookup works, recursive only +norec ($n)"
+echo_i "checking non-existent AAAA via CNAME lookup works, recursive only +norec ($n)"
 ret=0
 $DIG $DIGOPTS +norec cname-non-existent.example. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NXDOMAIN" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 # Check the example. domain from non client
 
-echo "I: checking non-excluded AAAA from non-client lookup works ($n)"
+echo_i "checking non-excluded AAAA from non-client lookup works ($n)"
 ret=0
 $DIG $DIGOPTS aaaa-only.example. @10.53.0.2 -b 10.53.0.3 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::2" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking excluded only AAAA from non-client lookup works ($n)"
+echo_i "checking excluded only AAAA from non-client lookup works ($n)"
 ret=0
 $DIG $DIGOPTS excluded-only.example. @10.53.0.2 -b 10.53.0.3 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001:eeee::3" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking excluded AAAA and non-mapped A from non-client lookup works ($n)"
+echo_i "checking excluded AAAA and non-mapped A from non-client lookup works ($n)"
 ret=0
 $DIG $DIGOPTS excluded-bad-a.example. @10.53.0.2 -b 10.53.0.3 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001:eeee::2" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking excluded only AAAA and mapped A from non-client lookup works ($n)"
+echo_i "checking excluded only AAAA and mapped A from non-client lookup works ($n)"
 ret=0
 $DIG $DIGOPTS excluded-good-a.example. @10.53.0.2 -b 10.53.0.3 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001:eeee::1" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking AAAA only from non-client lookup works ($n)"
+echo_i "checking AAAA only from non-client lookup works ($n)"
 ret=0
 $DIG $DIGOPTS aaaa-only.example. @10.53.0.2 -b 10.53.0.3 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::2" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking A only from non-client lookup works ($n)"
+echo_i "checking A only from non-client lookup works ($n)"
 ret=0
 $DIG $DIGOPTS a-only.example. @10.53.0.2 -b 10.53.0.3 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 0" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking A and AAAA from non-client lookup works ($n)"
+echo_i "checking A and AAAA from non-client lookup works ($n)"
 ret=0
 $DIG $DIGOPTS a-and-aaaa.example. @10.53.0.2 -b 10.53.0.3 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::1" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking non-mapped A from non-client lookup works ($n)"
+echo_i "checking non-mapped A from non-client lookup works ($n)"
 ret=0
 $DIG $DIGOPTS a-not-mapped.example. @10.53.0.2 -b 10.53.0.3 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 0" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking NODATA AAAA from non-client lookup works ($n)"
+echo_i "checking NODATA AAAA from non-client lookup works ($n)"
 ret=0
 $DIG $DIGOPTS mx-only.example. @10.53.0.2 -b 10.53.0.3 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 0" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking non-existent AAAA from non-client lookup works ($n)"
+echo_i "checking non-existent AAAA from non-client lookup works ($n)"
 ret=0
 $DIG $DIGOPTS non-existent.example. @10.53.0.2 -b 10.53.0.3 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NXDOMAIN" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking non-excluded AAAA via CNAME from non-client lookup works ($n)"
+echo_i "checking non-excluded AAAA via CNAME from non-client lookup works ($n)"
 ret=0
 $DIG $DIGOPTS cname-aaaa-only.example. @10.53.0.2 -b 10.53.0.3 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::2" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking excluded only AAAA via CNAME from non-client lookup works ($n)"
+echo_i "checking excluded only AAAA via CNAME from non-client lookup works ($n)"
 ret=0
 $DIG $DIGOPTS cname-excluded-only.example. @10.53.0.2 -b 10.53.0.3 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001:eeee::3" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking excluded AAAA and non-mapped A via CNAME from non-client lookup works ($n)"
+echo_i "checking excluded AAAA and non-mapped A via CNAME from non-client lookup works ($n)"
 ret=0
 $DIG $DIGOPTS cname-excluded-bad-a.example. @10.53.0.2 -b 10.53.0.3 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001:eeee::2" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking excluded only AAAA and mapped A via CNAME from non-client lookup works ($n)"
+echo_i "checking excluded only AAAA and mapped A via CNAME from non-client lookup works ($n)"
 ret=0
 $DIG $DIGOPTS cname-excluded-good-a.example. @10.53.0.2 -b 10.53.0.3 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001:eeee::1" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking AAAA only via CNAME from non-client lookup works ($n)"
+echo_i "checking AAAA only via CNAME from non-client lookup works ($n)"
 ret=0
 $DIG $DIGOPTS cname-aaaa-only.example. @10.53.0.2 -b 10.53.0.3 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::2" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking A only via CNAME from non-client lookup works ($n)"
+echo_i "checking A only via CNAME from non-client lookup works ($n)"
 ret=0
 $DIG $DIGOPTS cname-a-only.example. @10.53.0.2 -b 10.53.0.3 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking A and AAAA via CNAME from non-client lookup works ($n)"
+echo_i "checking A and AAAA via CNAME from non-client lookup works ($n)"
 ret=0
 $DIG $DIGOPTS cname-a-and-aaaa.example. @10.53.0.2 -b 10.53.0.3 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::1" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking non-mapped A via CNAME from non-client lookup works ($n)"
+echo_i "checking non-mapped A via CNAME from non-client lookup works ($n)"
 ret=0
 $DIG $DIGOPTS cname-a-not-mapped.example. @10.53.0.2 -b 10.53.0.3 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns2.test$n > /dev/null || ret=1
 grep "CNAME    a-not-mapped.example." dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking NODATA AAAA via CNAME from non-client lookup works ($n)"
+echo_i "checking NODATA AAAA via CNAME from non-client lookup works ($n)"
 ret=0
 $DIG $DIGOPTS cname-mx-only.example. @10.53.0.2 -b 10.53.0.3 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns2.test$n > /dev/null || ret=1
 grep "CNAME    mx-only.example." dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking non-existent AAAA via CNAME from non-client lookup works ($n)"
+echo_i "checking non-existent AAAA via CNAME from non-client lookup works ($n)"
 ret=0
 $DIG $DIGOPTS cname-non-existent.example. @10.53.0.2 -b 10.53.0.3 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NXDOMAIN" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 # Check the signed. domain
 
-echo "I: checking non-excluded AAAA lookup is signed zone works ($n)"
+echo_i "checking non-excluded AAAA lookup is signed zone works ($n)"
 ret=0
 $DIG $DIGOPTS aaaa-only.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::2" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking excluded only AAAA lookup is signed zone works ($n)"
+echo_i "checking excluded only AAAA lookup is signed zone works ($n)"
 ret=0
 $DIG $DIGOPTS excluded-only.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 0," dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking excluded AAAA and non-mapped A lookup is signed zone works ($n)"
+echo_i "checking excluded AAAA and non-mapped A lookup is signed zone works ($n)"
 ret=0
 $DIG $DIGOPTS excluded-bad-a.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 0," dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking excluded only AAAA and mapped A lookup is signed zone works ($n)"
+echo_i "checking excluded only AAAA and mapped A lookup is signed zone works ($n)"
 ret=0
 $DIG $DIGOPTS excluded-good-a.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001:aaaa::102:304" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking AAAA only lookup is signed zone works ($n)"
+echo_i "checking AAAA only lookup is signed zone works ($n)"
 ret=0
 $DIG $DIGOPTS aaaa-only.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::2" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking A only lookup is signed zone works ($n)"
+echo_i "checking A only lookup is signed zone works ($n)"
 ret=0
 $DIG $DIGOPTS a-only.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001:aaaa::102:305" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking A and AAAA lookup is signed zone works ($n)"
+echo_i "checking A and AAAA lookup is signed zone works ($n)"
 ret=0
 $DIG $DIGOPTS a-and-aaaa.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::1" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking non-mapped A lookup is signed zone works ($n)"
+echo_i "checking non-mapped A lookup is signed zone works ($n)"
 ret=0
 $DIG $DIGOPTS a-not-mapped.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 0" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking NODATA AAAA lookup is signed zone works ($n)"
+echo_i "checking NODATA AAAA lookup is signed zone works ($n)"
 ret=0
 $DIG $DIGOPTS mx-only.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 0" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking non-existent AAAA lookup is signed zone works ($n)"
+echo_i "checking non-existent AAAA lookup is signed zone works ($n)"
 ret=0
 $DIG $DIGOPTS non-existent.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NXDOMAIN" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking non-excluded AAAA via CNAME lookup is signed zone works ($n)"
+echo_i "checking non-excluded AAAA via CNAME lookup is signed zone works ($n)"
 ret=0
 $DIG $DIGOPTS cname-aaaa-only.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::2" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking excluded only AAAA via CNAME lookup is signed zone works ($n)"
+echo_i "checking excluded only AAAA via CNAME lookup is signed zone works ($n)"
 ret=0
 $DIG $DIGOPTS cname-excluded-only.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking excluded AAAA and non-mapped A via CNAME lookup is signed zone works ($n)"
+echo_i "checking excluded AAAA and non-mapped A via CNAME lookup is signed zone works ($n)"
 ret=0
 $DIG $DIGOPTS cname-excluded-bad-a.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking excluded only AAAA and mapped A via CNAME lookup is signed zone works ($n)"
+echo_i "checking excluded only AAAA and mapped A via CNAME lookup is signed zone works ($n)"
 ret=0
 $DIG $DIGOPTS cname-excluded-good-a.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001:aaaa::102:304" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking AAAA only via CNAME lookup is signed zone works ($n)"
+echo_i "checking AAAA only via CNAME lookup is signed zone works ($n)"
 ret=0
 $DIG $DIGOPTS cname-aaaa-only.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::2" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking A only via CNAME lookup is signed zone works ($n)"
+echo_i "checking A only via CNAME lookup is signed zone works ($n)"
 ret=0
 $DIG $DIGOPTS cname-a-only.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001:aaaa::102:305" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking A and AAAA via CNAME lookup is signed zone works ($n)"
+echo_i "checking A and AAAA via CNAME lookup is signed zone works ($n)"
 ret=0
 $DIG $DIGOPTS cname-a-and-aaaa.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::1" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking non-mapped A via CNAME lookup is signed zone works ($n)"
+echo_i "checking non-mapped A via CNAME lookup is signed zone works ($n)"
 ret=0
 $DIG $DIGOPTS cname-a-not-mapped.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns2.test$n > /dev/null || ret=1
 grep "CNAME    a-not-mapped.signed." dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking NODATA AAAA via CNAME lookup is signed zone works ($n)"
+echo_i "checking NODATA AAAA via CNAME lookup is signed zone works ($n)"
 ret=0
 $DIG $DIGOPTS cname-mx-only.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns2.test$n > /dev/null || ret=1
 grep "CNAME    mx-only.signed." dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking non-existent AAAA via CNAME lookup is signed zone works ($n)"
+echo_i "checking non-existent AAAA via CNAME lookup is signed zone works ($n)"
 ret=0
 $DIG $DIGOPTS cname-non-existent.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NXDOMAIN" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 # Check the signed. domain
-echo "I: checking non-excluded AAAA lookup is signed zone works with +dnssec ($n)"
+echo_i "checking non-excluded AAAA lookup is signed zone works with +dnssec ($n)"
 ret=0
 $DIG $DIGOPTS +dnssec aaaa-only.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::2" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking excluded only AAAA lookup is signed zone works with +dnssec ($n)"
+echo_i "checking excluded only AAAA lookup is signed zone works with +dnssec ($n)"
 ret=0
 $DIG $DIGOPTS +dnssec excluded-only.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001:eeee::3" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking excluded AAAA and non-mapped A lookup is signed zone works with +dnssec ($n)"
+echo_i "checking excluded AAAA and non-mapped A lookup is signed zone works with +dnssec ($n)"
 ret=0
 $DIG $DIGOPTS +dnssec excluded-bad-a.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001:eeee::2" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking excluded only AAAA and mapped A lookup is signed zone works with +dnssec ($n)"
+echo_i "checking excluded only AAAA and mapped A lookup is signed zone works with +dnssec ($n)"
 ret=0
 $DIG $DIGOPTS +dnssec excluded-good-a.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001:eeee::1" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking AAAA only lookup is signed zone works with +dnssec ($n)"
+echo_i "checking AAAA only lookup is signed zone works with +dnssec ($n)"
 ret=0
 $DIG $DIGOPTS +dnssec aaaa-only.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::2" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking A only lookup is signed zone works with +dnssec ($n)"
+echo_i "checking A only lookup is signed zone works with +dnssec ($n)"
 ret=0
 $DIG $DIGOPTS +dnssec a-only.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 0," dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking A and AAAA lookup is signed zone works with +dnssec ($n)"
+echo_i "checking A and AAAA lookup is signed zone works with +dnssec ($n)"
 ret=0
 $DIG $DIGOPTS +dnssec a-and-aaaa.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::1" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking non-mapped A lookup is signed zone works with +dnssec ($n)"
+echo_i "checking non-mapped A lookup is signed zone works with +dnssec ($n)"
 ret=0
 $DIG $DIGOPTS +dnssec a-not-mapped.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 0" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking NODATA AAAA lookup is signed zone works with +dnssec ($n)"
+echo_i "checking NODATA AAAA lookup is signed zone works with +dnssec ($n)"
 ret=0
 $DIG $DIGOPTS +dnssec mx-only.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 0" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking non-existent AAAA lookup is signed zone works with +dnssec ($n)"
+echo_i "checking non-existent AAAA lookup is signed zone works with +dnssec ($n)"
 ret=0
 $DIG $DIGOPTS +dnssec non-existent.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NXDOMAIN" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking non-excluded AAAA via CNAME lookup is signed zone works with +dnssec ($n)"
+echo_i "checking non-excluded AAAA via CNAME lookup is signed zone works with +dnssec ($n)"
 ret=0
 $DIG $DIGOPTS +dnssec cname-aaaa-only.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::2" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking excluded only AAAA via CNAME lookup is signed zone works with +dnssec ($n)"
+echo_i "checking excluded only AAAA via CNAME lookup is signed zone works with +dnssec ($n)"
 ret=0
 $DIG $DIGOPTS +dnssec cname-excluded-only.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001:eeee::3" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking excluded AAAA and non-mapped A via CNAME lookup is signed zone works with +dnssec ($n)"
+echo_i "checking excluded AAAA and non-mapped A via CNAME lookup is signed zone works with +dnssec ($n)"
 ret=0
 $DIG $DIGOPTS +dnssec cname-excluded-bad-a.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001:eeee::2" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking excluded only AAAA and mapped A via CNAME lookup is signed zone works with +dnssec ($n)"
+echo_i "checking excluded only AAAA and mapped A via CNAME lookup is signed zone works with +dnssec ($n)"
 ret=0
 $DIG $DIGOPTS +dnssec cname-excluded-good-a.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001:eeee::1" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking AAAA only via CNAME lookup is signed zone works with +dnssec ($n)"
+echo_i "checking AAAA only via CNAME lookup is signed zone works with +dnssec ($n)"
 ret=0
 $DIG $DIGOPTS +dnssec cname-aaaa-only.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::2" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking A only via CNAME lookup is signed zone works with +dnssec ($n)"
+echo_i "checking A only via CNAME lookup is signed zone works with +dnssec ($n)"
 ret=0
 $DIG $DIGOPTS +dnssec cname-a-only.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 2," dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001:aaaa::102:305" dig.out.ns2.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking A and AAAA via CNAME lookup is signed zone works with +dnssec ($n)"
+echo_i "checking A and AAAA via CNAME lookup is signed zone works with +dnssec ($n)"
 ret=0
 $DIG $DIGOPTS +dnssec cname-a-and-aaaa.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001::1" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking non-mapped A via CNAME lookup is signed zone works with +dnssec ($n)"
+echo_i "checking non-mapped A via CNAME lookup is signed zone works with +dnssec ($n)"
 ret=0
 $DIG $DIGOPTS +dnssec cname-a-not-mapped.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 2" dig.out.ns2.test$n > /dev/null || ret=1
 grep "CNAME    a-not-mapped.signed." dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking NODATA AAAA via CNAME lookup is signed zone works with +dnssec ($n)"
+echo_i "checking NODATA AAAA via CNAME lookup is signed zone works with +dnssec ($n)"
 ret=0
 $DIG $DIGOPTS +dnssec cname-mx-only.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 2," dig.out.ns2.test$n > /dev/null || ret=1
 grep "CNAME    mx-only.signed." dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking non-existent AAAA via CNAME lookup is signed zone works with +dnssec ($n)"
+echo_i "checking non-existent AAAA via CNAME lookup is signed zone works with +dnssec ($n)"
 ret=0
 $DIG $DIGOPTS +dnssec cname-non-existent.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NXDOMAIN" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 2," dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking reverse mapping ($n)"
+echo_i "checking reverse mapping ($n)"
 ret=0
 $DIG $DIGOPTS -x 2001:aaaa::10.0.0.1 @10.53.0.2 > dig.out.ns2.test$n || ret=1
 grep -i "CNAME.1.0.0.10.IN-ADDR.ARPA.$" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 list=`$DIG $DIGOPTS -b 10.53.0.6 @10.53.0.2 +short aaaa a-only.example | sort`
 for a in $list
 do
        ret=0
-       echo "I: checking reverse mapping of $a ($n)"
+       echo_i "checking reverse mapping of $a ($n)"
        $DIG $DIGOPTS -x $a @10.53.0.2 > dig.out.ns2.test$n || ret=1
        grep -i "CNAME.5.3.2.1.IN-ADDR.ARPA." dig.out.ns2.test$n > /dev/null || ret=1
        n=`expr $n + 1`
-       if [ $ret != 0 ]; then echo "I:failed"; fi
+       if [ $ret != 0 ]; then echo_i "failed"; fi
        status=`expr $status + $ret`
 done
 
@@ -1309,103 +1307,103 @@ fin=`expr "${rev}" : "............${regex}"`
 while test "${rev}" != "${fin}"
 do
        ret=0
-       echo "I: checking $rev ($n)"
+       echo_i "checking $rev ($n)"
        $DIG $DIGOPTS $rev ptr @10.53.0.2 > dig.out.ns2.test$n || ret=1
        grep -i "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
        grep -i "ANSWER: 0," dig.out.ns2.test$n > /dev/null || ret=1
        n=`expr $n + 1`
-       if [ $ret != 0 ]; then echo "I:failed"; fi
+       if [ $ret != 0 ]; then echo_i "failed"; fi
        status=`expr $status + $ret`
        rev=`expr "${rev}" : "${regex}"`
 done
 
-echo "I: checking dns64-server and dns64-contact ($n)"
+echo_i "checking dns64-server and dns64-contact ($n)"
 ret=0
 $DIG $DIGOPTS soa 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.a.a.a.a.1.0.0.2.ip6.arpa @10.53.0.2 > dig.out.ns2.test$n || ret=1
 grep "SOA.dns64.example.net..hostmaster.example.net." dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking TTL less than 600 from zone ($n)"
+echo_i "checking TTL less than 600 from zone ($n)"
 ret=0
 #expect 500
 $DIG $DIGOPTS aaaa ttl-less-than-600.example +rec @10.53.0.1 > dig.out.ns1.test$n || ret=1
 grep -i "ttl-less-than-600.example..500.IN.AAAA" dig.out.ns1.test$n >/dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking TTL more than 600 from zone ($n)"
+echo_i "checking TTL more than 600 from zone ($n)"
 ret=0
 #expect 700
 $DIG $DIGOPTS aaaa ttl-more-than-600.example +rec @10.53.0.1 > dig.out.ns1.test$n || ret=1
 grep -i "ttl-more-than-600.example..700.IN.AAAA" dig.out.ns1.test$n >/dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking TTL less than minimum from zone ($n)"
+echo_i "checking TTL less than minimum from zone ($n)"
 ret=0
 #expect 1100
 $DIG $DIGOPTS aaaa ttl-less-than-minimum.example +rec @10.53.0.1 > dig.out.ns1.test$n || ret=1
 grep -i "ttl-less-than-minimum.example..1100.IN.AAAA" dig.out.ns1.test$n >/dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking TTL limited to minimum from zone ($n)"
+echo_i "checking TTL limited to minimum from zone ($n)"
 ret=0
 #expect 1200
 $DIG $DIGOPTS aaaa ttl-more-than-minimum.example +rec @10.53.0.1 > dig.out.ns1.test$n || ret=1
 grep -i "ttl-more-than-minimum.example..1200.IN.AAAA" dig.out.ns1.test$n >/dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking TTL less than 600 via cache ($n)"
+echo_i "checking TTL less than 600 via cache ($n)"
 ret=0
 #expect 500
 $DIG $DIGOPTS aaaa ttl-less-than-600.example +rec -b 10.53.0.2 @10.53.0.2 > dig.out.ns1.test$n || ret=1
 grep -i "ttl-less-than-600.example..500.IN.AAAA" dig.out.ns1.test$n >/dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking TTL more than 600 via cache ($n)"
+echo_i "checking TTL more than 600 via cache ($n)"
 ret=0
 #expect 700
 $DIG $DIGOPTS aaaa ttl-more-than-600.example +rec -b 10.53.0.2 @10.53.0.2 > dig.out.ns2.test$n || ret=1
 grep -i "ttl-more-than-600.example..700.IN.AAAA" dig.out.ns2.test$n >/dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking TTL less than minimum via cache ($n)"
+echo_i "checking TTL less than minimum via cache ($n)"
 ret=0
 #expect 1100
 $DIG $DIGOPTS aaaa ttl-less-than-minimum.example +rec -b 10.53.0.2 @10.53.0.2 > dig.out.ns2.test$n || ret=1
 grep -i "ttl-less-than-minimum.example..1100.IN.AAAA" dig.out.ns2.test$n >/dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking TTL limited to minimum via cache ($n)"
+echo_i "checking TTL limited to minimum via cache ($n)"
 ret=0
 #expect 1200
 $DIG $DIGOPTS aaaa ttl-more-than-minimum.example +rec -b 10.53.0.2 @10.53.0.2 > dig.out.ns2.test$n || ret=1
 grep -i "ttl-more-than-minimum.example..1200.IN.AAAA" dig.out.ns2.test$n >/dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking synthesis of AAAA from RPZ-remapped A ($n)"
+echo_i "checking synthesis of AAAA from RPZ-remapped A ($n)"
 ret=0
 $DIG $DIGOPTS aaaa rpz.example +rec -b 10.53.0.7 @10.53.0.2 > dig.out.ns2.test$n || ret=1
 grep -i 'rpz.example.*IN.AAAA.2001:96::a0a:a0a' dig.out.ns2.test$n >/dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index af81a2993d39bfea02c6c4b5788a9b63c3b449a8..3a035f85ccf5025a4fe4e1ef9485b51b67063ce7 100644 (file)
@@ -19,6 +19,7 @@ rm -f */K* */keyset-* */dsset-* */dlvset-* */signedkey-* */*.signed
 rm -f */example.bk
 rm -f */named.memstats
 rm -f */named.run
+rm -f */named.conf
 rm -f */named.secroots
 rm -f */tmp* */*.jnl */*.bk */*.jbk
 rm -f */trusted.conf */managed.conf */revoked.conf
@@ -83,8 +84,6 @@ rm -f ns3/unsecure.example.db ns3/bogus.example.db ns3/keyless.example.db
 rm -f ns3/revkey.example.db
 rm -f ns3/managed-future.example.db
 rm -f ns4/managed-keys.bind*
-rm -f ns4/named.conf
-rm -f ns4/named.conf ns5/named.conf
 rm -f ns4/named_dump.db
 rm -f ns6/optout-tld.db
 rm -f ns7/multiple.example.bk ns7/nsec3.example.bk ns7/optout.example.bk
index e2ad9c99c273eb0ea8f8b0b9264f9ff71ea8c772..57c491eb64208b50d9c07ac56a3292953cf48c2f 100644 (file)
@@ -32,8 +32,6 @@
 #
 #    perl -MCPAN -e "install Net::DNS"
 #
-# $Id: dnssec_update_test.pl,v 1.7 2010/08/13 23:47:03 tbox Exp $
-#
 
 use Getopt::Std;
 use Net::DNS;
@@ -60,7 +58,7 @@ my $failures = 0;
 sub assert {
     my ($cond, $explanation) = @_;
     if (!$cond) {
-       print "I:Test Failed: $explanation ***\n";
+       print "Test Failed: $explanation ***\n";
        $failures++
     }
 }
@@ -81,13 +79,13 @@ sub test {
        my $rcode = $reply->header->rcode;
         assert($rcode eq $expected, "expected $expected, got $rcode");
     } else {
-       print "I:Update failed: ", $res->errorstring, "\n";
+       print "Update failed: ", $res->errorstring, "\n";
     }
 }
 
 sub section {
     my ($msg) = @_;
-    print "I:$msg\n";
+    print "$msg\n";
 }
 
 section("Add a name");
@@ -97,9 +95,9 @@ section("Delete the name");
 test("NOERROR", ["update", rr_del("a.$zone")]);
 
 if ($failures) {
-    print "I:$failures update tests failed.\n";
+    print "$failures update tests failed.\n";
 } else {
-    print "I:All update tests successful.\n";
+    print "All update tests successful.\n";
 }
 
 exit $failures;
similarity index 92%
rename from bin/tests/system/dnssec/ns1/named.conf
rename to bin/tests/system/dnssec/ns1/named.conf.in
index e6b6b025bdf5cb96729eb6d4a258955bc610f12d..cd2b1c82f6660a8be43658cf774334c079f59c0d 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.24 2007/06/19 23:47:02 tbox Exp $ */
-
 // NS1
 
-controls { /* empty */ };
-
 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 96%
rename from bin/tests/system/dnssec/ns2/named.conf
rename to bin/tests/system/dnssec/ns2/named.conf.in
index aea9c03d4380829220e04f100ad6302d97f8784a..e9499d9b32c1614ef5a18f9550b3cac313945539 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.36 2011/03/21 23:47:21 tbox Exp $ */
-
 // NS2
 
-controls { /* empty */ };
-
 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 97%
rename from bin/tests/system/dnssec/ns3/named.conf
rename to bin/tests/system/dnssec/ns3/named.conf.in
index eb1a6e816d6d1e4e4b0ff7550d2c5ff76c420876..48131615e43a1086915f35b6cd3fc85fc415a271 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.49 2011/10/28 06:20:05 each Exp $ */
-
 // NS3
 
-controls { /* empty */ };
-
 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; };
@@ -42,7 +38,7 @@ key rndc_key {
 };
 
 controls {
-       inet 10.53.0.3 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.3 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 zone "." {
similarity index 90%
rename from bin/tests/system/dnssec/ns4/named1.conf
rename to bin/tests/system/dnssec/ns4/named1.conf.in
index c4a220903b4d3f6cc1bf16a95a7d9cae087026ac..ad4f79c99e99631571676eb6af9fb9f1b896b2f5 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named1.conf,v 1.3 2011/01/04 23:47:13 tbox Exp $ */
-
 // NS4
 
-controls { /* empty */ };
-
 options {
        query-source address 10.53.0.4;
        notify-source 10.53.0.4;
        transfer-source 10.53.0.4;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.4; };
        listen-on-v6 { none; };
@@ -48,7 +44,7 @@ key rndc_key {
 };
 
 controls {
-        inet 10.53.0.4 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.4 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 zone "." {
similarity index 88%
rename from bin/tests/system/dnssec/ns4/named2.conf
rename to bin/tests/system/dnssec/ns4/named2.conf.in
index cc395bed7811478daf453dc1267079d0dc3f1719..c336280fc6e53561bd860e45662388fba77c78a8 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named2.conf,v 1.3 2011/01/04 23:47:13 tbox Exp $ */
-
 // NS4
 
-controls { /* empty */ };
-
 options {
        query-source address 10.53.0.4;
        notify-source 10.53.0.4;
        transfer-source 10.53.0.4;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.4; };
        listen-on-v6 { none; };
@@ -41,7 +37,7 @@ key rndc_key {
 };
 
 controls {
-        inet 10.53.0.4 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.4 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 zone "." {
similarity index 88%
rename from bin/tests/system/dnssec/ns4/named3.conf
rename to bin/tests/system/dnssec/ns4/named3.conf.in
index 2d407407dcafdc0a708a6fcd7f8aa6619178a5d5..6eb9004382fa8fe6b8c73ee1f802d39e96344696 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named2.conf,v 1.3 2011/01/04 23:47:13 tbox Exp $ */
-
 // NS4
 
-controls { /* empty */ };
-
 options {
        query-source address 10.53.0.4;
        notify-source 10.53.0.4;
        transfer-source 10.53.0.4;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.4; };
        listen-on-v6 { none; };
@@ -42,7 +38,7 @@ key rndc_key {
 };
 
 controls {
-        inet 10.53.0.4 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.4 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 zone "." {
similarity index 92%
rename from bin/tests/system/dnssec/ns4/named4.conf
rename to bin/tests/system/dnssec/ns4/named4.conf.in
index 819d6fbaa1f680d9e8409c3273ce3171e66c54d1..b928c80f2c243a5022066a8a328aab5f5738cc7a 100644 (file)
 
 // NS4
 
-controls { /* empty */ };
-
 options {
        query-source address 10.53.0.4;
        notify-source 10.53.0.4;
        transfer-source 10.53.0.4;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.4; };
        listen-on-v6 { none; };
@@ -40,7 +38,7 @@ key rndc_key {
 };
 
 controls {
-       inet 10.53.0.4 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.4 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 zone "." {
similarity index 95%
rename from bin/tests/system/dnssec/ns4/named5.conf
rename to bin/tests/system/dnssec/ns4/named5.conf.in
index 063eab1ee2629dd5f1dd78a86b61c524dfec8b0a..65f787b76baf0b9e930b5dd7cb7794e197108346 100644 (file)
@@ -22,7 +22,7 @@ options {
        query-source address 10.53.0.4;
        notify-source 10.53.0.4;
        transfer-source 10.53.0.4;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.4; };
        listen-on-v6 { none; };
@@ -34,7 +34,7 @@ key rndc_key {
 };
 
 controls {
-       inet 10.53.0.4 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.4 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 key auth {
similarity index 92%
rename from bin/tests/system/dnssec/ns5/named1.conf
rename to bin/tests/system/dnssec/ns5/named1.conf.in
index 8db8ccc51b073e43f625d839791f650acd174900..80dda22d042f8d6fe461753caa19774059eadc7a 100644 (file)
 
 // NS5
 
-controls { /* empty */ };
-
 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";
        listen-on { 10.53.0.5; };
        listen-on-v6 { none; };
@@ -39,7 +37,7 @@ key rndc_key {
 };
 
 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; };
 };
 
 
similarity index 93%
rename from bin/tests/system/dnssec/ns5/named2.conf
rename to bin/tests/system/dnssec/ns5/named2.conf.in
index a5d2ad0ee28f38d53d06a7100e8ff4681db9b3c7..7b5f7551d5ae85a325401ee719d592d763690be0 100644 (file)
 
 // NS5
 
-controls { /* empty */ };
-
 key rndc_key {
        secret "1234abcd8765";
        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; };
 };
 
 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";
        listen-on { 10.53.0.5; 127.0.0.1; };
        listen-on-v6 { none; };
similarity index 92%
rename from bin/tests/system/dnssec/ns6/named.conf
rename to bin/tests/system/dnssec/ns6/named.conf.in
index 4bff0cb662b1340edc5cc992f0d90f960571f1d4..6a14f6024ed17e0f1a5e4734f9c776ceb54a8db1 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.12 2007/06/18 23:47:28 tbox Exp $ */
-
 // NS6
 
-controls { /* empty */ };
-
 options {
        query-source address 10.53.0.6;
        notify-source 10.53.0.6;
        transfer-source 10.53.0.6;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.6; };
        listen-on-v6 { none; };
similarity index 94%
rename from bin/tests/system/dnssec/ns7/named.conf
rename to bin/tests/system/dnssec/ns7/named.conf.in
index d5690704124ea369b17800714af0d8a02fd9c7a0..d2def9fcadab5e6c9112df32d58a25f398fb2f6c 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.5 2010/06/26 23:46:49 tbox Exp $ */
-
-// NS3
-
-controls { /* empty */ };
+// NS7
 
 options {
        query-source address 10.53.0.7;
        notify-source 10.53.0.7;
        transfer-source 10.53.0.7;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.7; };
        listen-on-v6 { none; };
index 5211e10942425524644629198140be34bcad2759..01ecf97b96e65ed0d5dbef10fec4ccad77ff7432 100644 (file)
@@ -24,7 +24,7 @@ then
     then
         :
     else
-        echo "I:Net::DNS versions 0.69 to 0.70 have bugs that cause this test to fail: please update." >&2
+        echo_i "Net::DNS versions 0.69 to 0.70 have bugs that cause this test to fail: please update." >&2
         exit 1
     fi
 fi
index e46626f4cafea11552be7b83068a8baa2658b5ea..7cf977fe8083b8fbad1db427d9c7a5c91fbc4dcb 100644 (file)
@@ -22,14 +22,24 @@ $SHELL clean.sh
 
 test -r $RANDFILE || $GENRANDOM 400 $RANDFILE
 
-cd ns1 && $SHELL sign.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
+
+copy_setports ns4/named1.conf.in ns4/named.conf
+copy_setports ns5/named1.conf.in ns5/named.conf
+
+copy_setports ns6/named.conf.in ns6/named.conf
+copy_setports ns7/named.conf.in ns7/named.conf
+
+cd ns1
+$SHELL sign.sh
 
 echo "a.bogus.example. A       10.0.0.22" >>../ns3/bogus.example.db.signed
 
-cd ../ns3 && cp -f siginterval1.conf siginterval.conf
-cd ../ns4 && cp -f named1.conf named.conf
-cd ../ns5 && {
-    cp -f trusted.conf.bad trusted.conf
-    cp -f named1.conf named.conf
-    $SHELL sign.sh
-}
+cd ../ns3
+cp -f siginterval1.conf siginterval.conf
+
+cd ../ns5
+cp -f trusted.conf.bad trusted.conf
+$SHELL sign.sh
index cc6bfd95a6e99a85ae91917aaedd5667518a3896..c87c862e769c8a3feeeddacfcfdd6d3991cbf6cb 100644 (file)
@@ -1,7 +1,6 @@
 #!/bin/sh
 #
-# Copyright (C) 2004-2017  Internet Systems Consortium, Inc. ("ISC")
-# Copyright (C) 2000-2002  Internet Software Consortium.
+# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
 #
 # Permission to use, copy, modify, and/or distribute this software for any
 # purpose with or without fee is hereby granted, provided that the above
@@ -23,8 +22,10 @@ n=1
 
 rm -f dig.out.*
 
-DIGOPTS="+tcp +noadd +nosea +nostat +nocmd +dnssec -p 5300"
-SAMPLEKEY=`cat ns1/sample.key`
+DIGOPTS="+tcp +noadd +nosea +nostat +nocmd +dnssec -p ${PORT}"
+ANSWEROPTS="+noall +answer +dnssec -p ${PORT}"
+RNDCCMD="$RNDC -c $SYSTEMTESTTOP/common/rndc.conf -p ${CONTROLPORT} -s"
+SAMPLEOPTS="`cat ns1/sample.key` -p ${PORT}"
 
 # convert private-type records to readable form
 showprivate () {
@@ -49,7 +50,7 @@ checkprivate () {
     echo $x | grep incomplete >&- 2>&- && ret=1
     [ $ret = 1 ] && {
         echo "$x"
-        echo "I:failed"
+        echo_i "failed"
     }
     return $ret
 }
@@ -74,7 +75,7 @@ israw1 () {
 
 # Check the example. domain
 
-echo "I:checking that zone transfer worked ($n)"
+echo_i "checking that zone transfer worked ($n)"
 for i in 1 2 3 4 5 6 7 8 9
 do
        ret=0
@@ -86,63 +87,63 @@ do
 done
 $PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns3.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 # test AD bit:
 #  - dig +adflag asks for authentication (ad in response)
-echo "I:checking AD bit asking for validation ($n)"
+echo_i "checking AD bit asking for validation ($n)"
 ret=0
 $DIG $DIGOPTS +noauth +noadd +nodnssec +adflag a.example. @10.53.0.2 a > dig.out.ns2.test$n || ret=1
 $DIG $DIGOPTS +noauth +noadd +nodnssec +adflag a.example. @10.53.0.4 a > dig.out.ns4.test$n || ret=1
 $PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns4.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 # test AD bit:
-#  - dig +noadflag 
-echo "I:checking that AD is not set without +adflag or +dnssec ($n)"
+#  - dig +noadflag
+echo_i "checking that AD is not set without +adflag or +dnssec ($n)"
 ret=0
 $DIG $DIGOPTS +noauth +noadd +nodnssec +noadflag a.example. @10.53.0.2 a > dig.out.ns2.test$n || ret=1
 $DIG $DIGOPTS +noauth +noadd +nodnssec +noadflag a.example. @10.53.0.4 a > dig.out.ns4.test$n || ret=1
 $PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns4.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking for AD in authoritative answer ($n)"
+echo_i "checking for AD in authoritative answer ($n)"
 ret=0
 $DIG $DIGOPTS a.example. @10.53.0.2 a > dig.out.ns2.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns2.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking positive validation NSEC ($n)"
+echo_i "checking positive validation NSEC ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.example. @10.53.0.2 a > dig.out.ns2.test$n || ret=1
 $DIG $DIGOPTS +noauth a.example. @10.53.0.4 a > dig.out.ns4.test$n || ret=1
 $PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns4.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 if [ -x ${SAMPLE} ] ; then
    ret=0
-   echo "I:checking postive validation NSEC using dns_client ($n)"
-   $SAMPLE $SAMPLEKEY -p 5300 -t a 10.53.0.4 a.example > sample.out$n || ret=1
+   echo_i "checking postive validation NSEC using dns_client ($n)"
+   $SAMPLE $SAMPLEOPTS -t a 10.53.0.4 a.example > sample.out$n || ret=1
    grep "a.example..*10.0.0.1" sample.out$n > /dev/null || ret=1
    grep "a.example..*.RRSIG.A 3 2 300 .*" sample.out$n > /dev/null || ret=1
    n=`expr $n + 1`
-   if [ $ret != 0 ]; then echo "I:failed"; fi
+   if [ $ret != 0 ]; then echo_i "failed"; fi
    status=`expr $status + $ret`
 fi
 
-echo "I:checking positive validation NSEC3 ($n)"
+echo_i "checking positive validation NSEC3 ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.nsec3.example. \
        @10.53.0.3 a > dig.out.ns3.test$n || ret=1
@@ -151,21 +152,21 @@ $DIG $DIGOPTS +noauth a.nsec3.example. \
 $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 if [ -x ${SAMPLE} ] ; then
    ret=0
-   echo "I:checking positive validation NSEC3 using dns_client ($n)"
-   $SAMPLE $SAMPLEKEY -p 5300 -t a 10.53.0.4 a.nsec3.example > sample.out$n || ret=1
+   echo_i "checking positive validation NSEC3 using dns_client ($n)"
+   $SAMPLE $SAMPLEOPTS -t a 10.53.0.4 a.nsec3.example > sample.out$n || ret=1
    grep "a.nsec3.example..*10.0.0.1" sample.out$n > /dev/null || ret=1
    grep "a.nsec3.example..*RRSIG.A 7 3 300.*" sample.out$n > /dev/null || ret=1
    n=`expr $n + 1`
-   if [ $ret != 0 ]; then echo "I:failed"; fi
+   if [ $ret != 0 ]; then echo_i "failed"; fi
    status=`expr $status + $ret`
 fi
 
-echo "I:checking positive validation OPTOUT ($n)"
+echo_i "checking positive validation OPTOUT ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.optout.example. \
        @10.53.0.3 a > dig.out.ns3.test$n || ret=1
@@ -174,21 +175,21 @@ $DIG $DIGOPTS +noauth a.optout.example. \
 $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 if [ -x ${SAMPLE} ] ; then
    ret=0
-   echo "I:checking positive validation OPTOUT using dns_client ($n)"
-   $SAMPLE $SAMPLEKEY -p 5300 -t a 10.53.0.4 a.optout.example > sample.out$n || ret=1
+   echo_i "checking positive validation OPTOUT using dns_client ($n)"
+   $SAMPLE $SAMPLEOPTS -t a 10.53.0.4 a.optout.example > sample.out$n || ret=1
    grep "a.optout.example..*10.0.0.1" sample.out$n > /dev/null || ret=1
    grep "a.optout.example..*RRSIG.A 7 3 300.*" sample.out$n > /dev/null || ret=1
    n=`expr $n + 1`
-   if [ $ret != 0 ]; then echo "I:failed"; fi
+   if [ $ret != 0 ]; then echo_i "failed"; fi
    status=`expr $status + $ret`
 fi
 
-echo "I:checking positive wildcard validation NSEC ($n)"
+echo_i "checking positive wildcard validation NSEC ($n)"
 ret=0
 $DIG $DIGOPTS a.wild.example. @10.53.0.2 a > dig.out.ns2.test$n || ret=1
 $DIG $DIGOPTS a.wild.example. @10.53.0.4 a > dig.out.ns4.test$n || ret=1
@@ -196,39 +197,39 @@ $PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns4.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 if [ -x ${SAMPLE} ] ; then
    ret=0
-   echo "I:checking positive wildcard validation NSEC using dns_client ($n)"
-   $SAMPLE $SAMPLEKEY -p 5300 -t a 10.53.0.4 a.wild.example > sample.out$n || ret=1
+   echo_i "checking positive wildcard validation NSEC using dns_client ($n)"
+   $SAMPLE $SAMPLEOPTS -t a 10.53.0.4 a.wild.example > sample.out$n || ret=1
    grep "a.wild.example..*10.0.0.27" sample.out$n > /dev/null || ret=1
    grep "a.wild.example..*RRSIG.A 3 2 300.*" sample.out$n > /dev/null || ret=1
    n=`expr $n + 1`
-   if [ $ret != 0 ]; then echo "I:failed"; fi
+   if [ $ret != 0 ]; then echo_i "failed"; fi
    status=`expr $status + $ret`
 fi
 
-echo "I:checking positive wildcard answer NSEC3 ($n)"
+echo_i "checking positive wildcard answer NSEC3 ($n)"
 ret=0
 $DIG $DIGOPTS a.wild.nsec3.example. @10.53.0.3 a > dig.out.ns3.test$n || ret=1
 grep "AUTHORITY: 4," dig.out.ns3.test$n > /dev/null || ret=1
 grep "status: NOERROR" dig.out.ns3.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking positive wildcard answer NSEC3 ($n)"
+echo_i "checking positive wildcard answer NSEC3 ($n)"
 ret=0
 $DIG $DIGOPTS a.wild.nsec3.example. @10.53.0.4 a > dig.out.ns4.test$n || ret=1
 grep "AUTHORITY: 4," dig.out.ns4.test$n > /dev/null || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking positive wildcard validation NSEC3 ($n)"
+echo_i "checking positive wildcard validation NSEC3 ($n)"
 ret=0
 $DIG $DIGOPTS a.wild.nsec3.example. @10.53.0.3 a > dig.out.ns3.test$n || ret=1
 $DIG $DIGOPTS a.wild.nsec3.example. @10.53.0.4 a > dig.out.ns4.test$n || ret=1
@@ -236,21 +237,21 @@ $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 if [ -x ${SAMPLE} ] ; then
    ret=0
-   echo "I:checking positive wildcard validation NSEC3 using dns_client ($n)"
-   $SAMPLE $SAMPLEKEY -p 5300 -t a 10.53.0.4 a.wild.nsec3.example > sample.out$n || ret=1
+   echo_i "checking positive wildcard validation NSEC3 using dns_client ($n)"
+   $SAMPLE $SAMPLEOPTS -t a 10.53.0.4 a.wild.nsec3.example > sample.out$n || ret=1
    grep "a.wild.nsec3.example..*10.0.0.6" sample.out$n > /dev/null || ret=1
    grep "a.wild.nsec3.example..*RRSIG.A 7 3 300.*" sample.out$n > /dev/null || ret=1
    n=`expr $n + 1`
-   if [ $ret != 0 ]; then echo "I:failed"; fi
+   if [ $ret != 0 ]; then echo_i "failed"; fi
    status=`expr $status + $ret`
 fi
 
-echo "I:checking positive wildcard validation OPTOUT ($n)"
+echo_i "checking positive wildcard validation OPTOUT ($n)"
 ret=0
 $DIG $DIGOPTS a.wild.optout.example. \
        @10.53.0.3 a > dig.out.ns3.test$n || ret=1
@@ -260,21 +261,21 @@ $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 if [ -x ${SAMPLE} ] ; then
    ret=0
-   echo "I:checking positive wildcard validation OPTOUT using dns_client ($n)"
-   $SAMPLE $SAMPLEKEY -p 5300 -t a 10.53.0.4 a.wild.optout.example > sample.out$n || ret=1
+   echo_i "checking positive wildcard validation OPTOUT using dns_client ($n)"
+   $SAMPLE $SAMPLEOPTS -t a 10.53.0.4 a.wild.optout.example > sample.out$n || ret=1
    grep "a.wild.optout.example..*10.0.0.6" sample.out$n > /dev/null || ret=1
    grep "a.wild.optout.example..*RRSIG.A 7 3 300.*" sample.out$n > /dev/null || ret=1
    n=`expr $n + 1`
-   if [ $ret != 0 ]; then echo "I:failed"; fi
+   if [ $ret != 0 ]; then echo_i "failed"; fi
    status=`expr $status + $ret`
 fi
 
-echo "I:checking negative validation NXDOMAIN NSEC ($n)"
+echo_i "checking negative validation NXDOMAIN NSEC ($n)"
 ret=0
 $DIG $DIGOPTS +noauth q.example. @10.53.0.2 a > dig.out.ns2.test$n || ret=1
 $DIG $DIGOPTS +noauth q.example. @10.53.0.4 a > dig.out.ns4.test$n || ret=1
@@ -282,20 +283,20 @@ $PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns4.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 grep "status: NXDOMAIN" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 if [ -x ${SAMPLE} ] ; then
    ret=0
-   echo "I:checking negative validation NXDOMAIN NSEC using dns_client ($n)"
-   $SAMPLE $SAMPLEKEY -p 5300 -t a 10.53.0.4 q.example > /dev/null 2> sample.out$n || ret=1
+   echo_i "checking negative validation NXDOMAIN NSEC using dns_client ($n)"
+   $SAMPLE $SAMPLEOPTS -t a 10.53.0.4 q.example > /dev/null 2> sample.out$n || ret=1
    grep "resolution failed: ncache nxdomain" sample.out$n > /dev/null || ret=1
    n=`expr $n + 1`
-   if [ $ret != 0 ]; then echo "I:failed"; fi
+   if [ $ret != 0 ]; then echo_i "failed"; fi
    status=`expr $status + $ret`
 fi
 
-echo "I:checking negative validation NXDOMAIN NSEC3 ($n)"
+echo_i "checking negative validation NXDOMAIN NSEC3 ($n)"
 ret=0
 $DIG $DIGOPTS +noauth q.nsec3.example. \
        @10.53.0.3 a > dig.out.ns3.test$n || ret=1
@@ -305,20 +306,20 @@ $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 grep "status: NXDOMAIN" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 if [ -x ${SAMPLE} ] ; then
    ret=0
-   echo "I:checking negative validation NXDOMAIN NSEC3 using dns_client ($n)"
-   $SAMPLE $SAMPLEKEY -p 5300 -t a 10.53.0.4 q.nsec3.example > /dev/null 2> sample.out$n || ret=1
+   echo_i "checking negative validation NXDOMAIN NSEC3 using dns_client ($n)"
+   $SAMPLE $SAMPLEOPTS -t a 10.53.0.4 q.nsec3.example > /dev/null 2> sample.out$n || ret=1
    grep "resolution failed: ncache nxdomain" sample.out$n > /dev/null || ret=1
    n=`expr $n + 1`
-   if [ $ret != 0 ]; then echo "I:failed"; fi
+   if [ $ret != 0 ]; then echo_i "failed"; fi
    status=`expr $status + $ret`
 fi
 
-echo "I:checking negative validation NXDOMAIN OPTOUT ($n)"
+echo_i "checking negative validation NXDOMAIN OPTOUT ($n)"
 ret=0
 $DIG $DIGOPTS +noauth q.optout.example. \
        @10.53.0.3 a > dig.out.ns3.test$n || ret=1
@@ -329,20 +330,20 @@ grep "status: NXDOMAIN" dig.out.ns4.test$n > /dev/null || ret=1
 # Note - this is looking for failure, hence the &&
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 if [ -x ${SAMPLE} ] ; then
    ret=0
-   echo "I:checking negative validation NXDOMAIN OPTOUT using dns_client ($n)"
-   $SAMPLE $SAMPLEKEY -p 5300 -t a 10.53.0.4 q.optout.example > /dev/null 2> sample.out$n || ret=1
+   echo_i "checking negative validation NXDOMAIN OPTOUT using dns_client ($n)"
+   $SAMPLE $SAMPLEOPTS -t a 10.53.0.4 q.optout.example > /dev/null 2> sample.out$n || ret=1
    grep "resolution failed: ncache nxdomain" sample.out$n > /dev/null || ret=1
    n=`expr $n + 1`
-   if [ $ret != 0 ]; then echo "I:failed"; fi
+   if [ $ret != 0 ]; then echo_i "failed"; fi
    status=`expr $status + $ret`
 fi
 
-echo "I:checking negative validation NODATA NSEC ($n)"
+echo_i "checking negative validation NODATA NSEC ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.example. @10.53.0.2 txt > dig.out.ns2.test$n || ret=1
 $DIG $DIGOPTS +noauth a.example. @10.53.0.4 txt > dig.out.ns4.test$n || ret=1
@@ -351,20 +352,20 @@ grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "ANSWER: 0" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 if [ -x ${SAMPLE} ] ; then
    ret=0
-   echo "I:checking negative validation NODATA OPTOUT using dns_client ($n)"
-   $SAMPLE $SAMPLEKEY -p 5300 -t txt 10.53.0.4 a.example > /dev/null 2> sample.out$n || ret=1
+   echo_i "checking negative validation NODATA OPTOUT using dns_client ($n)"
+   $SAMPLE $SAMPLEOPTS -t txt 10.53.0.4 a.example > /dev/null 2> sample.out$n || ret=1
    grep "resolution failed: ncache nxrrset" sample.out$n > /dev/null || ret=1
    n=`expr $n + 1`
-   if [ $ret != 0 ]; then echo "I:failed"; fi
+   if [ $ret != 0 ]; then echo_i "failed"; fi
    status=`expr $status + $ret`
 fi
 
-echo "I:checking negative validation NODATA NSEC3 ($n)"
+echo_i "checking negative validation NODATA NSEC3 ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.nsec3.example. \
        @10.53.0.3 txt > dig.out.ns3.test$n || ret=1
@@ -375,20 +376,20 @@ grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "ANSWER: 0" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 if [ -x ${SAMPLE} ] ; then
    ret=0
-   echo "I:checking negative validation NODATA NSEC3 using dns_client ($n)"
-   $SAMPLE $SAMPLEKEY -p 5300 -t txt 10.53.0.4 a.nsec3.example > /dev/null 2> sample.out$n || ret=1
+   echo_i "checking negative validation NODATA NSEC3 using dns_client ($n)"
+   $SAMPLE $SAMPLEOPTS -t txt 10.53.0.4 a.nsec3.example > /dev/null 2> sample.out$n || ret=1
    grep "resolution failed: ncache nxrrset" sample.out$n > /dev/null || ret=1
    n=`expr $n + 1`
-   if [ $ret != 0 ]; then echo "I:failed"; fi
+   if [ $ret != 0 ]; then echo_i "failed"; fi
    status=`expr $status + $ret`
 fi
 
-echo "I:checking negative validation NODATA OPTOUT ($n)"
+echo_i "checking negative validation NODATA OPTOUT ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.optout.example. \
        @10.53.0.3 txt > dig.out.ns3.test$n || ret=1
@@ -399,20 +400,20 @@ grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "ANSWER: 0" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 if [ -x ${SAMPLE} ] ; then
    ret=0
-   echo "I:checking negative validation NODATA OPTOUT using dns_client ($n)"
-   $SAMPLE $SAMPLEKEY -p 5300 -t txt 10.53.0.4 a.optout.example > /dev/null 2> sample.out$n || ret=1
+   echo_i "checking negative validation NODATA OPTOUT using dns_client ($n)"
+   $SAMPLE $SAMPLEOPTS -t txt 10.53.0.4 a.optout.example > /dev/null 2> sample.out$n || ret=1
    grep "resolution failed: ncache nxrrset" sample.out$n > /dev/null || ret=1
    n=`expr $n + 1`
-   if [ $ret != 0 ]; then echo "I:failed"; fi
+   if [ $ret != 0 ]; then echo_i "failed"; fi
    status=`expr $status + $ret`
 fi
 
-echo "I:checking negative wildcard validation NSEC ($n)"
+echo_i "checking negative wildcard validation NSEC ($n)"
 ret=0
 $DIG $DIGOPTS b.wild.example. @10.53.0.2 txt > dig.out.ns2.test$n || ret=1
 $DIG $DIGOPTS b.wild.example. @10.53.0.4 txt > dig.out.ns4.test$n || ret=1
@@ -420,40 +421,40 @@ $PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns4.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 if [ -x ${SAMPLE} ] ; then
    ret=0
-   echo "I:checking negative wildcard validation NSEC using dns_client ($n)"
-   $SAMPLE $SAMPLEKEY -p 5300 -t txt 10.53.0.4 b.wild.example > /dev/null 2> sample.out$n || ret=1
+   echo_i "checking negative wildcard validation NSEC using dns_client ($n)"
+   $SAMPLE $SAMPLEOPTS -t txt 10.53.0.4 b.wild.example > /dev/null 2> sample.out$n || ret=1
    grep "resolution failed: ncache nxrrset" sample.out$n > /dev/null || ret=1
    n=`expr $n + 1`
-   if [ $ret != 0 ]; then echo "I:failed"; fi
+   if [ $ret != 0 ]; then echo_i "failed"; fi
    status=`expr $status + $ret`
 fi
 
-echo "I:checking negative wildcard validation NSEC3 ($n)"
+echo_i "checking negative wildcard validation NSEC3 ($n)"
 ret=0
 $DIG $DIGOPTS b.wild.nsec3.example. @10.53.0.3 txt > dig.out.ns3.test$n || ret=1
 $DIG $DIGOPTS b.wild.nsec3.example. @10.53.0.4 txt > dig.out.ns4.test$n || ret=1
 $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 if [ -x ${SAMPLE} ] ; then
    ret=0
-   echo "I:checking negative wildcard validation NSEC3 using dns_client ($n)"
-   $SAMPLE $SAMPLEKEY -p 5300 -t txt 10.53.0.4 b.wild.nsec3.example > /dev/null 2> sample.out$n || ret=1
+   echo_i "checking negative wildcard validation NSEC3 using dns_client ($n)"
+   $SAMPLE $SAMPLEOPTS -t txt 10.53.0.4 b.wild.nsec3.example > /dev/null 2> sample.out$n || ret=1
    grep "resolution failed: ncache nxrrset" sample.out$n > /dev/null || ret=1
    n=`expr $n + 1`
-   if [ $ret != 0 ]; then echo "I:failed"; fi
+   if [ $ret != 0 ]; then echo_i "failed"; fi
    status=`expr $status + $ret`
 fi
 
-echo "I:checking negative wildcard validation OPTOUT ($n)"
+echo_i "checking negative wildcard validation OPTOUT ($n)"
 ret=0
 $DIG $DIGOPTS b.wild.optout.example. \
        @10.53.0.3 txt > dig.out.ns3.test$n || ret=1
@@ -464,22 +465,22 @@ grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 # Note - this is looking for failure, hence the &&
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 if [ -x ${SAMPLE} ] ; then
    ret=0
-   echo "I:checking negative wildcard validation OPTOUT using dns_client ($n)"
-   $SAMPLE $SAMPLEKEY -p 5300 -t txt 10.53.0.4 b.optout.nsec3.example > /dev/null 2> sample.out$n || ret=1
+   echo_i "checking negative wildcard validation OPTOUT using dns_client ($n)"
+   $SAMPLE $SAMPLEOPTS -t txt 10.53.0.4 b.optout.nsec3.example > /dev/null 2> sample.out$n || ret=1
    grep "resolution failed: ncache nxrrset" sample.out$n > /dev/null || ret=1
    n=`expr $n + 1`
-   if [ $ret != 0 ]; then echo "I:failed"; fi
+   if [ $ret != 0 ]; then echo_i "failed"; fi
    status=`expr $status + $ret`
 fi
 
 # Check the insecure.example domain
 
-echo "I:checking 1-server insecurity proof NSEC ($n)"
+echo_i "checking 1-server insecurity proof NSEC ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.insecure.example. @10.53.0.3 a > dig.out.ns3.test$n || ret=1
 $DIG $DIGOPTS +noauth a.insecure.example. @10.53.0.4 a > dig.out.ns4.test$n || ret=1
@@ -488,20 +489,20 @@ grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 # Note - this is looking for failure, hence the &&
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 if [ -x ${SAMPLE} ] ; then
    ret=0
-   echo "I:checking 1-server insecurity proof NSEC using dns_client ($n)"
-   $SAMPLE $SAMPLEKEY -p 5300 -t a 10.53.0.4 a.insecure.example > sample.out$n || ret=1
+   echo_i "checking 1-server insecurity proof NSEC using dns_client ($n)"
+   $SAMPLE $SAMPLEOPTS -t a 10.53.0.4 a.insecure.example > sample.out$n || ret=1
    grep "a.insecure.example..*10.0.0.1" sample.out$n > /dev/null || ret=1
    n=`expr $n + 1`
-   if [ $ret != 0 ]; then echo "I:failed"; fi
+   if [ $ret != 0 ]; then echo_i "failed"; fi
    status=`expr $status + $ret`
 fi
 
-echo "I:checking 1-server insecurity proof NSEC3 ($n)"
+echo_i "checking 1-server insecurity proof NSEC3 ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.insecure.nsec3.example. @10.53.0.3 a > dig.out.ns3.test$n || ret=1
 $DIG $DIGOPTS +noauth a.insecure.nsec3.example. @10.53.0.4 a > dig.out.ns4.test$n || ret=1
@@ -510,20 +511,20 @@ grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 # Note - this is looking for failure, hence the &&
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 if [ -x ${SAMPLE} ] ; then
    ret=0
-   echo "I:checking 1-server insecurity proof NSEC3 using dns_client ($n)"
-   $SAMPLE $SAMPLEKEY -p 5300 -t a 10.53.0.4 a.insecure.nsec3.example > sample.out$n || ret=1
+   echo_i "checking 1-server insecurity proof NSEC3 using dns_client ($n)"
+   $SAMPLE $SAMPLEOPTS -t a 10.53.0.4 a.insecure.nsec3.example > sample.out$n || ret=1
    grep "a.insecure.nsec3.example..*10.0.0.1" sample.out$n > /dev/null || ret=1
    n=`expr $n + 1`
-   if [ $ret != 0 ]; then echo "I:failed"; fi
+   if [ $ret != 0 ]; then echo_i "failed"; fi
    status=`expr $status + $ret`
 fi
 
-echo "I:checking 1-server insecurity proof OPTOUT ($n)"
+echo_i "checking 1-server insecurity proof OPTOUT ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.insecure.optout.example. @10.53.0.3 a > dig.out.ns3.test$n || ret=1
 $DIG $DIGOPTS +noauth a.insecure.optout.example. @10.53.0.4 a > dig.out.ns4.test$n || ret=1
@@ -532,20 +533,20 @@ grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 # Note - this is looking for failure, hence the &&
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 if [ -x ${SAMPLE} ] ; then
    ret=0
-   echo "I:checking 1-server insecurity proof OPTOUT using dns_client ($n)"
-   $SAMPLE $SAMPLEKEY -p 5300 -t a 10.53.0.4 a.insecure.optout.example > sample.out$n || ret=1
+   echo_i "checking 1-server insecurity proof OPTOUT using dns_client ($n)"
+   $SAMPLE $SAMPLEOPTS -t a 10.53.0.4 a.insecure.optout.example > sample.out$n || ret=1
    grep "a.insecure.optout.example..*10.0.0.1" sample.out$n > /dev/null || ret=1
    n=`expr $n + 1`
-   if [ $ret != 0 ]; then echo "I:failed"; fi
+   if [ $ret != 0 ]; then echo_i "failed"; fi
    status=`expr $status + $ret`
 fi
 
-echo "I:checking 1-server negative insecurity proof NSEC ($n)"
+echo_i "checking 1-server negative insecurity proof NSEC ($n)"
 ret=0
 $DIG $DIGOPTS q.insecure.example. a @10.53.0.3 \
        > dig.out.ns3.test$n || ret=1
@@ -556,20 +557,20 @@ grep "status: NXDOMAIN" dig.out.ns4.test$n > /dev/null || ret=1
 # Note - this is looking for failure, hence the &&
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 if [ -x ${SAMPLE} ] ; then
    ret=0
-   echo "I:checking 1-server negative insecurity proof NSEC using dns_client ($n)"
-   $SAMPLE $SAMPLEKEY -p 5300 -t a 10.53.0.4 q.insecure.example > /dev/null 2> sample.out$n || ret=1
+   echo_i "checking 1-server negative insecurity proof NSEC using dns_client ($n)"
+   $SAMPLE $SAMPLEOPTS -t a 10.53.0.4 q.insecure.example > /dev/null 2> sample.out$n || ret=1
    grep "resolution failed: ncache nxdomain" sample.out$n > /dev/null || ret=1
    n=`expr $n + 1`
-   if [ $ret != 0 ]; then echo "I:failed"; fi
+   if [ $ret != 0 ]; then echo_i "failed"; fi
    status=`expr $status + $ret`
 fi
 
-echo "I:checking 1-server negative insecurity proof NSEC3 ($n)"
+echo_i "checking 1-server negative insecurity proof NSEC3 ($n)"
 ret=0
 $DIG $DIGOPTS q.insecure.nsec3.example. a @10.53.0.3 \
        > dig.out.ns3.test$n || ret=1
@@ -580,20 +581,20 @@ grep "status: NXDOMAIN" dig.out.ns4.test$n > /dev/null || ret=1
 # Note - this is looking for failure, hence the &&
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 if [ -x ${SAMPLE} ] ; then
    ret=0
-   echo "I:checking 1-server negative insecurity proof NSEC3 using dns_client ($n)"
-   $SAMPLE $SAMPLEKEY -p 5300 -t a 10.53.0.4 q.insecure.nsec3.example > /dev/null 2> sample.out$n || ret=1
+   echo_i "checking 1-server negative insecurity proof NSEC3 using dns_client ($n)"
+   $SAMPLE $SAMPLEOPTS -t a 10.53.0.4 q.insecure.nsec3.example > /dev/null 2> sample.out$n || ret=1
    grep "resolution failed: ncache nxdomain" sample.out$n > /dev/null || ret=1
    n=`expr $n + 1`
-   if [ $ret != 0 ]; then echo "I:failed"; fi
+   if [ $ret != 0 ]; then echo_i "failed"; fi
    status=`expr $status + $ret`
 fi
 
-echo "I:checking 1-server negative insecurity proof OPTOUT ($n)"
+echo_i "checking 1-server negative insecurity proof OPTOUT ($n)"
 ret=0
 $DIG $DIGOPTS q.insecure.optout.example. a @10.53.0.3 \
        > dig.out.ns3.test$n || ret=1
@@ -604,20 +605,20 @@ grep "status: NXDOMAIN" dig.out.ns4.test$n > /dev/null || ret=1
 # Note - this is looking for failure, hence the &&
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 if [ -x ${SAMPLE} ] ; then
    ret=0
-   echo "I:checking 1-server negative insecurity proof OPTOUT using dns_client ($n)"
-   $SAMPLE $SAMPLEKEY -p 5300 -t a 10.53.0.4 q.insecure.optout.example > /dev/null 2> sample.out$n || ret=1
+   echo_i "checking 1-server negative insecurity proof OPTOUT using dns_client ($n)"
+   $SAMPLE $SAMPLEOPTS -t a 10.53.0.4 q.insecure.optout.example > /dev/null 2> sample.out$n || ret=1
    grep "resolution failed: ncache nxdomain" sample.out$n > /dev/null || ret=1
    n=`expr $n + 1`
-   if [ $ret != 0 ]; then echo "I:failed"; fi
+   if [ $ret != 0 ]; then echo_i "failed"; fi
    status=`expr $status + $ret`
 fi
 
-echo "I:checking 1-server negative insecurity proof with SOA hack NSEC ($n)"
+echo_i "checking 1-server negative insecurity proof with SOA hack NSEC ($n)"
 ret=0
 $DIG $DIGOPTS r.insecure.example. soa @10.53.0.3 \
        > dig.out.ns3.test$n || ret=1
@@ -629,10 +630,10 @@ grep "0   IN      SOA" dig.out.ns4.test$n > /dev/null || ret=1
 # Note - this is looking for failure, hence the &&
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking 1-server negative insecurity proof with SOA hack NSEC3 ($n)"
+echo_i "checking 1-server negative insecurity proof with SOA hack NSEC3 ($n)"
 ret=0
 $DIG $DIGOPTS r.insecure.nsec3.example. soa @10.53.0.3 \
        > dig.out.ns3.test$n || ret=1
@@ -644,10 +645,10 @@ grep "0   IN      SOA" dig.out.ns4.test$n > /dev/null || ret=1
 # Note - this is looking for failure, hence the &&
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking 1-server negative insecurity proof with SOA hack OPTOUT ($n)"
+echo_i "checking 1-server negative insecurity proof with SOA hack OPTOUT ($n)"
 ret=0
 $DIG $DIGOPTS r.insecure.optout.example. soa @10.53.0.3 \
        > dig.out.ns3.test$n || ret=1
@@ -659,12 +660,12 @@ grep "0   IN      SOA" dig.out.ns4.test$n > /dev/null || ret=1
 # Note - this is looking for failure, hence the &&
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 # Check the secure.example domain
 
-echo "I:checking multi-stage positive validation NSEC/NSEC ($n)"
+echo_i "checking multi-stage positive validation NSEC/NSEC ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.secure.example. \
        @10.53.0.3 a > dig.out.ns3.test$n || ret=1
@@ -674,10 +675,10 @@ $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking multi-stage positive validation NSEC/NSEC3 ($n)"
+echo_i "checking multi-stage positive validation NSEC/NSEC3 ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.nsec3.example. \
        @10.53.0.3 a > dig.out.ns3.test$n || ret=1
@@ -687,10 +688,10 @@ $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking multi-stage positive validation NSEC/OPTOUT ($n)"
+echo_i "checking multi-stage positive validation NSEC/OPTOUT ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.optout.example. \
        @10.53.0.3 a > dig.out.ns3.test$n || ret=1
@@ -700,10 +701,10 @@ $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking multi-stage positive validation NSEC3/NSEC ($n)"
+echo_i "checking multi-stage positive validation NSEC3/NSEC ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.secure.nsec3.example. \
        @10.53.0.3 a > dig.out.ns3.test$n || ret=1
@@ -713,10 +714,10 @@ $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking multi-stage positive validation NSEC3/NSEC3 ($n)"
+echo_i "checking multi-stage positive validation NSEC3/NSEC3 ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.nsec3.nsec3.example. \
        @10.53.0.3 a > dig.out.ns3.test$n || ret=1
@@ -726,10 +727,10 @@ $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking multi-stage positive validation NSEC3/OPTOUT ($n)"
+echo_i "checking multi-stage positive validation NSEC3/OPTOUT ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.optout.nsec3.example. \
        @10.53.0.3 a > dig.out.ns3.test$n || ret=1
@@ -739,10 +740,10 @@ $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking multi-stage positive validation OPTOUT/NSEC ($n)"
+echo_i "checking multi-stage positive validation OPTOUT/NSEC ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.secure.optout.example. \
        @10.53.0.3 a > dig.out.ns3.test$n || ret=1
@@ -752,10 +753,10 @@ $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking multi-stage positive validation OPTOUT/NSEC3 ($n)"
+echo_i "checking multi-stage positive validation OPTOUT/NSEC3 ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.nsec3.optout.example. \
        @10.53.0.3 a > dig.out.ns3.test$n || ret=1
@@ -765,10 +766,10 @@ $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking multi-stage positive validation OPTOUT/OPTOUT ($n)"
+echo_i "checking multi-stage positive validation OPTOUT/OPTOUT ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.optout.optout.example. \
        @10.53.0.3 a > dig.out.ns3.test$n || ret=1
@@ -778,10 +779,10 @@ $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking empty NODATA OPTOUT ($n)"
+echo_i "checking empty NODATA OPTOUT ($n)"
 ret=0
 $DIG $DIGOPTS +noauth empty.optout.example. \
        @10.53.0.3 a > dig.out.ns3.test$n || ret=1
@@ -791,84 +792,84 @@ $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 #grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 # Check the bogus domain
 
-echo "I:checking failed validation ($n)"
+echo_i "checking failed validation ($n)"
 ret=0
 $DIG $DIGOPTS a.bogus.example. @10.53.0.4 a > dig.out.ns4.test$n || ret=1
 grep "SERVFAIL" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 if [ -x ${SAMPLE} ] ; then
    ret=0
-   echo "I:checking failed validation using dns_client ($n)"
-   $SAMPLE $SAMPLEKEY -p 5300 -t a 10.53.0.4 a.bogus.example > /dev/null 2> sample.out$n || ret=1
+   echo_i "checking failed validation using dns_client ($n)"
+   $SAMPLE $SAMPLEOPTS -t a 10.53.0.4 a.bogus.example > /dev/null 2> sample.out$n || ret=1
    grep "resolution failed: no valid RRSIG" sample.out$n > /dev/null || ret=1
    n=`expr $n + 1`
-   if [ $ret != 0 ]; then echo "I:failed"; fi
+   if [ $ret != 0 ]; then echo_i "failed"; fi
    status=`expr $status + $ret`
 fi
 
 # Try validating with a bad trusted key.
 # This should fail.
 
-echo "I:checking that validation fails with a misconfigured trusted key ($n)"
+echo_i "checking that validation fails with a misconfigured trusted key ($n)"
 ret=0
 $DIG $DIGOPTS example. soa @10.53.0.5 > dig.out.ns5.test$n || ret=1
 grep "SERVFAIL" dig.out.ns5.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that negative validation fails with a misconfigured trusted key ($n)"
+echo_i "checking that negative validation fails with a misconfigured trusted key ($n)"
 ret=0
 $DIG $DIGOPTS example. ptr @10.53.0.5 > dig.out.ns5.test$n || ret=1
 grep "SERVFAIL" dig.out.ns5.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that insecurity proofs fail with a misconfigured trusted key ($n)"
+echo_i "checking that insecurity proofs fail with a misconfigured trusted key ($n)"
 ret=0
 $DIG $DIGOPTS a.insecure.example. a @10.53.0.5 > dig.out.ns5.test$n || ret=1
 grep "SERVFAIL" dig.out.ns5.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that validation fails when key record is missing ($n)"
+echo_i "checking that validation fails when key record is missing ($n)"
 ret=0
 $DIG $DIGOPTS a.b.keyless.example. a @10.53.0.4 > dig.out.ns4.test$n || ret=1
 grep "SERVFAIL" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 if [ -x ${SAMPLE} ] ; then
    ret=0
-   echo "I:checking that validation fails when key record is missing using dns_client ($n)"
-   $SAMPLE $SAMPLEKEY -p 5300 -t a 10.53.0.4 a.b.keyless.example > /dev/null 2> sample.out$n || ret=1
+   echo_i "checking that validation fails when key record is missing using dns_client ($n)"
+   $SAMPLE $SAMPLEOPTS -t a 10.53.0.4 a.b.keyless.example > /dev/null 2> sample.out$n || ret=1
    grep "resolution failed: broken trust chain" sample.out$n > /dev/null || ret=1
    n=`expr $n + 1`
-   if [ $ret != 0 ]; then echo "I:failed"; fi
+   if [ $ret != 0 ]; then echo_i "failed"; fi
    status=`expr $status + $ret`
 fi
 
-echo "I:checking that validation succeeds when a revoked key is encountered ($n)"
+echo_i "checking that validation succeeds when a revoked key is encountered ($n)"
 ret=0
 $DIG $DIGOPTS revkey.example soa @10.53.0.4 > dig.out.ns4.test$n || ret=1
 grep "NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "flags: .* ad" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:Checking that a bad CNAME signature is caught after a +CD query ($n)"
+echo_i "Checking that a bad CNAME signature is caught after a +CD query ($n)"
 ret=0
 #prime
 $DIG $DIGOPTS +cd bad-cname.example. @10.53.0.4 > dig.out.ns4.prime$n || ret=1
@@ -877,15 +878,15 @@ expect="a.example.
 10.0.0.1"
 ans=`$DIG $DIGOPTS +cd +nodnssec +short bad-cname.example. @10.53.0.4` || ret=1
 test "$ans" = "$expect" || ret=1
-test $ret = 0 || echo I:failed, got "'""$ans""'", expected "'""$expect""'"
+test $ret = 0 || echo_i "failed, got '$ans', expected '$expect'"
 #check: requery without +CD.  bogus cached data should be rejected.
 $DIG $DIGOPTS +nodnssec bad-cname.example. @10.53.0.4 > dig.out.ns4.test$n || ret=1
 grep "SERVFAIL" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:Checking that a bad DNAME signature is caught after a +CD query ($n)"
+echo_i "Checking that a bad DNAME signature is caught after a +CD query ($n)"
 ret=0
 #prime
 $DIG $DIGOPTS +cd a.bad-dname.example. @10.53.0.4 > dig.out.ns4.prime$n || ret=1
@@ -895,17 +896,17 @@ a.example.
 10.0.0.1"
 ans=`$DIG $DIGOPTS +cd +nodnssec +short a.bad-dname.example. @10.53.0.4` || ret=1
 test "$ans" = "$expect" || ret=1
-test $ret = 0 || echo I:failed, got "'""$ans""'", expected "'""$expect""'"
+test $ret = 0 || echo_i "failed, got '$ans', expected '$expect'"
 #check: requery without +CD.  bogus cached data should be rejected.
 $DIG $DIGOPTS +nodnssec a.bad-dname.example. @10.53.0.4 > dig.out.ns4.test$n || ret=1
 grep "SERVFAIL" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 # Check the insecure.secure.example domain (insecurity proof)
 
-echo "I:checking 2-server insecurity proof ($n)"
+echo_i "checking 2-server insecurity proof ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.insecure.secure.example. @10.53.0.2 a \
        > dig.out.ns2.test$n || ret=1
@@ -916,12 +917,12 @@ grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 # Note - this is looking for failure, hence the &&
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 # Check a negative response in insecure.secure.example
 
-echo "I:checking 2-server insecurity proof with a negative answer ($n)"
+echo_i "checking 2-server insecurity proof with a negative answer ($n)"
 ret=0
 $DIG $DIGOPTS q.insecure.secure.example. @10.53.0.2 a > dig.out.ns2.test$n \
        || ret=1
@@ -932,10 +933,10 @@ grep "status: NXDOMAIN" dig.out.ns4.test$n > /dev/null || ret=1
 # Note - this is looking for failure, hence the &&
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking 2-server insecurity proof with a negative answer and SOA hack ($n)"
+echo_i "checking 2-server insecurity proof with a negative answer and SOA hack ($n)"
 ret=0
 $DIG $DIGOPTS r.insecure.secure.example. @10.53.0.2 soa > dig.out.ns2.test$n \
        || ret=1
@@ -946,23 +947,23 @@ grep "status: NXDOMAIN" dig.out.ns4.test$n > /dev/null || ret=1
 # Note - this is looking for failure, hence the &&
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 # Check that the query for a security root is successful and has ad set
 
-echo "I:checking security root query ($n)"
+echo_i "checking security root query ($n)"
 ret=0
 $DIG $DIGOPTS . @10.53.0.4 key > dig.out.ns4.test$n || ret=1
 grep "NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 # Check that the setting the cd bit works
 
-echo "I:checking cd bit on a positive answer ($n)"
+echo_i "checking cd bit on a positive answer ($n)"
 ret=0
 $DIG $DIGOPTS +noauth example. soa @10.53.0.4 \
        > dig.out.ns4.test$n || ret=1
@@ -973,10 +974,10 @@ grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 # Note - this is looking for failure, hence the &&
 grep "flags:.*ad.*QUERY" dig.out.ns5.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking cd bit on a negative answer ($n)"
+echo_i "checking cd bit on a negative answer ($n)"
 ret=0
 $DIG $DIGOPTS q.example. soa @10.53.0.4 > dig.out.ns4.test$n || ret=1
 $DIG $DIGOPTS +cdflag q.example. soa @10.53.0.5 > dig.out.ns5.test$n || ret=1
@@ -985,40 +986,40 @@ grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 # Note - this is looking for failure, hence the &&
 grep "flags:.*ad.*QUERY" dig.out.ns5.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking positive validation RSASHA256 NSEC ($n)"
+echo_i "checking positive validation RSASHA256 NSEC ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.rsasha256.example. @10.53.0.3 a > dig.out.ns3.test$n || ret=1
 $DIG $DIGOPTS +noauth a.rsasha256.example. @10.53.0.4 a > dig.out.ns4.test$n || ret=1
 $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking positive validation RSASHA512 NSEC ($n)"
+echo_i "checking positive validation RSASHA512 NSEC ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.rsasha512.example. @10.53.0.3 a > dig.out.ns3.test$n || ret=1
 $DIG $DIGOPTS +noauth a.rsasha512.example. @10.53.0.4 a > dig.out.ns4.test$n || ret=1
 $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking positive validation with KSK-only DNSKEY signature ($n)"
+echo_i "checking positive validation with KSK-only DNSKEY signature ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.kskonly.example. @10.53.0.3 a > dig.out.ns3.test$n || ret=1
 $DIG $DIGOPTS +noauth a.kskonly.example. @10.53.0.4 a > dig.out.ns4.test$n || ret=1
 $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking cd bit on a query that should fail ($n)"
+echo_i "checking cd bit on a query that should fail ($n)"
 ret=0
 $DIG $DIGOPTS a.bogus.example. soa @10.53.0.4 \
        > dig.out.ns4.test$n || ret=1
@@ -1029,10 +1030,10 @@ grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 # Note - this is looking for failure, hence the &&
 grep "flags:.*ad.*QUERY" dig.out.ns5.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking cd bit on an insecurity proof ($n)"
+echo_i "checking cd bit on an insecurity proof ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.insecure.example. soa @10.53.0.4 \
        > dig.out.ns4.test$n || ret=1
@@ -1044,10 +1045,10 @@ grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns5.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking cd bit on a negative insecurity proof ($n)"
+echo_i "checking cd bit on a negative insecurity proof ($n)"
 ret=0
 $DIG $DIGOPTS q.insecure.example. a @10.53.0.4 \
        > dig.out.ns4.test$n || ret=1
@@ -1059,10 +1060,10 @@ grep "status: NXDOMAIN" dig.out.ns4.test$n > /dev/null || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns5.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that validation of an ANY query works ($n)"
+echo_i "checking that validation of an ANY query works ($n)"
 ret=0
 $DIG $DIGOPTS +noauth foo.example. any @10.53.0.2 > dig.out.ns2.test$n || ret=1
 $DIG $DIGOPTS +noauth foo.example. any @10.53.0.4 > dig.out.ns4.test$n || ret=1
@@ -1071,10 +1072,10 @@ grep "NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 # 2 records in the zone, 1 NXT, 3 SIGs
 grep "ANSWER: 6" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that validation of a query returning a CNAME works ($n)"
+echo_i "checking that validation of a query returning a CNAME works ($n)"
 ret=0
 $DIG $DIGOPTS +noauth cname1.example. txt @10.53.0.2 \
        > dig.out.ns2.test$n || ret=1
@@ -1085,10 +1086,10 @@ grep "NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 # the CNAME & its sig, the TXT and its SIG
 grep "ANSWER: 4" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that validation of a query returning a DNAME works ($n)"
+echo_i "checking that validation of a query returning a DNAME works ($n)"
 ret=0
 $DIG $DIGOPTS +noauth foo.dname1.example. txt @10.53.0.2 \
        > dig.out.ns2.test$n || ret=1
@@ -1101,10 +1102,10 @@ grep "NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 # recursive server and not cached, but I don't know how.
 grep "ANSWER: 5" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that validation of an ANY query returning a CNAME works ($n)"
+echo_i "checking that validation of an ANY query returning a CNAME works ($n)"
 ret=0
 $DIG $DIGOPTS +noauth cname2.example. any @10.53.0.2 \
        > dig.out.ns2.test$n || ret=1
@@ -1115,10 +1116,10 @@ grep "NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 # The CNAME, NXT, and their SIGs
 grep "ANSWER: 4" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that validation of an ANY query returning a DNAME works ($n)"
+echo_i "checking that validation of an ANY query returning a DNAME works ($n)"
 ret=0
 $DIG $DIGOPTS +noauth foo.dname2.example. any @10.53.0.2 \
        > dig.out.ns2.test$n || ret=1
@@ -1127,10 +1128,10 @@ $DIG $DIGOPTS +noauth foo.dname2.example. any @10.53.0.4 \
 $PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns4.test$n || ret=1
 grep "NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that positive validation in a privately secure zone works ($n)"
+echo_i "checking that positive validation in a privately secure zone works ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.private.secure.example. a @10.53.0.2 \
        > dig.out.ns2.test$n || ret=1
@@ -1141,10 +1142,10 @@ grep "NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 # Note - this is looking for failure, hence the &&
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that negative validation in a privately secure zone works ($n)"
+echo_i "checking that negative validation in a privately secure zone works ($n)"
 ret=0
 $DIG $DIGOPTS +noauth q.private.secure.example. a @10.53.0.2 \
        > dig.out.ns2.test$n || ret=1
@@ -1155,10 +1156,10 @@ grep "NXDOMAIN" dig.out.ns4.test$n > /dev/null || ret=1
 # Note - this is looking for failure, hence the &&
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that lookups succeed after disabling a algorithm works ($n)"
+echo_i "checking that lookups succeed after disabling a algorithm works ($n)"
 ret=0
 $DIG $DIGOPTS +noauth example. SOA @10.53.0.2 \
        > dig.out.ns2.test$n || ret=1
@@ -1168,10 +1169,10 @@ $PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns6.test$n || ret=1
 # Note - this is looking for failure, hence the &&
 grep "flags:.*ad.*QUERY" dig.out.ns6.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking privately secure to nxdomain works ($n)"
+echo_i "checking privately secure to nxdomain works ($n)"
 ret=0
 $DIG $DIGOPTS +noauth private2secure-nxdomain.private.secure.example. SOA @10.53.0.2 \
        > dig.out.ns2.test$n || ret=1
@@ -1181,10 +1182,10 @@ $PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns4.test$n || ret=1
 # Note - this is looking for failure, hence the &&
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking privately secure wildcard to nxdomain works ($n)"
+echo_i "checking privately secure wildcard to nxdomain works ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.wild.private.secure.example. SOA @10.53.0.2 \
        > dig.out.ns2.test$n || ret=1
@@ -1194,10 +1195,10 @@ $PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns4.test$n || ret=1
 # Note - this is looking for failure, hence the &&
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking a non-cachable NODATA works ($n)"
+echo_i "checking a non-cachable NODATA works ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.nosoa.secure.example. txt @10.53.0.7 \
        > dig.out.ns7.test$n || ret=1
@@ -1206,10 +1207,10 @@ $DIG $DIGOPTS +noauth a.nosoa.secure.example. txt @10.53.0.4 \
        > dig.out.ns4.test$n || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking a non-cachable NXDOMAIN works ($n)"
+echo_i "checking a non-cachable NXDOMAIN works ($n)"
 ret=0
 $DIG $DIGOPTS +noauth b.nosoa.secure.example. txt @10.53.0.7 \
        > dig.out.ns7.test$n || ret=1
@@ -1218,7 +1219,7 @@ $DIG $DIGOPTS +noauth b.nosoa.secure.example. txt @10.53.0.4 \
        > dig.out.ns4.test$n || ret=1
 grep "status: NXDOMAIN" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 #
@@ -1227,34 +1228,34 @@ status=`expr $status + $ret`
 # to private.secure.example.  In addition secure.example is using a
 # algorithm which the validation does not support.
 #
-echo "I:checking dnssec-lookaside-validation works ($n)"
+echo_i "checking dnssec-lookaside-validation works ($n)"
 ret=0
 $DIG $DIGOPTS private.secure.example. SOA @10.53.0.6 \
        > dig.out.ns6.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns6.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that we can load a rfc2535 signed zone ($n)"
+echo_i "checking that we can load a rfc2535 signed zone ($n)"
 ret=0
 $DIG $DIGOPTS rfc2535.example. SOA @10.53.0.2 \
        > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that we can transfer a rfc2535 signed zone ($n)"
+echo_i "checking that we can transfer a rfc2535 signed zone ($n)"
 ret=0
 $DIG $DIGOPTS rfc2535.example. SOA @10.53.0.3 \
        > dig.out.ns3.test$n || ret=1
 grep "status: NOERROR" dig.out.ns3.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that we can sign a zone with out-of-zone records ($n)"
+echo_i "checking that we can sign a zone with out-of-zone records ($n)"
 ret=0
 zone=example
 key1=`$KEYGEN -K signer -q -r $RANDFILE -a NSEC3RSASHA1 -b 1024 -n zone $zone`
@@ -1265,10 +1266,10 @@ cat example.db.in $key1.key $key2.key > example.db
 $SIGNER -o example -f example.db example.db > /dev/null 2>&1
 ) || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that we can sign a zone (NSEC3) with out-of-zone records ($n)"
+echo_i "checking that we can sign a zone (NSEC3) with out-of-zone records ($n)"
 ret=0
 zone=example
 key1=`$KEYGEN -K signer -q -r $RANDFILE -a NSEC3RSASHA1 -b 1024 -n zone $zone`
@@ -1282,18 +1283,18 @@ awk '/^IQF9LQTLK/ {
                while (!index($0, ")")) {
                        if (getline <= 0)
                                break;
-                       printf (" %s", $0); 
+                       printf (" %s", $0);
                }
                printf("\n");
        }' example.db | sed 's/[        ][      ]*/ /g' > nsec3param.out
 
-grep "IQF9LQTLKKNFK0KVIFELRAK4IC4QLTMG.example. 0 IN NSEC3 1 0 10 - ( IQF9LQTLKKNFK0KVIFELRAK4IC4QLTMG A NS SOA RRSIG DNSKEY NSEC3PARAM )" nsec3param.out > /dev/null 
+grep "IQF9LQTLKKNFK0KVIFELRAK4IC4QLTMG.example. 0 IN NSEC3 1 0 10 - ( IQF9LQTLKKNFK0KVIFELRAK4IC4QLTMG A NS SOA RRSIG DNSKEY NSEC3PARAM )" nsec3param.out > /dev/null
 ) || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking NSEC3 signing with empty nonterminals above a delegation ($n)"
+echo_i "checking NSEC3 signing with empty nonterminals above a delegation ($n)"
 ret=0
 zone=example
 key1=`$KEYGEN -K signer -q -r $RANDFILE -a NSEC3RSASHA1 -b 1024 -n zone $zone`
@@ -1308,7 +1309,7 @@ awk '/^IQF9LQTLK/ {
                while (!index($0, ")")) {
                        if (getline <= 0)
                                break;
-                       printf (" %s", $0); 
+                       printf (" %s", $0);
                }
                printf("\n");
        }' example.db | sed 's/[        ][      ]*/ /g' > nsec3param.out
@@ -1316,10 +1317,10 @@ awk '/^IQF9LQTLK/ {
 grep "IQF9LQTLKKNFK0KVIFELRAK4IC4QLTMG.example. 0 IN NSEC3 1 0 10 - ( IQF9LQTLKKNFK0KVIFELRAK4IC4QLTMG A NS SOA RRSIG DNSKEY NSEC3PARAM )" nsec3param.out > /dev/null
 ) || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that dnsssec-signzone updates originalttl on ttl changes ($n)"
+echo_i "checking that dnsssec-signzone updates originalttl on ttl changes ($n)"
 ret=0
 zone=example
 key1=`$KEYGEN -K signer -q -r $RANDFILE -a RSASHA1 -b 1024 -n zone $zone`
@@ -1333,10 +1334,10 @@ $SIGNER -o example -f example.db.after example.db.changed > /dev/null 2>&1
 )
 grep "SOA 5 1 50" signer/example.db.after > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking dnssec-signzone keeps valid signatures from removed keys ($n)"
+echo_i "checking dnssec-signzone keeps valid signatures from removed keys ($n)"
 ret=0
 zone=example
 key1=`$KEYGEN -K signer -q -r $RANDFILE -f KSK -a RSASHA1 -b 1024 -n zone $zone`
@@ -1357,10 +1358,10 @@ $SIGNER -D -o example example.db > /dev/null 2>&1
 grep " $keyid2 " signer/example.db.signed > /dev/null 2>&1 || ret=1
 grep " $keyid3 " signer/example.db.signed > /dev/null 2>&1 || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking dnssec-signzone -R purges signatures from removed keys ($n)"
+echo_i "checking dnssec-signzone -R purges signatures from removed keys ($n)"
 ret=0
 (
 cd signer
@@ -1369,10 +1370,10 @@ $SIGNER -RD -o example example.db > /dev/null 2>&1
 grep " $keyid2 " signer/example.db.signed > /dev/null 2>&1 && ret=1
 grep " $keyid3 " signer/example.db.signed > /dev/null 2>&1 || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking dnssec-signzone keeps valid signatures from inactive keys ($n)"
+echo_i "checking dnssec-signzone keeps valid signatures from inactive keys ($n)"
 ret=0
 zone=example
 (
@@ -1387,10 +1388,10 @@ $SIGNER -SD -o example example.db > /dev/null 2>&1
 grep " $keyid2 " signer/example.db.signed > /dev/null 2>&1 || ret=1
 grep " $keyid3 " signer/example.db.signed > /dev/null 2>&1 || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking dnssec-signzone -Q purges signatures from inactive keys ($n)"
+echo_i "checking dnssec-signzone -Q purges signatures from inactive keys ($n)"
 ret=0
 (
 cd signer
@@ -1399,10 +1400,10 @@ $SIGNER -SDQ -o example example.db > /dev/null 2>&1
 grep " $keyid2 " signer/example.db.signed > /dev/null 2>&1 && ret=1
 grep " $keyid3 " signer/example.db.signed > /dev/null 2>&1 || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking dnssec-signzone retains unexpired signatures ($n)"
+echo_i "checking dnssec-signzone retains unexpired signatures ($n)"
 ret=0
 (
 cd signer
@@ -1419,10 +1420,10 @@ drop2=`awk '/dropped/ {print $3}' signer/signer.out.2`
 [ "$gen2" -eq 0 ] || ret=1
 [ "$drop2" -eq 0 ] || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking dnssec-signzone purges RRSIGs from formerly-owned glue (nsec) ($n)"
+echo_i "checking dnssec-signzone purges RRSIGs from formerly-owned glue (nsec) ($n)"
 ret=0
 (
 cd signer
@@ -1454,10 +1455,10 @@ $SIGNER -DS -O full -f example2.db.signed -o example example2.db > /dev/null 2>&
 grep "^sub1\.example\..*RRSIG[         ]A[     ]" signer/example2.db.signed > /dev/null 2>&1 && ret=1
 grep "^ns\.sub2\.example\..*RRSIG[     ]A[     ]" signer/example2.db.signed > /dev/null 2>&1 && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking dnssec-signzone purges RRSIGs from formerly-owned glue (nsec3) ($n)"
+echo_i "checking dnssec-signzone purges RRSIGs from formerly-owned glue (nsec3) ($n)"
 ret=0
 (
 cd signer
@@ -1488,10 +1489,10 @@ $SIGNER -DS -3 feedabee -O full -f example2.db.signed -o example example2.db > /
 grep "^sub1\.example\..*RRSIG[         ]A[     ]" signer/example2.db.signed > /dev/null 2>&1 && ret=1
 grep "^ns\.sub2\.example\..*RRSIG[     ]A[     ]" signer/example2.db.signed > /dev/null 2>&1 && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking dnssec-signzone output format ($n)"
+echo_i "checking dnssec-signzone output format ($n)"
 ret=0
 (
 cd signer
@@ -1506,10 +1507,10 @@ awk '/IN *SOA/ {if (NF != 7) exit(1)}' signer/signer.out.4 || ret=1
 israw1 signer/signer.out.5 || ret=1
 israw0 signer/signer.out.6 || ret=1
 israw1 signer/signer.out.7 || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking dnssec-signzone output format ($n)"
+echo_i "checking dnssec-signzone output format ($n)"
 ret=0
 (
 cd signer
@@ -1518,10 +1519,10 @@ $SIGNER -O text -f - -Sxt -o example example.db > signer.out.4 2>&1
 ) || ret=1
 awk '/IN *SOA/ {if (NF != 11) exit(1)}' signer/signer.out.3 || ret=1
 awk '/IN *SOA/ {if (NF != 7) exit(1)}' signer/signer.out.4 || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking validated data are not cached longer than originalttl ($n)"
+echo_i "checking validated data are not cached longer than originalttl ($n)"
 ret=0
 $DIG $DIGOPTS +ttl +noauth a.ttlpatch.example. @10.53.0.3 a > dig.out.ns3.test$n || ret=1
 $DIG $DIGOPTS +ttl +noauth a.ttlpatch.example. @10.53.0.4 a > dig.out.ns4.test$n || ret=1
@@ -1530,13 +1531,13 @@ grep "300.IN" dig.out.ns3.test$n > /dev/null && ret=1
 grep "300.IN" dig.out.ns4.test$n > /dev/null || ret=1
 grep "3600.IN" dig.out.ns4.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 # Test that "rndc secroots" is able to dump trusted keys
-echo "I:checking rndc secroots ($n)"
+echo_i "checking rndc secroots ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.4 -p 9953 secroots 2>&1 | sed 's/^/I:ns1 /'
+$RNDCCMD 10.53.0.4 secroots 2>&1 | sed 's/^/ns4 /' | cat_i
 keyid=`cat ns1/managed.key.id`
 cp ns4/named.secroots named.secroots.test$n
 linecount=`grep "./RSAMD5/$keyid ; trusted" named.secroots.test$n | wc -l`
@@ -1544,13 +1545,13 @@ linecount=`grep "./RSAMD5/$keyid ; trusted" named.secroots.test$n | wc -l`
 linecount=`cat named.secroots.test$n | wc -l`
 [ "$linecount" -eq 5 ] || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 # Check direct query for RRSIG.  If we first ask for normal (non RRSIG)
 # record, the corresponding RRSIG should be cached and subsequent query
 # for RRSIG will be returned with the cached record.
-echo "I:checking RRSIG query from cache ($n)"
+echo_i "checking RRSIG query from cache ($n)"
 ret=0
 $DIG $DIGOPTS normalthenrrsig.secure.example. @10.53.0.4 a > /dev/null || ret=1
 ans=`$DIG $DIGOPTS +short normalthenrrsig.secure.example. @10.53.0.4 rrsig` || ret=1
@@ -1560,12 +1561,12 @@ test "$ans" = "$expect" || ret=1
 $DIG $DIGOPTS normalthenrrsig.secure.example. @10.53.0.4 rrsig > dig.out.ns4.test$n || ret=1
 grep "flags:.*ra.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 # Check direct query for RRSIG: If it's not cached with other records,
 # it should result in an empty response.
-echo "I:checking RRSIG query not in cache ($n)"
+echo_i "checking RRSIG query not in cache ($n)"
 ret=0
 ans=`$DIG $DIGOPTS +short rrsigonly.secure.example. @10.53.0.4 rrsig` || ret=1
 test -z "$ans" || ret=1
@@ -1573,56 +1574,56 @@ test -z "$ans" || ret=1
 $DIG $DIGOPTS rrsigonly.secure.example. @10.53.0.4 rrsig > dig.out.ns4.test$n || ret=1
 grep "flags:.*ra.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 #
 # RT21868 regression test.
 #
-echo "I:checking NSEC3 zone with mismatched NSEC3PARAM / NSEC parameters ($n)"
+echo_i "checking NSEC3 zone with mismatched NSEC3PARAM / NSEC parameters ($n)"
 ret=0
 $DIG $DIGOPTS non-exist.badparam. @10.53.0.2 a > dig.out.ns2.test$n || ret=1
 grep "status: NXDOMAIN" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 #
 # RT22007 regression test.
 #
-echo "I:checking optout NSEC3 referral with only insecure delegations ($n)"
+echo_i "checking optout NSEC3 referral with only insecure delegations ($n)"
 ret=0
 $DIG $DIGOPTS +norec delegation.single-nsec3. @10.53.0.2 a > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "3KL3NK1HKQ4IUEEHBEF12VGFKUETNBAN.*NSEC3 1 1 1 - 3KL3NK1HKQ4IUEEHBEF12VGFKUETNBAN" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking optout NSEC3 NXDOMAIN with only insecure delegations ($n)"
+echo_i "checking optout NSEC3 NXDOMAIN with only insecure delegations ($n)"
 ret=0
 $DIG $DIGOPTS +norec nonexist.single-nsec3. @10.53.0.2 a > dig.out.ns2.test$n || ret=1
 grep "status: NXDOMAIN" dig.out.ns2.test$n > /dev/null || ret=1
 grep "3KL3NK1HKQ4IUEEHBEF12VGFKUETNBAN.*NSEC3 1 1 1 - 3KL3NK1HKQ4IUEEHBEF12VGFKUETNBAN" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 
 status=`expr $status + $ret`
-echo "I:checking optout NSEC3 nodata with only insecure delegations ($n)"
+echo_i "checking optout NSEC3 nodata with only insecure delegations ($n)"
 ret=0
 $DIG $DIGOPTS +norec single-nsec3. @10.53.0.2 a > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "3KL3NK1HKQ4IUEEHBEF12VGFKUETNBAN.*NSEC3 1 1 1 - 3KL3NK1HKQ4IUEEHBEF12VGFKUETNBAN" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that a zone finishing the transition from RSASHA1 to RSASHA256 validates secure ($n)"
+echo_i "checking that a zone finishing the transition from RSASHA1 to RSASHA256 validates secure ($n)"
 ret=0
 $DIG $DIGOPTS ns algroll. @10.53.0.4 > dig.out.ns4.test$n || ret=1
 grep "NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "flags:[^;]* ad[^;]*;" dig.out.ns4.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 # Run a minimal update test if possible.  This is really just
@@ -1630,44 +1631,49 @@ status=`expr $status + $ret`
 
 if $PERL -e 'use Net::DNS;' 2>/dev/null
 then
-    echo "I:running DNSSEC update test"
-    $PERL dnssec_update_test.pl -s 10.53.0.3 -p 5300 dynamic.example. || status=1
+    echo_i "running DNSSEC update test"
+    ret=0
+    {
+      $PERL dnssec_update_test.pl -s 10.53.0.3 -p ${PORT} dynamic.example.  || ret=1
+    } | cat_i
+    [ $ret -eq 1 ] && status=1
 else
-    echo "I:The DNSSEC update test requires the Net::DNS library." >&2
+    echo_i "The DNSSEC update test requires the Net::DNS library." >&2
 fi
 
-echo "I:checking managed key maintenance has not started yet ($n)"
+n=`expr $n + 1`
+echo_i "checking managed key maintenance has not started yet ($n)"
 ret=0
 [ -f "ns4/managed-keys.bind.jnl" ] && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 # Reconfigure caching server to use "dnssec-validation auto", and repeat
 # some of the DNSSEC validation tests to ensure that it works correctly.
-echo "I:switching to automatic root key configuration"
-cp ns4/named2.conf ns4/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.4 -p 9953 reconfig 2>&1 | sed 's/^/I:ns4 /'
+echo_i "switching to automatic root key configuration"
+copy_setports ns4/named2.conf.in ns4/named.conf
+$RNDCCMD 10.53.0.4 reconfig 2>&1 | sed 's/^/ns4 /' | cat_i
 sleep 5
 
-echo "I:checking managed key maintenance timer has now started ($n)"
+echo_i "checking managed key maintenance timer has now started ($n)"
 ret=0
 [ -f "ns4/managed-keys.bind.jnl" ] || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking positive validation NSEC ($n)"
+echo_i "checking positive validation NSEC ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.example. @10.53.0.2 a > dig.out.ns2.test$n || ret=1
 $DIG $DIGOPTS +noauth a.example. @10.53.0.4 a > dig.out.ns4.test$n || ret=1
 $PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns4.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking positive validation NSEC3 ($n)"
+echo_i "checking positive validation NSEC3 ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.nsec3.example. \
        @10.53.0.3 a > dig.out.ns3.test$n || ret=1
@@ -1676,10 +1682,10 @@ $DIG $DIGOPTS +noauth a.nsec3.example. \
 $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking positive validation OPTOUT ($n)"
+echo_i "checking positive validation OPTOUT ($n)"
 ret=0
 $DIG $DIGOPTS +noauth a.optout.example. \
        @10.53.0.3 a > dig.out.ns3.test$n || ret=1
@@ -1688,10 +1694,10 @@ $DIG $DIGOPTS +noauth a.optout.example. \
 $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking negative validation ($n)"
+echo_i "checking negative validation ($n)"
 ret=0
 $DIG $DIGOPTS +noauth q.example. @10.53.0.2 a > dig.out.ns2.test$n || ret=1
 $DIG $DIGOPTS +noauth q.example. @10.53.0.4 a > dig.out.ns4.test$n || ret=1
@@ -1699,10 +1705,10 @@ $PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns4.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 grep "status: NXDOMAIN" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that root DS queries validate ($n)"
+echo_i "checking that root DS queries validate ($n)"
 ret=0
 $DIG $DIGOPTS +noauth . @10.53.0.1 ds > dig.out.ns1.test$n || ret=1
 $DIG $DIGOPTS +noauth . @10.53.0.4 ds > dig.out.ns4.test$n || ret=1
@@ -1710,45 +1716,45 @@ $PERL ../digcomp.pl dig.out.ns1.test$n dig.out.ns4.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that DS at a RFC 1918 empty zone lookup succeeds ($n)"
+echo_i "checking that DS at a RFC 1918 empty zone lookup succeeds ($n)"
 ret=0
 $DIG $DIGOPTS +noauth 10.in-addr.arpa ds @10.53.0.2 >dig.out.ns2.test$n || ret=1
 $DIG $DIGOPTS +noauth 10.in-addr.arpa ds @10.53.0.6 >dig.out.ns6.test$n || ret=1
 $PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns6.test$n || ret=1
 grep "status: NOERROR" dig.out.ns6.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking expired signatures remain with "'"allow-update { none; };"'" and no keys available ($n)"
+echo_i "checking expired signatures remain with "'"allow-update { none; };"'" and no keys available ($n)"
 ret=0
 $DIG $DIGOPTS +noauth expired.example. +dnssec @10.53.0.3 soa > dig.out.ns3.test$n || ret=1
 grep "RRSIG.SOA" dig.out.ns3.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 
 status=`expr $status + $ret`
-echo "I:checking expired signatures do not validate ($n)"
+echo_i "checking expired signatures do not validate ($n)"
 ret=0
 $DIG $DIGOPTS +noauth expired.example. +dnssec @10.53.0.4 soa > dig.out.ns4.test$n || ret=1
 grep "SERVFAIL" dig.out.ns4.test$n > /dev/null || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1
 grep "expired.example .*: RRSIG has expired" ns4/named.run > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that the NSEC3 record for the apex is properly signed when a DNSKEY is added via UPDATE ($n)"
+echo_i "checking that the NSEC3 record for the apex is properly signed when a DNSKEY is added via UPDATE ($n)"
 ret=0
 (
 cd ns3
 kskname=`$KEYGEN -q -3 -r $RANDFILE -fk update-nsec3.example`
 (
 echo zone update-nsec3.example
-echo server 10.53.0.3 5300
+echo server 10.53.0.3 ${PORT}
 grep DNSKEY ${kskname}.key | sed -e 's/^/update add /' -e 's/IN/300 IN/'
 echo send
 ) | $NSUPDATE
@@ -1758,30 +1764,30 @@ grep "NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "flags:.* ad[ ;]" dig.out.ns4.test$n > /dev/null || ret=1
 grep "NSEC3 .* TYPE65534" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that the NSEC record is properly generated when DNSKEY are added via auto-dnssec ($n)"
+echo_i "checking that the NSEC record is properly generated when DNSKEY are added via auto-dnssec ($n)"
 ret=0
 $DIG $DIGOPTS +dnssec a auto-nsec.example. @10.53.0.4 > dig.out.ns4.test$n || ret=1
 grep "NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "flags:.* ad[ ;]" dig.out.ns4.test$n > /dev/null || ret=1
 grep "IN.NSEC[^3].* DNSKEY" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that the NSEC3 record is properly generated when DNSKEY are added via auto-dnssec ($n)"
+echo_i "checking that the NSEC3 record is properly generated when DNSKEY are added via auto-dnssec ($n)"
 ret=0
 $DIG $DIGOPTS +dnssec a auto-nsec3.example. @10.53.0.4 > dig.out.ns4.test$n || ret=1
 grep "NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "flags:.* ad[ ;]" dig.out.ns4.test$n > /dev/null || ret=1
 grep "IN.NSEC3 .* DNSKEY" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that signing records have been marked as complete ($n)"
+echo_i "checking that signing records have been marked as complete ($n)"
 ret=0
 checkprivate dynamic.example 10.53.0.3 || ret=1
 checkprivate update-nsec3.example 10.53.0.3 || ret=1
@@ -1789,173 +1795,173 @@ checkprivate auto-nsec3.example 10.53.0.3 || ret=1
 checkprivate expiring.example 10.53.0.3 || ret=1
 checkprivate auto-nsec.example 10.53.0.3 || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that 'rndc signing' without arguments is handled ($n)"
+echo_i "check that 'rndc signing' without arguments is handled ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing > /dev/null 2>&1 && ret=1
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 status > /dev/null || ret=1
+$RNDCCMD 10.53.0.3 signing > /dev/null 2>&1 && ret=1
+$RNDCCMD 10.53.0.3 status > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that 'rndc signing -list' without zone is handled ($n)"
+echo_i "check that 'rndc signing -list' without zone is handled ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing -list > /dev/null 2>&1 && ret=1
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 status > /dev/null || ret=1
+$RNDCCMD 10.53.0.3 signing -list > /dev/null 2>&1 && ret=1
+$RNDCCMD 10.53.0.3 status > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that 'rndc signing -clear' without additional arguments is handled ($n)"
+echo_i "check that 'rndc signing -clear' without additional arguments is handled ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing -clear > /dev/null 2>&1 && ret=1
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 status > /dev/null || ret=1
+$RNDCCMD 10.53.0.3 signing -clear > /dev/null 2>&1 && ret=1
+$RNDCCMD 10.53.0.3 status > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that 'rndc signing -clear all' without zone is handled ($n)"
+echo_i "check that 'rndc signing -clear all' without zone is handled ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing -clear all > /dev/null 2>&1 && ret=1
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 status > /dev/null || ret=1
+$RNDCCMD 10.53.0.3 signing -clear all > /dev/null 2>&1 && ret=1
+$RNDCCMD 10.53.0.3 status > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that 'rndc signing -nsec3param' without additional arguments is handled ($n)"
+echo_i "check that 'rndc signing -nsec3param' without additional arguments is handled ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing -nsec3param > /dev/null 2>&1 && ret=1
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 status > /dev/null || ret=1
+$RNDCCMD 10.53.0.3 signing -nsec3param > /dev/null 2>&1 && ret=1
+$RNDCCMD 10.53.0.3 status > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that 'rndc signing -nsec3param none' without zone is handled ($n)"
+echo_i "check that 'rndc signing -nsec3param none' without zone is handled ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing -nsec3param none > /dev/null 2>&1 && ret=1
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 status > /dev/null || ret=1
+$RNDCCMD 10.53.0.3 signing -nsec3param none > /dev/null 2>&1 && ret=1
+$RNDCCMD 10.53.0.3 status > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that 'rndc signing -nsec3param 1' without additional arguments is handled ($n)"
+echo_i "check that 'rndc signing -nsec3param 1' without additional arguments is handled ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing -nsec3param 1 > /dev/null 2>&1 && ret=1
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 status > /dev/null || ret=1
+$RNDCCMD 10.53.0.3 signing -nsec3param 1 > /dev/null 2>&1 && ret=1
+$RNDCCMD 10.53.0.3 status > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that 'rndc signing -nsec3param 1 0' without additional arguments is handled ($n)"
+echo_i "check that 'rndc signing -nsec3param 1 0' without additional arguments is handled ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing -nsec3param 1 0 > /dev/null 2>&1 && ret=1
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 status > /dev/null || ret=1
+$RNDCCMD 10.53.0.3 signing -nsec3param 1 0 > /dev/null 2>&1 && ret=1
+$RNDCCMD 10.53.0.3 status > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that 'rndc signing -nsec3param 1 0 0' without additional arguments is handled ($n)"
+echo_i "check that 'rndc signing -nsec3param 1 0 0' without additional arguments is handled ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing -nsec3param 1 0 0 > /dev/null 2>&1 && ret=1
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 status > /dev/null || ret=1
+$RNDCCMD 10.53.0.3 signing -nsec3param 1 0 0 > /dev/null 2>&1 && ret=1
+$RNDCCMD 10.53.0.3 status > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that 'rndc signing -nsec3param 1 0 0 -' without zone is handled ($n)"
+echo_i "check that 'rndc signing -nsec3param 1 0 0 -' without zone is handled ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing -nsec3param 1 0 0 - > /dev/null 2>&1 && ret=1
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 status > /dev/null || ret=1
+$RNDCCMD 10.53.0.3 signing -nsec3param 1 0 0 - > /dev/null 2>&1 && ret=1
+$RNDCCMD 10.53.0.3 status > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that 'rndc signing -nsec3param' works with salt ($n)"
+echo_i "check that 'rndc signing -nsec3param' works with salt ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing -nsec3param 1 0 0 ffff inline.example > /dev/null 2>&1 || ret=1
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 status > /dev/null || ret=1
+$RNDCCMD 10.53.0.3 signing -nsec3param 1 0 0 ffff inline.example > /dev/null 2>&1 || ret=1
+$RNDCCMD 10.53.0.3 status > /dev/null || ret=1
 for i in 1 2 3 4 5 6 7 8 9 10 ; do
         salt=`$DIG $DIGOPTS +nodnssec +short nsec3param inline.example. @10.53.0.3 | awk '{print $4}'`
        if [ "$salt" = "FFFF" ]; then
                break;
        fi
-       echo "I:sleeping ...."
+       echo_i "sleeping ...."
        sleep 1
 done;
 [ "$salt" = "FFFF" ] || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that 'rndc signing -nsec3param' works without salt ($n)"
+echo_i "check that 'rndc signing -nsec3param' works without salt ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing -nsec3param 1 0 0 - inline.example > /dev/null 2>&1 || ret=1
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 status > /dev/null || ret=1
+$RNDCCMD 10.53.0.3 signing -nsec3param 1 0 0 - inline.example > /dev/null 2>&1 || ret=1
+$RNDCCMD 10.53.0.3 status > /dev/null || ret=1
 for i in 1 2 3 4 5 6 7 8 9 10 ; do
         salt=`$DIG $DIGOPTS +nodnssec +short nsec3param inline.example. @10.53.0.3 | awk '{print $4}'`
        if [ "$salt" = "-" ]; then
                break;
        fi
-       echo "I:sleeping ...."
+       echo_i "sleeping ...."
        sleep 1
 done;
 [ "$salt" = "-" ] || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check rndc signing -list output ($n)"
+echo_i "check rndc signing -list output ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing -list dynamic.example 2>&1 > signing.out
+$RNDCCMD 10.53.0.3 signing -list dynamic.example 2>&1 > signing.out
 grep "No signing records found" signing.out > /dev/null 2>&1 || {
         ret=1
-        sed 's/^/I:ns3 /' signing.out
+        sed 's/^/ns3 /' signing.out | cat_i
 }
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing -list update-nsec3.example 2>&1 > signing.out
+$RNDCCMD 10.53.0.3 signing -list update-nsec3.example 2>&1 > signing.out
 grep "Done signing with key .*/NSEC3RSASHA1" signing.out > /dev/null 2>&1 || {
         ret=1
-        sed 's/^/I:ns3 /' signing.out
+        sed 's/^/ns3 /' signing.out | cat_i
 }
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:clear signing records ($n)"
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing -clear all update-nsec3.example > /dev/null || ret=1
+echo_i "clear signing records ($n)"
+$RNDCCMD 10.53.0.3 signing -clear all update-nsec3.example > /dev/null || ret=1
 sleep 1
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing -list update-nsec3.example 2>&1 > signing.out
+$RNDCCMD 10.53.0.3 signing -list update-nsec3.example 2>&1 > signing.out
 grep "No signing records found" signing.out > /dev/null 2>&1 || {
         ret=1
-        sed 's/^/I:ns3 /' signing.out
+        sed 's/^/ns3 /' signing.out | cat_i
 }
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that a insecure zone beneath a cname resolves ($n)"
+echo_i "checking that a insecure zone beneath a cname resolves ($n)"
 ret=0
 $DIG $DIGOPTS soa insecure.below-cname.example. @10.53.0.4 > dig.out.ns4.test$n || ret=1
 grep "NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that a secure zone beneath a cname resolves ($n)"
+echo_i "checking that a secure zone beneath a cname resolves ($n)"
 ret=0
 $DIG $DIGOPTS soa secure.below-cname.example. @10.53.0.4 > dig.out.ns4.test$n || ret=1
 grep "NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "ANSWER: 2," dig.out.ns4.test$n > /dev/null || ret=1
 grep "flags:.* ad[ ;]" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking dnskey query with no data still gets put in cache ($n)"
+echo_i "checking dnskey query with no data still gets put in cache ($n)"
 ret=0
-myDIGOPTS="+noadd +nosea +nostat +noquest +nocomm +nocmd -p 5300 @10.53.0.4"
+myDIGOPTS="+noadd +nosea +nostat +noquest +nocomm +nocmd -p ${PORT} @10.53.0.4"
 firstVal=`$DIG $myDIGOPTS insecure.example. dnskey| awk '$1 != ";;" { print $2 }'`
 sleep 1
 secondVal=`$DIG $myDIGOPTS insecure.example. dnskey| awk '$1 != ";;" { print $2 }'`
@@ -1965,39 +1971,39 @@ then
        thirdVal=`$DIG $myDIGOPTS insecure.example. dnskey|awk '$1 != ";;" { print $2 }'`
        if [ ${firstVal:-0} -eq ${thirdVal:-0} ]
        then
-               echo "I: cannot confirm query answer still in cache"
+               echo_i "cannot confirm query answer still in cache"
                ret=1
        fi
 fi
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that a split dnssec dnssec-signzone work ($n)"
+echo_i "check that a split dnssec dnssec-signzone work ($n)"
 ret=0
 $DIG $DIGOPTS soa split-dnssec.example. @10.53.0.4 > dig.out.ns4.test$n || ret=1
 grep "NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "ANSWER: 2," dig.out.ns4.test$n > /dev/null || ret=1
 grep "flags:.* ad[ ;]" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that a smart split dnssec dnssec-signzone work ($n)"
+echo_i "check that a smart split dnssec dnssec-signzone work ($n)"
 ret=0
 $DIG $DIGOPTS soa split-smart.example. @10.53.0.4 > dig.out.ns4.test$n || ret=1
 grep "NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "ANSWER: 2," dig.out.ns4.test$n > /dev/null || ret=1
 grep "flags:.* ad[ ;]" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that NOTIFY is sent at the end of NSEC3 chain generation ($n)"
+echo_i "check that NOTIFY is sent at the end of NSEC3 chain generation ($n)"
 ret=0
 (
 echo zone nsec3chain-test
-echo server 10.53.0.2 5300
+echo server 10.53.0.2 ${PORT}
 echo update add nsec3chain-test. 0 nsec3param 1 0 1 123456
 echo send
 ) | $NSUPDATE
@@ -2008,11 +2014,11 @@ do
        then
                break;
        fi
-       echo "I:sleeping ...."
+       echo_i "sleeping ...."
        sleep 3
 done;
 grep "ANSWER: 3," dig.out.ns2.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:nsec3 chain generation not complete"; fi
+if [ $ret != 0 ]; then echo_i "nsec3 chain generation not complete"; fi
 $DIG $DIGOPTS +noauth +nodnssec soa nsec3chain-test @10.53.0.2 > dig.out.ns2.test$n || ret=1
 s2=`awk '$4 == "SOA" { print $7}' dig.out.ns2.test$n`
 for i in 1 2 3 4 5 6 7 8 9 10
@@ -2024,10 +2030,10 @@ do
 done
 $PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns3.test$n || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check dnssec-dsfromkey from stdin ($n)"
+echo_i "check dnssec-dsfromkey from stdin ($n)"
 ret=0
 $DIG $DIGOPTS dnskey algroll. @10.53.0.2 | \
         $DSFROMKEY -f - algroll. > dig.out.ns2.test$n || ret=1
@@ -2046,95 +2052,95 @@ awk '{
 }' < ns1/dsset-algroll. > canonical2.$n || ret=1
 diff -b canonical1.$n canonical2.$n > /dev/null 2>&1 || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 # Intentionally strip ".key" from keyfile name to ensure the error message
 # includes it anyway to avoid confusion (RT #21731)
-echo "I:check dnssec-dsfromkey error message when keyfile is not found ($n)"
+echo_i "check dnssec-dsfromkey error message when keyfile is not found ($n)"
 ret=0
 key=`$KEYGEN -q -r $RANDFILE example.` || ret=1
 mv $key.key $key
 $DSFROMKEY $key > dsfromkey.out.$n 2>&1 && ret=1
 grep "$key.key: file not found" dsfromkey.out.$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:testing soon-to-expire RRSIGs without a replacement private key ($n)"
+echo_i "testing soon-to-expire RRSIGs without a replacement private key ($n)"
 ret=0
-$DIG +noall +answer +dnssec +nottl -p 5300 expiring.example ns @10.53.0.3 | grep RRSIG > dig.out.ns3.test$n 2>&1
+$DIG $ANSWEROPTS +nottlid expiring.example ns @10.53.0.3 | grep RRSIG > dig.out.ns3.test$n 2>&1
 # there must be a signature here
 [ -s dig.out.ns3.test$n ] || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:testing new records are signed with 'no-resign' ($n)"
+echo_i "testing new records are signed with 'no-resign' ($n)"
 ret=0
 (
 echo zone nosign.example
-echo server 10.53.0.3 5300
+echo server 10.53.0.3 ${PORT}
 echo update add new.nosign.example 300 in txt "hi there"
 echo send
 ) | $NSUPDATE
 sleep 1
-$DIG +noall +answer +dnssec -p 5300 txt new.nosign.example @10.53.0.3 \
+$DIG $ANSWEROPTS +nottlid txt new.nosign.example @10.53.0.3 \
         > dig.out.ns3.test$n 2>&1
 grep RRSIG dig.out.ns3.test$n > /dev/null 2>&1 || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:testing expiring records aren't resigned with 'no-resign' ($n)"
+echo_i "testing expiring records aren't resigned with 'no-resign' ($n)"
 ret=0
-$DIG +noall +answer +dnssec +nottl -p 5300 nosign.example ns @10.53.0.3 | \
+$DIG $ANSWEROPTS +nottl nosign.example ns @10.53.0.3 | \
         grep RRSIG | sed 's/[  ][      ]*/ /g' > dig.out.ns3.test$n 2>&1
 # the NS RRSIG should not be changed
 cmp -s nosign.before dig.out.ns3.test$n || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:testing updates fail with no private key ($n)"
+echo_i "testing updates fail with no private key ($n)"
 ret=0
 rm -f ns3/Knosign.example.*.private
 (
 echo zone nosign.example
-echo server 10.53.0.3 5300
+echo server 10.53.0.3 ${PORT}
 echo update add fail.nosign.example 300 in txt "reject me"
 echo send
 ) | $NSUPDATE > /dev/null 2>&1 && ret=1
-$DIG +noall +answer +dnssec -p 5300 fail.nosign.example txt @10.53.0.3 \
+$DIG $ANSWEROPTS +noall +answer +dnssec fail.nosign.example txt @10.53.0.3 \
         > dig.out.ns3.test$n 2>&1
 [ -s dig.out.ns3.test$n ] && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:testing legacy upper case signer name validation ($n)"
+echo_i "testing legacy upper case signer name validation ($n)"
 ret=0
-$DIG +tcp +dnssec -p 5300 +noadd +noauth soa upper.example @10.53.0.4 \
+$DIG +tcp +noadd +noauth +dnssec -p ${PORT} soa upper.example @10.53.0.4 \
         > dig.out.ns4.test$n 2>&1
 grep 'flags:.* ad;' dig.out.ns4.test$n > /dev/null || ret=1
 grep 'RRSIG.*SOA.* UPPER\.EXAMPLE\. ' dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:testing that we lower case signer name ($n)"
+echo_i "testing that we lower case signer name ($n)"
 ret=0
-$DIG +tcp +dnssec -p 5300 +noadd +noauth soa LOWER.EXAMPLE @10.53.0.4 \
+$DIG +tcp +noadd +noauth +dnssec -p ${PORT} soa LOWER.EXAMPLE @10.53.0.4 \
         > dig.out.ns4.test$n 2>&1
 grep 'flags:.* ad;' dig.out.ns4.test$n > /dev/null || ret=1
 grep 'RRSIG.*SOA.* lower\.example\. ' dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:testing TTL is capped at RRSIG expiry time ($n)"
+echo_i "testing TTL is capped at RRSIG expiry time ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 freeze expiring.example 2>&1 | sed 's/^/I:ns3 /'
+$RNDCCMD 10.53.0.3 freeze expiring.example 2>&1 | sed 's/^/ns3 /' | cat_i
 (
 cd ns3
 for file in K*.moved; do
@@ -2142,11 +2148,11 @@ for file in K*.moved; do
 done
 $SIGNER -S -r $RANDFILE -N increment -e now+1mi -o expiring.example expiring.example.db > /dev/null 2>&1
 ) || ret=1
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 reload expiring.example 2>&1 | sed 's/^/I:ns3 /'
+$RNDCCMD 10.53.0.3 reload expiring.example 2>&1 | sed 's/^/ns3 /' | cat_i
 
-$RNDC -c ../common/rndc.conf -s 10.53.0.4 -p 9953 flush
-$DIG +noall +answer +dnssec +cd -p 5300 expiring.example soa @10.53.0.4 > dig.out.ns4.1.$n
-$DIG +noall +answer +dnssec -p 5300 expiring.example soa @10.53.0.4 > dig.out.ns4.2.$n
+$RNDCCMD 10.53.0.4 flush 2>&1 | sed 's/^/ns4 /' | cat_i
+$DIG $ANSWEROPTS +cd expiring.example soa @10.53.0.4 > dig.out.ns4.1.$n
+$DIG $ANSWEROPTS expiring.example soa @10.53.0.4 > dig.out.ns4.2.$n
 ttls=`awk '$1 != ";;" {print $2}' dig.out.ns4.1.$n`
 ttls2=`awk '$1 != ";;" {print $2}' dig.out.ns4.2.$n`
 for ttl in ${ttls:-0}; do
@@ -2156,15 +2162,15 @@ for ttl in ${ttls2:-0}; do
     [ ${ttl:-0} -le 60 ] || ret=1
 done
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:testing TTL is capped at RRSIG expiry time for records in the additional section ($n)"
+echo_i "testing TTL is capped at RRSIG expiry time for records in the additional section ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.4 -p 9953 flush
+$RNDCCMD 10.53.0.4 flush 2>&1 | sed 's/^/ns4 /' | cat_i
 sleep 1
-$DIG +noall +additional +dnssec +cd -p 5300 expiring.example mx @10.53.0.4 > dig.out.ns4.1.$n
-$DIG +noall +additional +dnssec -p 5300 expiring.example mx @10.53.0.4 > dig.out.ns4.2.$n
+$DIG $ANSWEROPTS +cd expiring.example mx @10.53.0.4 > dig.out.ns4.1.$n
+$DIG $ANSWEROPTS expiring.example mx @10.53.0.4 > dig.out.ns4.2.$n
 ttls=`awk '$1 != ";;" {print $2}' dig.out.ns4.1.$n`
 ttls2=`awk '$1 != ";;" {print $2}' dig.out.ns4.2.$n`
 for ttl in ${ttls:-300}; do
@@ -2174,18 +2180,18 @@ for ttl in ${ttls2:-0}; do
     [ ${ttl:-0} -le 60 ] || ret=1
 done
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-cp ns4/named3.conf ns4/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.4 -p 9953 reconfig 2>&1 | sed 's/^/I:ns4 /'
+copy_setports ns4/named3.conf.in ns4/named.conf
+$RNDCCMD 10.53.0.4 reconfig 2>&1 | sed 's/^/ns4 /' | cat_i
 sleep 3
 
-echo "I:testing TTL of about to expire RRsets with dnssec-accept-expired yes; ($n)"
+echo_i "testing TTL of about to expire RRsets with dnssec-accept-expired yes; ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.4 -p 9953 flush
-$DIG +noall +answer +dnssec +cd -p 5300 expiring.example soa @10.53.0.4 > dig.out.ns4.1.$n
-$DIG +noall +answer +dnssec -p 5300 expiring.example soa @10.53.0.4 > dig.out.ns4.2.$n
+$RNDCCMD 10.53.0.4 flush 2>&1 | sed 's/^/ns4 /' | cat_i
+$DIG $ANSWEROPTS +cd expiring.example soa @10.53.0.4 > dig.out.ns4.1.$n
+$DIG $ANSWEROPTS expiring.example soa @10.53.0.4 > dig.out.ns4.2.$n
 ttls=`awk '$1 != ";;" {print $2}' dig.out.ns4.1.$n`
 ttls2=`awk '$1 != ";;" {print $2}' dig.out.ns4.2.$n`
 for ttl in ${ttls:-0}; do
@@ -2195,13 +2201,13 @@ for ttl in ${ttls2:-0}; do
     [ $ttl -le 120 -a $ttl -gt 60 ] || ret=1
 done
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:testing TTL of expired RRsets with dnssec-accept-expired yes; ($n)"
+echo_i "testing TTL of expired RRsets with dnssec-accept-expired yes; ($n)"
 ret=0
-$DIG +noall +answer +dnssec +cd -p 5300 expired.example soa @10.53.0.4 > dig.out.ns4.1.$n
-$DIG +noall +answer +dnssec -p 5300 expired.example soa @10.53.0.4 > dig.out.ns4.2.$n
+$DIG $ANSWEROPTS +cd expired.example soa @10.53.0.4 > dig.out.ns4.1.$n
+$DIG $ANSWEROPTS expired.example soa @10.53.0.4 > dig.out.ns4.2.$n
 ttls=`awk '$1 != ";;" {print $2}' dig.out.ns4.1.$n`
 ttls2=`awk '$1 != ";;" {print $2}' dig.out.ns4.2.$n`
 for ttl in ${ttls:-0}; do
@@ -2211,18 +2217,18 @@ for ttl in ${ttls2:-0}; do
     [ $ttl -le 120 -a $ttl -gt 60 ] || ret=1
 done
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-cp ns4/named4.conf ns4/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.4 -p 9953 reconfig 2>&1 | sed 's/^/I:ns4 /'
+copy_setports ns4/named4.conf.in ns4/named.conf
+$RNDCCMD 10.53.0.4 reconfig 2>&1 | sed 's/^/I:ns4 /'
 sleep 3
 
-echo "I:testing TTL is capped at RRSIG expiry time for records in the additional section with dnssec-accept-expired yes; ($n)"
+echo_i "testing TTL is capped at RRSIG expiry time for records in the additional section with dnssec-accept-expired yes; ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.4 -p 9953 flush
-$DIG +noall +additional +dnssec +cd -p 5300 expiring.example mx @10.53.0.4 > dig.out.ns4.1.$n
-$DIG +noall +additional +dnssec -p 5300 expiring.example mx @10.53.0.4 > dig.out.ns4.2.$n
+$RNDCCMD 10.53.0.4 flush 2>&1 | sed 's/^/ns4 /' | cat_i
+$DIG $ANSWEROPTS +cd expiring.example mx @10.53.0.4 > dig.out.ns4.1.$n
+$DIG $ANSWEROPTS expiring.example mx @10.53.0.4 > dig.out.ns4.2.$n
 ttls=`awk '$1 != ";;" {print $2}' dig.out.ns4.1.$n`
 ttls2=`awk '$1 != ";;" {print $2}' dig.out.ns4.2.$n`
 for ttl in ${ttls:-300}; do
@@ -2232,18 +2238,14 @@ for ttl in ${ttls2:-0}; do
     [ $ttl -le 120  -a $ttl -gt 60 ] || ret=1
 done
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-cp ns4/named4.conf ns4/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.4 -p 9953 reconfig 2>&1 | sed 's/^/I:ns4 /'
-sleep 3
-
-echo "I:testing TTL is capped at RRSIG expiry time for records in the additional section with acache off; ($n)"
+echo_i "testing TTL is capped at RRSIG expiry time for records in the additional section with acache off; ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.4 -p 9953 flush
-$DIG +noall +additional +dnssec +cd -p 5300 expiring.example mx @10.53.0.4 > dig.out.ns4.1.$n
-$DIG +noall +additional +dnssec -p 5300 expiring.example mx @10.53.0.4 > dig.out.ns4.2.$n
+$RNDCCMD 10.53.0.4 flush
+$DIG $DIGOPTS +noall +additional +dnssec +cd expiring.example mx @10.53.0.4 > dig.out.ns4.1.$n
+$DIG $DIGOPTS +noall +additional +dnssec expiring.example mx @10.53.0.4 > dig.out.ns4.2.$n
 ttls=`awk '$1 != ";;" {print $2}' dig.out.ns4.1.$n`
 ttls2=`awk '$1 != ";;" {print $2}' dig.out.ns4.2.$n`
 for ttl in ${ttls:-300}; do
@@ -2253,10 +2255,10 @@ for ttl in ${ttls2:-0}; do
     [ $ttl -le 120  -a $ttl -gt 60 ] || ret=1
 done
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:testing DNSKEY lookup via CNAME ($n)"
+echo_i "testing DNSKEY lookup via CNAME ($n)"
 ret=0
 $DIG $DIGOPTS +noauth cnameandkey.secure.example. \
        @10.53.0.3 dnskey > dig.out.ns3.test$n || ret=1
@@ -2266,10 +2268,10 @@ $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 grep "CNAME" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:testing KEY lookup at CNAME (present) ($n)"
+echo_i "testing KEY lookup at CNAME (present) ($n)"
 ret=0
 $DIG $DIGOPTS +noauth cnameandkey.secure.example. \
        @10.53.0.3 key > dig.out.ns3.test$n || ret=1
@@ -2279,10 +2281,10 @@ $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 grep "CNAME" dig.out.ns4.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:testing KEY lookup at CNAME (not present) ($n)"
+echo_i "testing KEY lookup at CNAME (not present) ($n)"
 ret=0
 $DIG $DIGOPTS +noauth cnamenokey.secure.example. \
        @10.53.0.3 key > dig.out.ns3.test$n || ret=1
@@ -2292,10 +2294,10 @@ $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 grep "CNAME" dig.out.ns4.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:testing DNSKEY lookup via DNAME ($n)"
+echo_i "testing DNSKEY lookup via DNAME ($n)"
 ret=0
 $DIG $DIGOPTS a.dnameandkey.secure.example. \
        @10.53.0.3 dnskey > dig.out.ns3.test$n || ret=1
@@ -2306,10 +2308,10 @@ grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 grep "CNAME" dig.out.ns4.test$n > /dev/null || ret=1
 grep "DNAME" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:testing KEY lookup via DNAME ($n)"
+echo_i "testing KEY lookup via DNAME ($n)"
 ret=0
 $DIG $DIGOPTS b.dnameandkey.secure.example. \
        @10.53.0.3 key > dig.out.ns3.test$n || ret=1
@@ -2319,18 +2321,18 @@ $PERL ../digcomp.pl dig.out.ns3.test$n dig.out.ns4.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 grep "DNAME" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that named doesn't loop when all private keys are not available ($n)"
+echo_i "check that named doesn't loop when all private keys are not available ($n)"
 ret=0
 lines=`grep "reading private key file expiring.example" ns3/named.run | wc -l`
 test ${lines:-1000} -lt 15 || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check against against missing nearest provable proof ($n)"
+echo_i "check against against missing nearest provable proof ($n)"
 $DIG $DIGOPTS +norec b.c.d.optout-tld. \
        @10.53.0.6 ds > dig.out.ds.ns6.test$n || ret=1
 nsec3=`grep "IN.NSEC3" dig.out.ds.ns6.test$n | wc -l`
@@ -2347,22 +2349,22 @@ $DIG $DIGOPTS b.c.d.optout-tld. \
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check KEYDATA records are printed in human readable form in key zone ($n)"
+echo_i "check KEYDATA records are printed in human readable form in key zone ($n)"
 # force the managed-keys zone to be written out
-$PERL $SYSTEMTESTTOP/stop.pl --use-rndc . ns4
+$PERL $SYSTEMTESTTOP/stop.pl --use-rndc . --port ${CONTROLPORT} ns4
 ret=0
 grep KEYDATA ns4/managed-keys.bind > /dev/null || ret=1
 grep "next refresh:" ns4/managed-keys.bind > /dev/null || ret=1
 # restart the server
-$PERL $SYSTEMTESTTOP/start.pl --noclean --restart . ns4
+$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . ns4
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check simultaneous inactivation and publishing of dnskeys removes inactive signature ($n)"
+echo_i "check simultaneous inactivation and publishing of dnskeys removes inactive signature ($n)"
 ret=0
 cnt=0
 while :
@@ -2379,29 +2381,29 @@ sigs=`grep RRSIG dig.out.ns3.test$n | wc -l`
 sigs=`expr $sigs + 0`
 n=`expr $n + 1`
 test $sigs -eq 2 || ret=1
-if test $ret != 0 ; then echo "I:failed"; fi
+if test $ret != 0 ; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that increasing the sig-validity-interval resigning triggers re-signing"
+echo_i "check that increasing the sig-validity-interval resigning triggers re-signing"
 ret=0
-before=`$DIG axfr siginterval.example -p 5300 @10.53.0.3 | grep RRSIG.SOA`
+before=`$DIG axfr siginterval.example -p ${PORT} @10.53.0.3 | grep RRSIG.SOA`
 cp ns3/siginterval2.conf ns3/siginterval.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 reconfig 2>&1 | sed 's/^/I:ns3 /'
+$RNDCCMD 10.53.0.3 reconfig 2>&1 | sed 's/^/ns3 /' | cat_i
 for i in 1 2 3 4 5 6 7 8 9 0
 do
-after=`$DIG axfr siginterval.example -p 5300 @10.53.0.3 | grep RRSIG.SOA`
+after=`$DIG axfr siginterval.example -p ${PORT} @10.53.0.3 | grep RRSIG.SOA`
 test "$before" != "$after" && break
 sleep 1
 done
 n=`expr $n + 1`
-if test "$before" = "$after" ; then echo "I:failed"; ret=1; fi
+if test "$before" = "$after" ; then echo_i "failed"; ret=1; fi
 status=`expr $status + $ret`
 
-cp ns4/named5.conf ns4/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.4 -p 9953 reconfig 2>&1 | sed 's/^/I:ns4 /'
+copy_setports ns4/named4.conf.in ns4/named.conf
+$RNDCCMD 10.53.0.4 reconfig 2>&1 | sed 's/^/I:ns4 /'
 sleep 3
 
-echo "I:check insecure delegation between static-stub zones ($n)"
+echo_i "check insecure delegation between static-stub zones ($n)"
 ret=0
 $DIG $DIGOPTS ns insecure.secure.example \
        @10.53.0.4 > dig.out.ns4.1.test$n || ret=1
@@ -2410,18 +2412,18 @@ $DIG $DIGOPTS ns secure.example \
        @10.53.0.4 > dig.out.ns4.2.test$n || ret=1
 grep "SERVFAIL" dig.out.ns4.2.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that split rrsigs are handled ($n)"
+echo_i "check that split rrsigs are handled ($n)"
 ret=0
 $DIG $DIGOPTS split-rrsig soa @10.53.0.7 > dig.out.test$n || ret=1
-awk 'BEGIN { ok=0; } $4 == "SOA" { if ($7 > 1) ok=1; } END { if (!ok) exit(1); }' dig.out.test$n || ret=1 
+awk 'BEGIN { ok=0; } $4 == "SOA" { if ($7 > 1) ok=1; } END { if (!ok) exit(1); }' dig.out.test$n || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that 'dnssec-keygen -S' works for all supported algorithms ($n)"
+echo_i "check that 'dnssec-keygen -S' works for all supported algorithms ($n)"
 ret=0
 alg=1
 until test $alg = 256
@@ -2450,7 +2452,7 @@ do
        fi
        if test -z "$key1"
        then
-               echo "I: '$KEYGEN -a $alg': failed"
+               echo_i "'$KEYGEN -a $alg': failed"
                cat keygen.err
                ret=1
                alg=`expr $alg + 1`
@@ -2460,72 +2462,72 @@ do
        key2=`$KEYGEN -v 10 -r $RANDFILE -i 3d -S $key1.private 2> /dev/null`
        test -f $key2.key -a -f $key2.private || {
                ret=1
-               echo "I: 'dnssec-keygen -S' failed for algorithm: $alg"
+               echo_i "'dnssec-keygen -S' failed for algorithm: $alg"
        }
        alg=`expr $alg + 1`
 done
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that CDS records are signed using KSK by dnssec-signzone ($n)"
+echo_i "check that CDS records are signed using KSK by dnssec-signzone ($n)"
 ret=0
 $DIG $DIGOPTS +noall +answer @10.53.0.2 cds cds.secure > dig.out.test$n
 lines=`awk '$4 == "RRSIG" && $5 == "CDS" {print}' dig.out.test$n | wc -l`
 test ${lines:-0} -eq 2 || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 #
 # Test for +sigchase with a null set of trusted keys.
 #
-$DIG -p 5300 @10.53.0.3 +sigchase +trusted-key=/dev/null > dig.out.ns3.test$n 2>&1
+$DIG $DIGOPTS @10.53.0.3 +sigchase +trusted-key=/dev/null > dig.out.ns3.test$n 2>&1
 if grep "Invalid option: +sigchase" dig.out.ns3.test$n > /dev/null
 then
-       echo "I:Skipping 'dig +sigchase' tests"
+       echo_i "Skipping 'dig +sigchase' tests"
        n=`expr $n + 1`
 else
-       echo "I:checking that 'dig +sigchase' doesn't loop with future inception ($n)"
+       echo_i "checking that 'dig +sigchase' doesn't loop with future inception ($n)"
        ret=0
-       $DIG -p 5300 @10.53.0.3 dnskey future.example +sigchase \
+       $DIG $DIGOPTS @10.53.0.3 dnskey future.example +sigchase \
                 +trusted-key=ns3/trusted-future.key > dig.out.ns3.test$n &
        pid=$!
        sleep 1
        kill -9 $pid 2> /dev/null
        wait $pid
        grep ";; No DNSKEY is valid to check the RRSIG of the RRset: FAILED" dig.out.ns3.test$n > /dev/null || ret=1
-       if [ $ret != 0 ]; then echo "I:failed"; fi
+       if [ $ret != 0 ]; then echo_i "failed"; fi
        status=`expr $status + $ret`
        n=`expr $n + 1`
 fi
 
-echo "I:checking that positive unknown NSEC3 hash algorithm does validate ($n)"
+echo_i "checking that positive unknown NSEC3 hash algorithm does validate ($n)"
 ret=0
-$DIG $DIGOPTS +noauth +noadd +nodnssec +adflag -p 5300 @10.53.0.3 nsec3-unknown.example SOA > dig.out.ns3.test$n
-$DIG $DIGOPTS +noauth +noadd +nodnssec +adflag -p 5300 @10.53.0.4 nsec3-unknown.example SOA > dig.out.ns4.test$n
+$DIG $DIGOPTS +noauth +noadd +nodnssec +adflag @10.53.0.3 nsec3-unknown.example SOA > dig.out.ns3.test$n
+$DIG $DIGOPTS +noauth +noadd +nodnssec +adflag @10.53.0.4 nsec3-unknown.example SOA > dig.out.ns4.test$n
 grep "status: NOERROR," dig.out.ns3.test$n > /dev/null || ret=1
 grep "status: NOERROR," dig.out.ns4.test$n > /dev/null || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that CDS records are signed using KSK by with dnssec-auto ($n)"
+echo_i "check that CDS records are signed using KSK by with dnssec-auto ($n)"
 ret=0
 $DIG $DIGOPTS +noall +answer @10.53.0.2 cds cds-auto.secure > dig.out.test$n
 lines=`awk '$4 == "RRSIG" && $5 == "CDS" {print}' dig.out.test$n | wc -l`
 test ${lines:-0} -eq 2 || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that a lone non matching CDS record is rejected ($n)"
+echo_i "check that a lone non matching CDS record is rejected ($n)"
 ret=0
 (
 echo zone cds-update.secure
-echo server 10.53.0.2 5300
+echo server 10.53.0.2 ${PORT}
 echo update delete cds-update.secure CDS
 $DIG $DIGOPTS +noall +answer @10.53.0.2 dnskey cds-update.secure |
 grep "DNSKEY.257" | sed 's/DNSKEY.257/DNSKEY 258/' |
@@ -2538,14 +2540,14 @@ $DIG $DIGOPTS +noall +answer @10.53.0.2 cds cds-update.secure > dig.out.test$n
 lines=`awk '$4 == "CDS" {print}' dig.out.test$n | wc -l`
 test ${lines:-10} -eq 0 || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that CDS records are signed using KSK when added by nsupdate ($n)"
+echo_i "check that CDS records are signed using KSK when added by nsupdate ($n)"
 ret=0
 (
 echo zone cds-update.secure
-echo server 10.53.0.2 5300
+echo server 10.53.0.2 ${PORT}
 echo update delete cds-update.secure CDS
 echo send
 $DIG $DIGOPTS +noall +answer @10.53.0.2 dnskey cds-update.secure |
@@ -2560,26 +2562,26 @@ test ${lines:-0} -eq 2 || ret=1
 lines=`awk '$4 == "CDS" {print}' dig.out.test$n | wc -l`
 test ${lines:-0} -eq 2 || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that positive unknown NSEC3 hash algorithm with OPTOUT does validate ($n)"
+echo_i "checking that positive unknown NSEC3 hash algorithm with OPTOUT does validate ($n)"
 ret=0
-$DIG $DIGOPTS +noauth +noadd +nodnssec +adflag -p 5300 @10.53.0.3 optout-unknown.example SOA > dig.out.ns3.test$n
-$DIG $DIGOPTS +noauth +noadd +nodnssec +adflag -p 5300 @10.53.0.4 optout-unknown.example SOA > dig.out.ns4.test$n
+$DIG $DIGOPTS +noauth +noadd +nodnssec +adflag @10.53.0.3 optout-unknown.example SOA > dig.out.ns3.test$n
+$DIG $DIGOPTS +noauth +noadd +nodnssec +adflag @10.53.0.4 optout-unknown.example SOA > dig.out.ns4.test$n
 grep "status: NOERROR," dig.out.ns3.test$n > /dev/null || ret=1
 grep "status: NOERROR," dig.out.ns4.test$n > /dev/null || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that a non matching CDS record is accepted with a matching CDS record ($n)"
+echo_i "check that a non matching CDS record is accepted with a matching CDS record ($n)"
 ret=0
 (
 echo zone cds-update.secure
-echo server 10.53.0.2 5300
+echo server 10.53.0.2 ${PORT}
 echo update delete cds-update.secure CDS
 echo send
 $DIG $DIGOPTS +noall +answer @10.53.0.2 dnskey cds-update.secure |
@@ -2598,63 +2600,63 @@ test ${lines:-0} -eq 2 || ret=1
 lines=`awk '$4 == "CDS" {print}' dig.out.test$n | wc -l`
 test ${lines:-0} -eq 4 || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that negative unknown NSEC3 hash algorithm does not validate ($n)"
+echo_i "checking that negative unknown NSEC3 hash algorithm does not validate ($n)"
 ret=0
-$DIG $DIGOPTS +noauth +noadd +nodnssec +adflag -p 5300 @10.53.0.3 nsec3-unknown.example A > dig.out.ns3.test$n
-$DIG $DIGOPTS +noauth +noadd +nodnssec +adflag -p 5300 @10.53.0.4 nsec3-unknown.example A > dig.out.ns4.test$n
+$DIG $DIGOPTS +noauth +noadd +nodnssec +adflag @10.53.0.3 nsec3-unknown.example A > dig.out.ns3.test$n
+$DIG $DIGOPTS +noauth +noadd +nodnssec +adflag @10.53.0.4 nsec3-unknown.example A > dig.out.ns4.test$n
 grep "status: NOERROR," dig.out.ns3.test$n > /dev/null || ret=1
 grep "status: SERVFAIL," dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that CDNSKEY records are signed using KSK by dnssec-signzone ($n)"
+echo_i "check that CDNSKEY records are signed using KSK by dnssec-signzone ($n)"
 ret=0
 $DIG $DIGOPTS +noall +answer @10.53.0.2 cdnskey cdnskey.secure > dig.out.test$n
 lines=`awk '$4 == "RRSIG" && $5 == "CDNSKEY" {print}' dig.out.test$n | wc -l`
 test ${lines:-0} -eq 2 || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that negative unknown NSEC3 hash algorithm with OPTOUT does not validate ($n)"
+echo_i "checking that negative unknown NSEC3 hash algorithm with OPTOUT does not validate ($n)"
 ret=0
-$DIG $DIGOPTS +noauth +noadd +nodnssec +adflag -p 5300 @10.53.0.3 optout-unknown.example A > dig.out.ns3.test$n
-$DIG $DIGOPTS +noauth +noadd +nodnssec +adflag -p 5300 @10.53.0.4 optout-unknown.example A > dig.out.ns4.test$n
+$DIG $DIGOPTS +noauth +noadd +nodnssec +adflag @10.53.0.3 optout-unknown.example A > dig.out.ns3.test$n
+$DIG $DIGOPTS +noauth +noadd +nodnssec +adflag @10.53.0.4 optout-unknown.example A > dig.out.ns4.test$n
 grep "status: NOERROR," dig.out.ns3.test$n > /dev/null || ret=1
 grep "status: SERVFAIL," dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that CDNSKEY records are signed using KSK by with dnssec-auto ($n)"
+echo_i "check that CDNSKEY records are signed using KSK by with dnssec-auto ($n)"
 ret=0
 $DIG $DIGOPTS +noall +answer @10.53.0.2 cdnskey cdnskey-auto.secure > dig.out.test$n
 lines=`awk '$4 == "RRSIG" && $5 == "CDNSKEY" {print}' dig.out.test$n | wc -l`
 test ${lines:-0} -eq 2 || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that unknown DNSKEY algorithm validates as insecure ($n)"
+echo_i "checking that unknown DNSKEY algorithm validates as insecure ($n)"
 ret=0
-$DIG $DIGOPTS +noauth +noadd +nodnssec +adflag -p 5300 @10.53.0.3 dnskey-unknown.example A > dig.out.ns3.test$n
-$DIG $DIGOPTS +noauth +noadd +nodnssec +adflag -p 5300 @10.53.0.4 dnskey-unknown.example A > dig.out.ns4.test$n
+$DIG $DIGOPTS +noauth +noadd +nodnssec +adflag @10.53.0.3 dnskey-unknown.example A > dig.out.ns3.test$n
+$DIG $DIGOPTS +noauth +noadd +nodnssec +adflag @10.53.0.4 dnskey-unknown.example A > dig.out.ns4.test$n
 grep "status: NOERROR," dig.out.ns3.test$n > /dev/null || ret=1
 grep "status: NOERROR," dig.out.ns4.test$n > /dev/null || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that a lone non matching CDNSKEY record is rejected ($n)"
+echo_i "check that a lone non matching CDNSKEY record is rejected ($n)"
 ret=0
 (
 echo zone cdnskey-update.secure
-echo server 10.53.0.2 5300
+echo server 10.53.0.2 ${PORT}
 echo update delete cdnskey-update.secure CDNSKEY
 echo send
 $DIG $DIGOPTS +noall +answer @10.53.0.2 dnskey cdnskey-update.secure |
@@ -2666,25 +2668,25 @@ $DIG $DIGOPTS +noall +answer @10.53.0.2 cdnskey cdnskey-update.secure > dig.out.
 lines=`awk '$4 == "CDNSKEY" {print}' dig.out.test$n | wc -l`
 test ${lines:-10} -eq 0 || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that unknown DNSKEY algorithm + unknown NSEC3 has algorithm validates as insecure ($n)"
+echo_i "checking that unknown DNSKEY algorithm + unknown NSEC3 has algorithm validates as insecure ($n)"
 ret=0
-$DIG $DIGOPTS +noauth +noadd +nodnssec +adflag -p 5300 @10.53.0.3 dnskey-nsec3-unknown.example A > dig.out.ns3.test$n
-$DIG $DIGOPTS +noauth +noadd +nodnssec +adflag -p 5300 @10.53.0.4 dnskey-nsec3-unknown.example A > dig.out.ns4.test$n
+$DIG $DIGOPTS +noauth +noadd +nodnssec +adflag @10.53.0.3 dnskey-nsec3-unknown.example A > dig.out.ns3.test$n
+$DIG $DIGOPTS +noauth +noadd +nodnssec +adflag @10.53.0.4 dnskey-nsec3-unknown.example A > dig.out.ns4.test$n
 grep "status: NOERROR," dig.out.ns3.test$n > /dev/null || ret=1
 grep "status: NOERROR," dig.out.ns4.test$n > /dev/null || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that CDNSKEY records are signed using KSK when added by nsupdate ($n)"
+echo_i "check that CDNSKEY records are signed using KSK when added by nsupdate ($n)"
 ret=0
 (
 echo zone cdnskey-update.secure
-echo server 10.53.0.2 5300
+echo server 10.53.0.2 ${PORT}
 echo update delete cdnskey-update.secure CDNSKEY
 $DIG $DIGOPTS +noall +answer @10.53.0.2 dnskey cdnskey-update.secure |
 sed -n -e "s/^/update add /" -e 's/DNSKEY.257/CDNSKEY 257/p'
@@ -2696,25 +2698,25 @@ test ${lines:-0} -eq 2 || ret=1
 lines=`awk '$4 == "CDNSKEY" {print}' dig.out.test$n | wc -l`
 test ${lines:-0} -eq 1 || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking initialization with a revoked managed key ($n)"
+echo_i "checking initialization with a revoked managed key ($n)"
 ret=0
-cp ns5/named2.conf ns5/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.5 -p 9953 reconfig 2>&1 | sed 's/^/I:ns5 /'
+copy_setports ns5/named2.conf.in ns5/named.conf
+$RNDCCMD 10.53.0.5 reconfig 2>&1 | sed 's/^/ns5 /' | cat_i
 sleep 3
-$DIG $DIGOPTS +dnssec -p 5300 @10.53.0.5 SOA . > dig.out.ns5.test$n
+$DIG $DIGOPTS +dnssec @10.53.0.5 SOA . > dig.out.ns5.test$n
 grep "status: SERVFAIL" dig.out.ns5.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that a non matching CDNSKEY record is accepted with a matching CDNSKEY record ($n)"
+echo_i "check that a non matching CDNSKEY record is accepted with a matching CDNSKEY record ($n)"
 ret=0
 (
 echo zone cdnskey-update.secure
-echo server 10.53.0.2 5300
+echo server 10.53.0.2 ${PORT}
 echo update delete cdnskey-update.secure CDNSKEY
 $DIG $DIGOPTS +noall +answer @10.53.0.2 dnskey cdnskey-update.secure |
 sed -n -e "s/^/update add /" -e 's/DNSKEY.257/CDNSKEY 257/p'
@@ -2728,10 +2730,10 @@ test ${lines:-0} -eq 2 || ret=1
 lines=`awk '$4 == "CDNSKEY" {print}' dig.out.test$n | wc -l`
 test ${lines:-0} -eq 2 || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that RRSIGs are correctly removed from apex when RRset is removed  NSEC ($n)"
+echo_i "check that RRSIGs are correctly removed from apex when RRset is removed  NSEC ($n)"
 ret=0
 # generate signed zone with MX and AAAA records at apex.
 (
@@ -2753,10 +2755,10 @@ grep "RRSIG MX" signer/remove.db.signed > /dev/null &&  {
        ret=1 ; cp signer/remove.db.signed signer/remove.db.signed.post$n;
 }
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that RRSIGs are correctly removed from apex when RRset is removed  NSEC3 ($n)"
+echo_i "check that RRSIGs are correctly removed from apex when RRset is removed  NSEC3 ($n)"
 ret=0
 # generate signed zone with MX and AAAA records at apex.
 (
@@ -2776,17 +2778,17 @@ grep "RRSIG MX" signer/remove.db.signed > /dev/null &&  {
        ret=1 ; cp signer/remove.db.signed signer/remove.db.signed.post$n;
 }
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that a named managed zone that was signed 'in-the-future' is re-signed when loaded ($n)"
+echo_i "check that a named managed zone that was signed 'in-the-future' is re-signed when loaded ($n)"
 ret=0
 $DIG $DIGOPTS managed-future.example. @10.53.0.4 a > dig.out.ns4.test$n || ret=1
 grep "flags:.*ad.*QUERY" dig.out.ns4.test$n > /dev/null || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
diff --git a/bin/tests/system/dsdigest/prereq.sh b/bin/tests/system/dsdigest/prereq.sh
deleted file mode 100644 (file)
index e6d9763..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh -e
-#
-# Copyright (C) 2014  Internet Systems Consortium, Inc. ("ISC")
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
-# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-# AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
-# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-# PERFORMANCE OF THIS SOFTWARE.
-
-SYSTEMTESTTOP=..
-. $SYSTEMTESTTOP/conf.sh
-
-gostfail=0 ecdsafail=0
-$SHELL ../testcrypto.sh -q gost || gostfail=1
-$SHELL ../testcrypto.sh -q ecdsa || ecdsafail=1
-
-if [ $gostfail = 0 -a $ecdsafail = 0 ]; then
-       echo both > supported
-elif [ $gostfail = 1 -a $ecdsafail = 1 ]; then
-       echo "I:This test requires support for ECDSA or GOST cryptography." >&2
-       exit 255
-elif [ $gostfail = 0 ]; then
-       echo gost > supported
-else
-        echo ecdsa > supported
-fi
similarity index 91%
rename from bin/tests/system/emptyzones/ns1/named1.conf
rename to bin/tests/system/emptyzones/ns1/named1.conf.in
index 1782071a3272b467de2f3c0bc8f4a68407c09752..3b44ed8193ee3ac2d0e6663216bba5095a4caaa2 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.15 2009/05/29 23:47:49 tbox Exp $ */
-
 key rndc_key {
        algorithm       hmac-sha256;
        secret          "1234abcd8765";
 };
 
 controls {
-       inet 10.53.0.1 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.1 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 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 91%
rename from bin/tests/system/emptyzones/ns1/named2.conf
rename to bin/tests/system/emptyzones/ns1/named2.conf.in
index 56673afbf4359e40be254da84f119087fb7e80ea..243f6bd711b206f8148a8d5e251c6a74fc51108e 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.15 2009/05/29 23:47:49 tbox Exp $ */
-
 key rndc_key {
        algorithm       hmac-sha256;
        secret          "1234abcd8765";
 };
 
 controls {
-       inet 10.53.0.1 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.1 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 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; };
index 8da13e75c0bc5fdeca4737fd6cce9b676f134a0f..e3b10f128e2ad4c12fcee7a6a88e038f144cb994 100644 (file)
@@ -12,4 +12,8 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-cp -f ns1/named1.conf ns1/named.conf
+SYSTEMTESTTOP=..
+. $SYSTEMTESTTOP/conf.sh
+
+$SHELL clean.sh
+copy_setports ns1/named1.conf.in ns1/named.conf
index 6be5d8a8157f9bba3cb999a2fad1a23622e89bdc..7d846ba16d5ce06aebaf094431c22b49c9c974ee 100644 (file)
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
+DIGOPTS="-p ${PORT}"
+RNDCCMD="$RNDC -c $SYSTEMTESTTOP/common/rndc.conf -p ${CONTROLPORT} -s"
+
 status=0
 n=0
 
 n=`expr $n + 1`
-echo "I:check that switching to automatic empty zones works ($n)"
+echo_i "check that switching to automatic empty zones works ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.1 -p 9953 reload > /dev/null || ret=1
+$RNDCCMD 10.53.0.1 reload > /dev/null || ret=1
 sleep 5
-cp ns1/named2.conf ns1/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.1 -p 9953 reload > /dev/null || ret=1
+
+copy_setports ns1/named2.conf.in ns1/named.conf
+$RNDCCMD 10.53.0.1 reload > /dev/null || ret=1
 sleep 5
-$DIG +vc version.bind txt ch @10.53.0.1 -p 5300 > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+
+$DIG $DIGOPTS +vc version.bind txt ch @10.53.0.1 > /dev/null || ret=1
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:check that allow-transfer { none; } works ($n)"
+echo_i "check that allow-transfer { none; } works ($n)"
 ret=0
-$DIG axfr 10.in-addr.arpa @10.53.0.1 -p 5300 +all > dig.out.test$n || ret=1
+$DIG $DIGOPTS axfr 10.in-addr.arpa @10.53.0.1 +all > dig.out.test$n || ret=1
 grep "status: REFUSED" dig.out.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index 7e6e0c59e8640aaf29b52b563aa43bcaab2f5fcc..ab9b40ff3bbc52fa9bf34839e107c2d64f134188 100644 (file)
@@ -24,8 +24,11 @@ use IO::Socket;
 use Net::DNS;
 use Net::DNS::Packet;
 
+my $localport = int($ENV{'PORT'});
+if (!$localport) { $localport = 5300; }
+
 my $sock = IO::Socket::INET->new(LocalAddr => "10.53.0.4",
-   LocalPort => 5300, Proto => "udp") or die "$!";
+   LocalPort => $localport, Proto => "udp") or die "$!";
 
 my $pidf = new IO::File "ans.pid", "w" or die "cannot open pid file: $!";
 print $pidf "$$\n" or die "cannot write pid file: $!";
index 8d054303d23ef0ca78f5ce18ed82d061363eab14..2a7c925a9c9453d5aebd3a4c131f24b1e89c0bee 100644 (file)
@@ -14,8 +14,8 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-rm -f */named.memstats */ans.run */named.recursing */named.run
+rm -f */named.conf */named.memstats */ans.run */named.recursing */named.run
 rm -f dig.out*
 rm -f ans4/norespond
-rm -f ns3/named.conf ns3/named.stats ns3/named_dump.db
+rm -f ns3/named.stats ns3/named_dump.db
 rm -f burst.input.*
diff --git a/bin/tests/system/fetchlimit/lameserver/ans4/ans.pl b/bin/tests/system/fetchlimit/lameserver/ans4/ans.pl
deleted file mode 100644 (file)
index 7e6e0c5..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Copyright (C) 2015  Internet Systems Consortium, Inc. ("ISC")
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
-# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-# AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
-# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-# PERFORMANCE OF THIS SOFTWARE.
-
-#
-# Don't respond if the "norespond" file exists; otherwise respond to
-# any A or AAAA query.
-#
-
-use IO::File;
-use IO::Socket;
-use Net::DNS;
-use Net::DNS::Packet;
-
-my $sock = IO::Socket::INET->new(LocalAddr => "10.53.0.4",
-   LocalPort => 5300, Proto => "udp") or die "$!";
-
-my $pidf = new IO::File "ans.pid", "w" or die "cannot open pid file: $!";
-print $pidf "$$\n" or die "cannot write pid file: $!";
-$pidf->close or die "cannot close pid file: $!";
-sub rmpid { unlink "ans.pid"; exit 1; };
-
-$SIG{INT} = \&rmpid;
-$SIG{TERM} = \&rmpid;
-
-for (;;) {
-       $sock->recv($buf, 512);
-
-       print "**** request from " , $sock->peerhost, " port ", $sock->peerport, "\n";
-
-       my $packet;
-
-       if ($Net::DNS::VERSION > 0.68) {
-               $packet = new Net::DNS::Packet(\$buf, 0);
-               $@ and die $@;
-       } else {
-               my $err;
-               ($packet, $err) = new Net::DNS::Packet(\$buf, 0);
-               $err and die $err;
-       }
-
-       print "REQUEST:\n";
-       $packet->print;
-
-       $packet->header->qr(1);
-
-       my @questions = $packet->question;
-       my $qname = $questions[0]->qname;
-       my $qtype = $questions[0]->qtype;
-
-       my $donotrespond = 0;
-
-       if (-e 'norespond') {
-               $donotrespond = 1;
-       } else {
-               $packet->header->aa(1);
-               if ($qtype eq "A") {
-                       $packet->push("answer",
-                                     new Net::DNS::RR($qname .
-                                                      " 300 A 192.0.2.1"));
-               } elsif ($qtype eq "AAAA") {
-                       $packet->push("answer",
-                                     new Net::DNS::RR($qname .
-                                               " 300 AAAA 2001:db8:beef::1"));
-               }
-       }
-
-       if ($donotrespond == 0) {
-               $sock->send($packet->data);
-               print "RESPONSE:\n";
-               $packet->print;
-               print "\n";
-       }
-}
diff --git a/bin/tests/system/fetchlimit/lameserver/clean.sh b/bin/tests/system/fetchlimit/lameserver/clean.sh
deleted file mode 100644 (file)
index 515c670..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2015  Internet Systems Consortium, Inc. ("ISC")
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
-# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-# AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
-# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-# PERFORMANCE OF THIS SOFTWARE.
-
-rm -f */named.memstats */ans.run */named.recursing
-rm -f dig.out*
-rm -f ans4/norespond
-rm -f ns3/named.conf ns3/named.stats ns3/named_dump.db
diff --git a/bin/tests/system/fetchlimit/lameserver/ns1/named.conf b/bin/tests/system/fetchlimit/lameserver/ns1/named.conf
deleted file mode 100644 (file)
index 27b5c88..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2015  Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-controls { /* empty */ };
-
-options {
-       query-source address 10.53.0.1;
-       notify-source 10.53.0.1;
-       transfer-source 10.53.0.1;
-       port 5300;
-       pid-file "named.pid";
-       listen-on { 10.53.0.1; };
-       listen-on-v6 { none; };
-       recursion no;
-       notify yes;
-};
-
-zone "." {
-       type master;
-       file "root.db";
-};
-
-zone "example.info." {
-       type master;
-       file "example-info.db";
-};
diff --git a/bin/tests/system/fetchlimit/lameserver/ns1/root.db b/bin/tests/system/fetchlimit/lameserver/ns1/root.db
deleted file mode 100644 (file)
index b433cd8..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-; Copyright (C) 2015  Internet Systems Consortium, Inc. ("ISC")
-;
-; Permission to use, copy, modify, and/or distribute this software for any
-; purpose with or without fee is hereby granted, provided that the above
-; copyright notice and this permission notice appear in all copies.
-;
-; THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
-; REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-; AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
-; INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-; LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-; OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-; PERFORMANCE OF THIS SOFTWARE.
-
-; $Id$
-
-$TTL 300
-.                      IN SOA  gson.nominum.com. a.root.servers.nil. (
-                               2000042100      ; serial
-                               600             ; refresh
-                               600             ; retry
-                               1200            ; expire
-                               600             ; minimum
-                               )
-.                      NS      a.root-servers.nil.
-a.root-servers.nil.    A       10.53.0.1
-
-example.               NS      ns2.example.
-ns2.example.           A       10.53.0.2
diff --git a/bin/tests/system/fetchlimit/lameserver/ns2/example.db b/bin/tests/system/fetchlimit/lameserver/ns2/example.db
deleted file mode 100644 (file)
index 1197da4..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-; Copyright (C) 2015  Internet Systems Consortium, Inc. ("ISC")
-;
-; Permission to use, copy, modify, and/or distribute this software for any
-; purpose with or without fee is hereby granted, provided that the above
-; copyright notice and this permission notice appear in all copies.
-;
-; THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
-; REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-; AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
-; INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-; LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-; OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-; PERFORMANCE OF THIS SOFTWARE.
-
-$ORIGIN .
-$TTL 300       ; 5 minutes
-example                        IN SOA  mname1. . (
-                               1          ; serial
-                               20         ; refresh (20 seconds)
-                               20         ; retry (20 seconds)
-                               1814400    ; expire (3 weeks)
-                               3600       ; minimum (1 hour)
-                               )
-example                        NS      ns2.example.
-ns2.example.           A       10.53.0.2
-
-a.example.             A       10.0.0.1
-                       MX      10 mail.example.
-
-mail.example.          A       10.0.0.2
-
-lamesub.example.        NS     ns4.example.
-ns4.example.           A       10.53.0.4
-
-0.example.              A       10.53.1.0
-1.example.              A       10.53.1.1
-2.example.              A       10.53.1.2
-3.example.              A       10.53.1.3
-4.example.              A       10.53.1.4
-5.example.              A       10.53.1.5
diff --git a/bin/tests/system/fetchlimit/lameserver/ns3/named1.conf b/bin/tests/system/fetchlimit/lameserver/ns3/named1.conf
deleted file mode 100644 (file)
index 95e138e..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2015  Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-controls { /* empty */ };
-
-options {
-       query-source address 10.53.0.3;
-       notify-source 10.53.0.3;
-       transfer-source 10.53.0.3;
-       port 5300;
-       directory ".";
-       pid-file "named.pid";
-       listen-on { 10.53.0.3; };
-       listen-on-v6 { none; };
-       recursion yes;
-       notify yes;
-       fetches-per-server 400;
-};
-
-key rndc_key {
-       secret "1234abcd8765";
-       algorithm hmac-sha256;
-};
-
-controls {
-       inet 10.53.0.3 port 9953 allow { any; } keys { rndc_key; };
-};
-
-zone "." {
-       type hint;
-       file "root.hint";
-};
diff --git a/bin/tests/system/fetchlimit/lameserver/ns3/named2.conf b/bin/tests/system/fetchlimit/lameserver/ns3/named2.conf
deleted file mode 100644 (file)
index 3a4d43a..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2015  Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-controls { /* empty */ };
-
-options {
-       query-source address 10.53.0.3;
-       notify-source 10.53.0.3;
-       transfer-source 10.53.0.3;
-       port 5300;
-       directory ".";
-       pid-file "named.pid";
-       listen-on { 10.53.0.3; };
-       listen-on-v6 { none; };
-       recursion yes;
-       notify yes;
-       fetches-per-zone 40;
-};
-
-key rndc_key {
-       secret "1234abcd8765";
-       algorithm hmac-sha256;
-};
-
-controls {
-       inet 10.53.0.3 port 9953 allow { any; } keys { rndc_key; };
-};
-
-zone "." {
-       type hint;
-       file "root.hint";
-};
diff --git a/bin/tests/system/fetchlimit/lameserver/ns3/root.hint b/bin/tests/system/fetchlimit/lameserver/ns3/root.hint
deleted file mode 100644 (file)
index 1680d8e..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-; Copyright (C) 2015  Internet Systems Consortium, Inc. ("ISC")
-;
-; Permission to use, copy, modify, and/or distribute this software for any
-; purpose with or without fee is hereby granted, provided that the above
-; copyright notice and this permission notice appear in all copies.
-;
-; THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
-; REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-; AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
-; INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-; LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-; OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-; PERFORMANCE OF THIS SOFTWARE.
-
-; $Id$
-
-$TTL 999999
-.                       IN NS  a.root-servers.nil.
-a.root-servers.nil.     IN A   10.53.0.1
diff --git a/bin/tests/system/fetchlimit/lameserver/setup.sh b/bin/tests/system/fetchlimit/lameserver/setup.sh
deleted file mode 100644 (file)
index 6f30b29..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2015  Internet Systems Consortium, Inc. ("ISC")
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
-# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-# AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
-# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-# PERFORMANCE OF THIS SOFTWARE.
-
-SYSTEMTESTTOP=..
-. $SYSTEMTESTTOP/conf.sh
-
-$SHELL clean.sh 
-
-cp -f ns3/named1.conf ns3/named.conf
diff --git a/bin/tests/system/fetchlimit/lameserver/tests.sh b/bin/tests/system/fetchlimit/lameserver/tests.sh
deleted file mode 100644 (file)
index 0a4b5b5..0000000
+++ /dev/null
@@ -1,183 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2015  Internet Systems Consortium, Inc. ("ISC")
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
-# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-# AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
-# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-# PERFORMANCE OF THIS SOFTWARE.
-
-SYSTEMTESTTOP=..
-. $SYSTEMTESTTOP/conf.sh
-
-DIGCMD="$DIG @10.53.0.3 -p 5300 +tries=1 +time=1"
-RNDCCMD="$RNDC -p 9953 -s 10.53.0.3 -c ../common/rndc.conf"
-
-burst() {
-    num=${3:-20}
-    while [ $num -gt 0 ]; do
-        num=`expr $num - 1`
-        $DIGCMD ${num}${1}${2}.lamesub.example a > /dev/null 2>&1 &
-    done
-}
-
-stat() {
-    clients=`$RNDCCMD status | grep "recursive clients" |
-            sed 's;.*: \([^/][^/]*\)/.*;\1;'`
-    echo "I: clients: $clients"
-    [ "$clients" = "" ] && return 1
-    [ "$clients" -le $1 ]
-}
-
-status=0
-
-echo "I: checking recursing clients are dropped at the per-server limit"
-ret=0
-# make the server lame and restart
-$RNDCCMD flush
-touch ans4/norespond
-for try in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do
-    burst a $try
-    # fetches-per-server is at 400, but at 20qps against a lame server,
-    # we'll reach 200 at the tenth second, and the quota should have been
-    # tuned to less than that by then
-    stat 200 || ret=1
-    [ $ret -eq 1 ] && break
-    sleep 1
-done
-if [ $ret != 0 ]; then echo "I: failed"; fi
-status=`expr $status + $ret`
-
-echo "I: dumping ADB data"
-$RNDCCMD dumpdb -adb
-info=`grep '10.53.0.4' ns3/named_dump.db | sed 's/.*\(atr [.0-9]*\).*\(quota [0-9]*\).*/I: \1 \2/'`
-echo $info
-set -- $info
-quota=$5
-[ $5 -lt 200 ] || ret=1
-
-echo "I: checking servfail statistics"
-rm -f ns3/named.stats
-$RNDCCMD stats
-for try in 1 2 3 4 5; do
-    [ -f ns3/named.stats ] && break
-    sleep 1
-done
-sspill=`grep 'spilled due to server' ns3/named.stats | sed 's/\([0-9][0-9]*\) spilled.*/\1/'`
-[ -z "$sspill" ] && sspill=0
-fails=`grep 'queries resulted in SERVFAIL' ns3/named.stats | sed 's/\([0-9][0-9]*\) queries.*/\1/'`
-[ -z "$fails" ] && fails=0
-[ "$fails" -ge "$sspill" ] || ret=1
-if [ $ret != 0 ]; then echo "I: failed"; fi
-status=`expr $status + $ret`
-
-echo "I: checking lame server recovery"
-ret=0
-rm -f ans4/norespond
-for try in 1 2 3 4 5; do
-    burst b $try
-    stat 200 || ret=1
-    [ $ret -eq 1 ] && break
-    sleep 1
-done
-
-echo "I: dumping ADB data"
-$RNDCCMD dumpdb -adb
-info=`grep '10.53.0.4' ns3/named_dump.db | sed 's/.*\(atr [.0-9]*\).*\(quota [0-9]*\).*/I: \1 \2/'`
-echo $info
-set -- $info
-[ $5 -lt $quota ] || ret=1
-quota=$5
-
-for try in 1 2 3 4 5 6 7 8 9 10; do
-    burst c $try
-    stat 20 || ret=1
-    [ $ret -eq 1 ] && break
-    sleep 1
-done
-
-echo "I: dumping ADB data"
-$RNDCCMD dumpdb -adb
-info=`grep '10.53.0.4' ns3/named_dump.db | sed 's/.*\(atr [.0-9]*\).*\(quota [0-9]*\).*/I: \1 \2/'`
-echo $info
-set -- $info
-[ $5 -gt $quota ] || ret=1
-quota=$5
-if [ $ret != 0 ]; then echo "I: failed"; fi
-status=`expr $status + $ret`
-
-if [ $ret != 0 ]; then echo "I: failed"; fi
-status=`expr $status + $ret`
-
-cp -f ns3/named2.conf ns3/named.conf
-$RNDCCMD reconfig 2>&1 | sed 's/^/I:ns3 /'
-
-echo "I: checking lame server clients are dropped at the per-domain limit"
-ret=0
-fail=0
-success=0
-touch ans4/norespond
-for try in 1 2 3 4 5; do
-    burst b $try 300
-    $DIGCMD a ${try}.example > dig.out.ns3.$try
-    grep "status: NOERROR" dig.out.ns3.$try > /dev/null 2>&1 && \
-            success=`expr $success + 1`
-    grep "status: SERVFAIL" dig.out.ns3.$try > /dev/null 2>&1 && \
-            fail=`expr $fail + 1`
-    stat 50 || ret=1
-    [ $ret -eq 1 ] && break
-    $RNDCCMD recursing 2>&1 | sed 's/^/I:ns3 /'
-    sleep 1
-done
-echo "I: $success successful valid queries, $fail SERVFAIL"
-if [ $ret != 0 ]; then echo "I: failed"; fi
-status=`expr $status + $ret`
-
-echo "I: checking drop statsistics"
-rm -f ns3/named.stats
-$RNDCCMD stats
-for try in 1 2 3 4 5; do
-    [ -f ns3/named.stats ] && break
-    sleep 1
-done
-zspill=`grep 'spilled due to zone' ns3/named.stats | sed 's/\([0-9][0-9]*\) spilled.*/\1/'`
-[ -z "$zspill" ] && zspill=0
-drops=`grep 'queries dropped' ns3/named.stats | sed 's/\([0-9][0-9]*\) queries.*/\1/'`
-[ -z "$drops" ] && drops=0
-[ "$drops" -ge "$zspill" ] || ret=1
-if [ $ret != 0 ]; then echo "I: failed"; fi
-status=`expr $status + $ret`
-
-cp -f ns3/named3.conf ns3/named.conf
-$RNDCCMD reconfig 2>&1 | sed 's/^/I:ns3 /'
-
-echo "I: checking lame server clients are dropped at the soft limit"
-ret=0
-fail=0
-success=0
-touch ans4/norespond
-for try in 1 2 3 4 5; do
-    burst b $try 400
-    $DIGCMD a ${try}.example > dig.out.ns3.$try
-    stat 360 || ret=1
-    grep "status: NOERROR" dig.out.ns3.$try > /dev/null 2>&1 && \
-            success=`expr $success + 1`
-    grep "status: SERVFAIL" dig.out.ns3.$try > /dev/null 2>&1 && \
-            fail=`expr $fail + 1`
-    [ $ret -eq 1 ] && break
-    sleep 1
-done
-echo "I: $success successful valid queries, $fail SERVFAIL"
-[ "$success" -eq 5 ] || ret=1
-if [ $ret != 0 ]; then echo "I: failed"; fi
-status=`expr $status + $ret`
-
-echo "I:exit status: $status"
-exit $status
similarity index 96%
rename from bin/tests/system/fetchlimit/ns1/named.conf
rename to bin/tests/system/fetchlimit/ns1/named.conf.in
index 27b5c885facef040f102364fe43901752ada0770..be8d3ed629e26545bed77115e1cba57cdb2d064a 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-controls { /* empty */ };
-
 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 86%
rename from bin/tests/system/fetchlimit/ns2/named.conf
rename to bin/tests/system/fetchlimit/ns2/named.conf.in
index 2a5667a714d9359599804db38c753f24ac12b1f9..f05b5367669b70300120973f84cc61583d92944e 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-controls { /* empty */ };
-
 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; };
@@ -28,7 +26,15 @@ options {
        notify yes;
 };
 
-include "../../common/controls.conf";
+key rndc_key {
+       secret "1234abcd8765";
+       algorithm hmac-sha256;
+};
+
+controls {
+       inet 10.53.0.2 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
+};
+
 
 zone "example" {
        type master;
similarity index 93%
rename from bin/tests/system/fetchlimit/ns3/named1.conf
rename to bin/tests/system/fetchlimit/ns3/named1.conf.in
index 95e138ecba4a5728509441b943974a7faed9847e..773170ba48a84983206773ef84fb38ac83ce99b3 100644 (file)
@@ -20,7 +20,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@;
        directory ".";
        pid-file "named.pid";
        listen-on { 10.53.0.3; };
@@ -36,7 +36,7 @@ key rndc_key {
 };
 
 controls {
-       inet 10.53.0.3 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.3 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 zone "." {
similarity index 92%
rename from bin/tests/system/fetchlimit/ns3/named2.conf
rename to bin/tests/system/fetchlimit/ns3/named2.conf.in
index 3a4d43ac6e1fec85271b9f3f3aaf54213613f10a..38ea7f9f5fdd03fbcac9b9568717be1ea584f317 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-controls { /* empty */ };
-
 options {
        query-source address 10.53.0.3;
        notify-source 10.53.0.3;
        transfer-source 10.53.0.3;
-       port 5300;
+       port @PORT@;
        directory ".";
        pid-file "named.pid";
        listen-on { 10.53.0.3; };
@@ -36,7 +34,7 @@ key rndc_key {
 };
 
 controls {
-       inet 10.53.0.3 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.3 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 zone "." {
diff --git a/bin/tests/system/fetchlimit/ns3/named3.conf b/bin/tests/system/fetchlimit/ns3/named3.conf
deleted file mode 100644 (file)
index 94bf0b9..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2015  Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-controls { /* empty */ };
-
-options {
-       query-source address 10.53.0.3;
-       notify-source 10.53.0.3;
-       transfer-source 10.53.0.3;
-       port 5300;
-       directory ".";
-       pid-file "named.pid";
-       listen-on { 10.53.0.3; };
-       listen-on-v6 { none; };
-       recursion yes;
-       notify yes;
-       recursive-clients 400;
-};
-
-key rndc_key {
-       secret "1234abcd8765";
-       algorithm hmac-sha256;
-};
-
-controls {
-       inet 10.53.0.3 port 9953 allow { any; } keys { rndc_key; };
-};
-
-zone "." {
-       type hint;
-       file "root.hint";
-};
similarity index 92%
rename from bin/tests/system/fetchlimit/lameserver/ns3/named3.conf
rename to bin/tests/system/fetchlimit/ns3/named3.conf.in
index 94bf0b9a4137e561567c05726917d5aace04b1e1..5a101e16dd57f18669d239fb8f5bab47223a5c28 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-controls { /* empty */ };
-
 options {
        query-source address 10.53.0.3;
        notify-source 10.53.0.3;
        transfer-source 10.53.0.3;
-       port 5300;
+       port @PORT@;
        directory ".";
        pid-file "named.pid";
        listen-on { 10.53.0.3; };
@@ -36,7 +34,7 @@ key rndc_key {
 };
 
 controls {
-       inet 10.53.0.3 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.3 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 zone "." {
index 6f30b29fc2388f154022ac101c4525de2394f648..328e00d721d22dc3232ba7db9f81117576eaddd7 100644 (file)
@@ -19,4 +19,6 @@ SYSTEMTESTTOP=..
 
 $SHELL clean.sh 
 
-cp -f ns3/named1.conf ns3/named.conf
+copy_setports ns1/named.conf.in ns1/named.conf
+copy_setports ns2/named.conf.in ns2/named.conf
+copy_setports ns3/named1.conf.in ns3/named.conf
index ff480ec7f9c68c06916b93e7fd94f3c53dc97fca..700c6a6f9ccb3d9ba31808a80e3ceae721dcdf10 100644 (file)
@@ -17,8 +17,8 @@
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
-DIGCMD="$DIG @10.53.0.3 -p 5300 +tries=1 +time=1"
-RNDCCMD="$RNDC -p 9953 -s 10.53.0.3 -c ../common/rndc.conf"
+DIGCMD="$DIG @10.53.0.3 -p ${PORT} +tries=1 +time=1"
+RNDCCMD="$RNDC -p ${CONTROLPORT} -s 10.53.0.3 -c ../common/rndc.conf"
 
 burst() {
     num=${3:-20}
@@ -27,21 +27,21 @@ burst() {
         num=`expr $num - 1`
         echo "${num}${1}${2}.lamesub.example A" >> burst.input.$$
     done
-    $PERL ../ditch.pl -p 5300 -s 10.53.0.3 burst.input.$$
+    $PERL ../ditch.pl -p ${PORT} -s 10.53.0.3 burst.input.$$
     rm -f burst.input.$$
 }
 
 stat() {
     clients=`$RNDCCMD status | grep "recursive clients" | 
             sed 's;.*: \([^/][^/]*\)/.*;\1;'`
-    echo "I: clients: $clients"
+    echo_i "clients: $clients"
     [ "$clients" = "" ] && return 1
     [ "$clients" -le $1 ]
 }
 
 status=0
 
-echo "I: checking recursing clients are dropped at the per-server limit"
+echo_i "checking recursing clients are dropped at the per-server limit"
 ret=0
 # make the server lame and restart
 $RNDCCMD flush
@@ -55,18 +55,19 @@ for try in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do
     [ $ret -eq 1 ] && break
     sleep 1
 done
-if [ $ret != 0 ]; then echo "I: failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: dumping ADB data"
+echo_i "dumping ADB data"
 $RNDCCMD dumpdb -adb
-info=`grep '10.53.0.4' ns3/named_dump.db | sed 's/.*\(atr [.0-9]*\).*\(quota [0-9]*\).*/I: \1 \2/'`
-echo $info
+info=`grep '10.53.0.4' ns3/named_dump.db | sed 's/.*\(atr [.0-9]*\).*\(quota [0-9]*\).*/\1 \2/'`
+echo_i $info
 set -- $info
 quota=$5
 [ ${5:-200} -lt 200 ] || ret=1
 
-echo "I: checking servfail statistics"
+echo_i "checking servfail statistics"
+ret=0
 rm -f ns3/named.stats
 $RNDCCMD stats
 for try in 1 2 3 4 5; do
@@ -78,10 +79,10 @@ sspill=`grep 'spilled due to server' ns3/named.stats | sed 's/\([0-9][0-9]*\) sp
 fails=`grep 'queries resulted in SERVFAIL' ns3/named.stats | sed 's/\([0-9][0-9]*\) queries.*/\1/'`
 [ -z "$fails" ] && fails=0
 [ "$fails" -ge "$sspill" ] || ret=1
-if [ $ret != 0 ]; then echo "I: failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking lame server recovery"
+echo_i "checking lame server recovery"
 ret=0
 rm -f ans4/norespond
 for try in 1 2 3 4 5; do
@@ -91,10 +92,10 @@ for try in 1 2 3 4 5; do
     sleep 1
 done
 
-echo "I: dumping ADB data"
+echo_i "dumping ADB data"
 $RNDCCMD dumpdb -adb
-info=`grep '10.53.0.4' ns3/named_dump.db | sed 's/.*\(atr [.0-9]*\).*\(quota [0-9]*\).*/I: \1 \2/'`
-echo $info
+info=`grep '10.53.0.4' ns3/named_dump.db | sed 's/.*\(atr [.0-9]*\).*\(quota [0-9]*\).*/\1 \2/'`
+echo_i $info
 set -- $info
 [ ${5:-${quota}} -lt $quota ] || ret=1
 quota=$5
@@ -106,23 +107,23 @@ for try in 1 2 3 4 5 6 7 8 9 10; do
     sleep 1
 done
 
-echo "I: dumping ADB data"
+echo_i "dumping ADB data"
 $RNDCCMD dumpdb -adb
-info=`grep '10.53.0.4' ns3/named_dump.db | sed 's/.*\(atr [.0-9]*\).*\(quota [0-9]*\).*/I: \1 \2/'`
-echo $info
+info=`grep '10.53.0.4' ns3/named_dump.db | sed 's/.*\(atr [.0-9]*\).*\(quota [0-9]*\).*/\1 \2/'`
+echo_i $info
 set -- $info
 [ ${5:-${quota}} -gt $quota ] || ret=1
 quota=$5
-if [ $ret != 0 ]; then echo "I: failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-if [ $ret != 0 ]; then echo "I: failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-cp -f ns3/named2.conf ns3/named.conf
-$RNDCCMD reconfig 2>&1 | sed 's/^/I:ns3 /'
+copy_setports ns3/named2.conf.in ns3/named.conf
+$RNDCCMD reconfig 2>&1 | sed 's/^/ns3 /' | cat_i
 
-echo "I: checking lame server clients are dropped at the per-domain limit"
+echo_i "checking lame server clients are dropped at the per-domain limit"
 ret=0
 fail=0
 success=0
@@ -136,14 +137,14 @@ for try in 1 2 3 4 5; do
             fail=`expr $fail + 1`
     stat 50 || ret=1
     [ $ret -eq 1 ] && break
-    $RNDCCMD recursing 2>&1 | sed 's/^/I:ns3 /'
+    $RNDCCMD recursing 2>&1 | sed 's/^/ns3 /' | cat_i
     sleep 1
 done
-echo "I: $success successful valid queries, $fail SERVFAIL"
-if [ $ret != 0 ]; then echo "I: failed"; fi
+echo_i "$success successful valid queries, $fail SERVFAIL"
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: checking drop statistics"
+echo_i "checking drop statistics"
 rm -f ns3/named.stats
 $RNDCCMD stats
 for try in 1 2 3 4 5; do
@@ -155,20 +156,20 @@ zspill=`grep 'spilled due to zone' ns3/named.stats | sed 's/\([0-9][0-9]*\) spil
 drops=`grep 'queries dropped' ns3/named.stats | sed 's/\([0-9][0-9]*\) queries.*/\1/'`
 [ -z "$drops" ] && drops=0
 [ "$drops" -ge "$zspill" ] || ret=1
-if [ $ret != 0 ]; then echo "I: failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-cp -f ns3/named3.conf ns3/named.conf
-$RNDCCMD reconfig 2>&1 | sed 's/^/I:ns3 /'
+copy_setports ns3/named3.conf.in ns3/named.conf
+$RNDCCMD reconfig 2>&1 | sed 's/^/ns3 /' | cat_i
 
-echo "I: checking lame server clients are dropped at the soft limit"
+echo_i "checking lame server clients are dropped at the soft limit"
 ret=0
 fail=0
 success=0
 touch ans4/norespond
 for try in 1 2 3 4 5; do
     burst b $try 400
-    $DIG @10.53.0.3 -p 5300 a ${try}.example > dig.out.ns3.$try
+    $DIG @10.53.0.3 -p ${PORT}  a ${try}.example > dig.out.ns3.$try
     stat 360 || ret=1
     grep "status: NOERROR" dig.out.ns3.$try > /dev/null 2>&1 && \
             success=`expr $success + 1`
@@ -177,10 +178,10 @@ for try in 1 2 3 4 5; do
     [ $ret -eq 1 ] && break
     sleep 1
 done
-echo "I: $success successful valid queries, $fail SERVFAIL"
+echo_i "$success successful valid queries, $fail SERVFAIL"
 [ "$success" -eq 5 ] || ret=1
-if [ $ret != 0 ]; then echo "I: failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index fef340c4d8ac0b702f764d34f83b40b97cc045b9..ce97a36364e20b8371f053ea0cb08e603391706f 100644 (file)
@@ -18,20 +18,13 @@ rm -f ns1/K*
 rm -f ns1/*.signed
 rm -f ns1/signer.err
 rm -f ns1/dsset-*
-rm -f ns1/named.run
-rm -f ns1/named.memstats
-
-rm -f ns2/named.run
-rm -f ns2/named.memstats
-
-rm -f ns3/named.run
-rm -f ns3/named.memstats
+rm -f */named.run
+rm -f */named.conf
+rm -f */named.memstats
 
 rm -f ns4/K*
 rm -f ns4/*.signed
 rm -f ns4/signer.err
 rm -f ns4/dsset-*
-rm -f ns4/named.run
-rm -f ns4/named.memstats
 
 rm -f dig.out.*
similarity index 83%
rename from bin/tests/system/filter-aaaa/ns1/named.conf
rename to bin/tests/system/filter-aaaa/ns1/named.conf.in
index 5971cc2a6359d470b6ed41c8d33c4d92b115f920..1725b3dc4b83a39c4181c3e364794034631829f0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2012, 2013  Internet Systems Consortium, Inc. ("ISC")
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.2 2010/06/22 03:58:37 marka Exp $ */
-
-controls { /* empty */ };
-
 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 { fd92:7065:b8e:ffff::1; };
@@ -32,6 +28,16 @@ options {
        filter-aaaa { 10.53.0.1; };
 };
 
+key rndc_key {
+       secret "1234abcd8765";
+       algorithm hmac-sha256;
+};
+
+controls {
+       inet 10.53.0.1 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
+};
+
+
 zone "." { type master; file "root.db"; };
 zone "signed" { type master; file "signed.db.signed"; };
 zone "unsigned" { type master; file "unsigned.db"; };
index 0232b1667a09c0a6a53fc772906205e742170d6c..cf30893f71bbd5a406e06c5527b353730ec2f30d 100755 (executable)
@@ -14,8 +14,6 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: sign.sh,v 1.2 2010/06/22 03:58:37 marka Exp $
-
 SYSTEMTESTTOP=../..
 . $SYSTEMTESTTOP/conf.sh
 
@@ -32,4 +30,4 @@ keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
 cat $infile $keyname1.key $keyname2.key >$zonefile
 
 $SIGNER -r $RANDFILE -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
-echo "I: signed $zone"
+echo_i "signed $zone"
similarity index 77%
rename from bin/tests/system/filter-aaaa/ns2/named.conf
rename to bin/tests/system/filter-aaaa/ns2/named.conf.in
index 627c91b1ae1fa83ea1ca42d1c271a3ff9fe7b405..976481e442bf96f596ab6a47b1e222d525856362 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2012, 2013  Internet Systems Consortium, Inc. ("ISC")
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.2 2010/06/22 03:58:38 marka Exp $ */
-
-controls { /* empty */ };
-
 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 { fd92:7065:b8e:ffff::2; };
        recursion yes;
        notify yes;
-        filter-aaaa-on-v4 yes;
-        filter-aaaa { 10.53.0.2; };
+       filter-aaaa-on-v4 yes;
+       filter-aaaa { 10.53.0.2; };
+};
+
+key rndc_key {
+       secret "1234abcd8765";
+       algorithm hmac-sha256;
+};
+
+controls {
+       inet 10.53.0.2 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 zone "." { type hint; file "hints"; };
similarity index 76%
rename from bin/tests/system/filter-aaaa/ns3/named.conf
rename to bin/tests/system/filter-aaaa/ns3/named.conf.in
index 0260e50ccaa987cc6a2efec232376269d64280b3..c00631da89e0083f1ee4864f97de574bb733c2ba 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2012, 2013, 2018  Internet Systems Consortium, Inc. ("ISC")
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.2 2010/06/22 03:58:38 marka Exp $ */
-
-controls { /* empty */ };
-
 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 { fd92:7065:b8e:ffff::3; };
        recursion yes;
        notify yes;
-        filter-aaaa-on-v4 break-dnssec;
-        filter-aaaa { 10.53.0.3; };
+       filter-aaaa-on-v4 break-dnssec;
+       filter-aaaa { 10.53.0.3; };
+};
+
+key rndc_key {
+       secret "1234abcd8765";
+       algorithm hmac-sha256;
+};
+
+controls {
+       inet 10.53.0.3 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 zone "." { type hint; file "hints"; };
similarity index 83%
rename from bin/tests/system/filter-aaaa/ns4/named.conf
rename to bin/tests/system/filter-aaaa/ns4/named.conf.in
index 3e9539e26cc5a80f3f264bdeeeb065f27320d362..c5bafab43da2bf3b5e5783a619b077074da65e3d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2012, 2013  Internet Systems Consortium, Inc. ("ISC")
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.2 2010/06/22 03:58:38 marka Exp $ */
-
-controls { /* empty */ };
-
 options {
        query-source address 10.53.0.4;
        notify-source 10.53.0.4;
        transfer-source 10.53.0.4;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.4; };
        listen-on-v6 { fd92:7065:b8e:ffff::4; };
@@ -32,6 +28,15 @@ options {
        filter-aaaa { 10.53.0.4; };
 };
 
+key rndc_key {
+       secret "1234abcd8765";
+       algorithm hmac-sha256;
+};
+
+controls {
+       inet 10.53.0.4 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
+};
+
 zone "." { type master; file "root.db"; };
 zone "signed" { type master; file "signed.db.signed"; };
 zone "unsigned" { type master; file "unsigned.db"; };
index 8423f3f7f413383d9c38cdcada5edd3789719621..cf30893f71bbd5a406e06c5527b353730ec2f30d 100755 (executable)
@@ -14,8 +14,6 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: sign.sh,v 1.2 2010/06/22 03:58:38 marka Exp $
-
 SYSTEMTESTTOP=../..
 . $SYSTEMTESTTOP/conf.sh
 
@@ -32,4 +30,4 @@ keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone 2> /dev/null`
 cat $infile $keyname1.key $keyname2.key >$zonefile
 
 $SIGNER -r $RANDFILE -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
-echo "I: signed $zone"
+echo_i "signed $zone"
index 5999afd3908d8d875428689d017f386843428f3e..1d9b15eadbbff2f5624cb6b908abf7e88f0b3714 100644 (file)
@@ -21,12 +21,17 @@ $SHELL clean.sh
 
 test -r $RANDFILE || $GENRANDOM 400 $RANDFILE
 
+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
+copy_setports ns4/named.conf.in ns4/named.conf
+
 if $SHELL ../testcrypto.sh -q
 then
        (cd ns1 && $SHELL -e sign.sh)
        (cd ns4 && $SHELL -e sign.sh)
 else
-       echo "I:using pre-signed zones"
+       echo_i "using pre-signed zones"
        cp -f ns1/signed.db.presigned ns1/signed.db.signed
        cp -f ns4/signed.db.presigned ns4/signed.db.signed
 fi
index 4a62b83fc47e5ed4605fa537d6928744ffc79f94..337da40c47cddb9d7cf5d6422033c58dfbd749fd 100644 (file)
@@ -22,25 +22,26 @@ n=0
 
 rm -f dig.out.*
 
-DIGOPTS="+tcp +noadd +nosea +nostat +nocmd -p 5300"
+DIGOPTS="+tcp +noadd +nosea +nostat +nocmd -p ${PORT}"
+RNDCCMD="$RNDC -c $SYSTEMTESTTOP/common/rndc.conf -p ${CONTROLPORT} -s"
 
 for conf in conf/good*.conf
 do
        n=`expr $n + 1`
-       echo "I:checking that $conf is accepted ($n)"
+       echo_i "checking that $conf is accepted ($n)"
        ret=0
        $CHECKCONF "$conf" || ret=1
-       if [ $ret != 0 ]; then echo "I:failed"; fi
+       if [ $ret != 0 ]; then echo_i "failed"; fi
        status=`expr $status + $ret`
 done
 
 for conf in conf/bad*.conf
 do
        n=`expr $n + 1`
-       echo "I:checking that $conf is rejected ($n)"
+       echo_i "checking that $conf is rejected ($n)"
        ret=0
        $CHECKCONF "$conf" >/dev/null && ret=1
-       if [ $ret != 0 ]; then echo "I:failed"; fi
+       if [ $ret != 0 ]; then echo_i "failed"; fi
        status=`expr $status + $ret`
 done
 
@@ -50,180 +51,180 @@ done
 #      filter-aaaa { 10.53.0.1; };
 #
 n=`expr $n + 1`
-echo "I:checking that AAAA is returned when only AAAA record exists, signed ($n)"
+echo_i "checking that AAAA is returned when only AAAA record exists, signed ($n)"
 ret=0
 $DIG $DIGOPTS aaaa aaaa-only.signed -b 10.53.0.1 @10.53.0.1 > dig.out.ns1.test$n || ret=1
 grep "AUTHORITY: 1," dig.out.ns1.test$n > /dev/null || ret=1
 grep ::2 dig.out.ns1.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that AAAA is returned when only AAAA record exists, unsigned ($n)"
+echo_i "checking that AAAA is returned when only AAAA record exists, unsigned ($n)"
 ret=0
 $DIG $DIGOPTS aaaa aaaa-only.unsigned -b 10.53.0.1 @10.53.0.1 > dig.out.ns1.test$n || ret=1
 grep "AUTHORITY: 1," dig.out.ns1.test$n > /dev/null || ret=1
 grep ::5 dig.out.ns1.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that NODATA/NOERROR is returned when both AAAA and A records exist, signed ($n)"
+echo_i "checking that NODATA/NOERROR is returned when both AAAA and A records exist, signed ($n)"
 ret=0
 $DIG $DIGOPTS aaaa dual.signed -b 10.53.0.1 @10.53.0.1 > dig.out.ns1.test$n || ret=1
 grep "ANSWER: 0" dig.out.ns1.test$n > /dev/null || ret=1
 grep "AUTHORITY: 0" dig.out.ns1.test$n > /dev/null || ret=1
 grep "status: NOERROR" dig.out.ns1.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that NODATA/NOERROR is returned when both AAAA and A records exist, unsigned ($n)"
+echo_i "checking that NODATA/NOERROR is returned when both AAAA and A records exist, unsigned ($n)"
 ret=0
 $DIG $DIGOPTS aaaa dual.unsigned -b 10.53.0.1 @10.53.0.1 > dig.out.ns1.test$n || ret=1
 grep "ANSWER: 0" dig.out.ns1.test$n > /dev/null || ret=1
 grep "AUTHORITY: 0" dig.out.ns1.test$n > /dev/null || ret=1
 grep "status: NOERROR" dig.out.ns1.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that AAAA is returned when both AAAA and A records exist, signed and DO set ($n)"
+echo_i "checking that AAAA is returned when both AAAA and A records exist, signed and DO set ($n)"
 ret=0
 $DIG $DIGOPTS aaaa dual.signed +dnssec -b 10.53.0.1 @10.53.0.1 > dig.out.ns1.test$n || ret=1
 grep "AUTHORITY: 2," dig.out.ns1.test$n > /dev/null || ret=1
 grep ::3 dig.out.ns1.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that NODATA/NOERROR is returned when both AAAA and A records exist, unsigned and DO set ($n)"
+echo_i "checking that NODATA/NOERROR is returned when both AAAA and A records exist, unsigned and DO set ($n)"
 ret=0
 $DIG $DIGOPTS aaaa dual.unsigned -b 10.53.0.1 @10.53.0.1 > dig.out.ns1.test$n || ret=1
 grep "ANSWER: 0" dig.out.ns1.test$n > /dev/null || ret=1
 grep "AUTHORITY: 0," dig.out.ns1.test$n > /dev/null || ret=1
 grep "status: NOERROR" dig.out.ns1.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that AAAA is returned when both AAAA and A records exist and query source does not match acl ($n)"
+echo_i "checking that AAAA is returned when both AAAA and A records exist and query source does not match acl ($n)"
 ret=0
 $DIG $DIGOPTS aaaa dual.unsigned -b 10.53.0.2 @10.53.0.1 > dig.out.ns1.test$n || ret=1
 grep "status: NOERROR" dig.out.ns1.test$n > /dev/null || ret=1
 grep "AUTHORITY: 1," dig.out.ns1.test$n > /dev/null || ret=1
 grep ::6 dig.out.ns1.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that A and not AAAA is returned when both AAAA and A records exist, signed and qtype=ANY ($n)"
+echo_i "checking that A and not AAAA is returned when both AAAA and A records exist, signed and qtype=ANY ($n)"
 ret=0
 $DIG $DIGOPTS any dual.signed -b 10.53.0.1 @10.53.0.1 > dig.out.ns1.test$n || ret=1
 grep "status: NOERROR" dig.out.ns1.test$n > /dev/null || ret=1
 grep "AUTHORITY: 0," dig.out.ns1.test$n > /dev/null || ret=1
 grep "1.0.0.3" dig.out.ns1.test$n > /dev/null || ret=1
 grep "::3" dig.out.ns1.test$n > /dev/null && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that A and not AAAA is returned when both AAAA and A records exist, unsigned and qtype=ANY ($n)"
+echo_i "checking that A and not AAAA is returned when both AAAA and A records exist, unsigned and qtype=ANY ($n)"
 ret=0
 $DIG $DIGOPTS any dual.unsigned -b 10.53.0.1 @10.53.0.1 > dig.out.ns1.test$n || ret=1
 grep "status: NOERROR" dig.out.ns1.test$n > /dev/null || ret=1
 grep "AUTHORITY: 0," dig.out.ns1.test$n > /dev/null || ret=1
 grep "1.0.0.6" dig.out.ns1.test$n > /dev/null || ret=1
 grep "::6" dig.out.ns1.test$n > /dev/null && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that both A and AAAA are returned when both AAAA and A records exist, signed, qtype=ANY and DO is set ($n)"
+echo_i "checking that both A and AAAA are returned when both AAAA and A records exist, signed, qtype=ANY and DO is set ($n)"
 ret=0
 $DIG $DIGOPTS any dual.signed +dnssec -b 10.53.0.1 @10.53.0.1 > dig.out.ns1.test$n || ret=1
 grep "status: NOERROR" dig.out.ns1.test$n > /dev/null || ret=1
 grep "AUTHORITY: 2," dig.out.ns1.test$n > /dev/null || ret=1
 grep ::3 dig.out.ns1.test$n > /dev/null || ret=1
 grep "1.0.0.3" dig.out.ns1.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that A and not AAAA is returned when both AAAA and A records exist, unsigned, qtype=ANY and DO is set ($n)"
+echo_i "checking that A and not AAAA is returned when both AAAA and A records exist, unsigned, qtype=ANY and DO is set ($n)"
 ret=0
 $DIG $DIGOPTS any dual.unsigned +dnssec -b 10.53.0.1 @10.53.0.1 > dig.out.ns1.test$n || ret=1
 grep "status: NOERROR" dig.out.ns1.test$n > /dev/null || ret=1
 grep "AUTHORITY: 0," dig.out.ns1.test$n > /dev/null || ret=1
 grep "1.0.0.6" dig.out.ns1.test$n > /dev/null || ret=1
 grep "::6" dig.out.ns1.test$n > /dev/null && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that both A and AAAA are returned when both AAAA and A records exist, qtype=ANY and query source does not match acl ($n)"
+echo_i "checking that both A and AAAA are returned when both AAAA and A records exist, qtype=ANY and query source does not match acl ($n)"
 ret=0
 $DIG $DIGOPTS any dual.unsigned -b 10.53.0.2 @10.53.0.1 > dig.out.ns1.test$n || ret=1
 grep "status: NOERROR" dig.out.ns1.test$n > /dev/null || ret=1
 grep "AUTHORITY: 1," dig.out.ns1.test$n > /dev/null || ret=1
 grep 1.0.0.6 dig.out.ns1.test$n > /dev/null || ret=1
 grep ::6 dig.out.ns1.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that AAAA is returned when both AAAA and A record exists, unsigned over IPv6 ($n)"
+echo_i "checking that AAAA is returned when both AAAA and A record exists, unsigned over IPv6 ($n)"
 if $TESTSOCK6 fd92:7065:b8e:ffff::1
 then
 ret=0
 $DIG $DIGOPTS aaaa dual.unsigned -b fd92:7065:b8e:ffff::1 @fd92:7065:b8e:ffff::1 > dig.out.ns1.test$n || ret=1
 grep 2001:db8::6 dig.out.ns1.test$n > /dev/null || ret=1
 grep "AUTHORITY: 1," dig.out.ns1.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 else
-echo "I: skipped."
+echo_i "skipped."
 fi
 
 n=`expr $n + 1`
-echo "I:checking that AAAA is omitted from additional section, qtype=NS ($n)"
+echo_i "checking that AAAA is omitted from additional section, qtype=NS ($n)"
 ret=0
 $DIG $DIGOPTS +add ns unsigned -b 10.53.0.1 @10.53.0.1 > dig.out.ns1.test$n || ret=1
 grep AAAA dig.out.ns1.test$n > /dev/null 2>&1 && ret=1
 grep "ANSWER: 1," dig.out.ns1.test$n > /dev/null || ret=1
 grep "ADDITIONAL: 2" dig.out.ns1.test$n > /dev/null 2>&1 || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that AAAA is omitted from additional section, qtype=MX, unsigned ($n)"
+echo_i "checking that AAAA is omitted from additional section, qtype=MX, unsigned ($n)"
 ret=0
 $DIG $DIGOPTS +add +dnssec mx unsigned -b 10.53.0.1 @10.53.0.1 > dig.out.ns1.test$n || ret=1
 grep "^mx.unsigned.*AAAA" dig.out.ns1.test$n > /dev/null 2>&1 && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that AAAA is included in additional section, qtype=MX, signed ($n)"
+echo_i "checking that AAAA is included in additional section, qtype=MX, signed ($n)"
 ret=0
 $DIG $DIGOPTS +add +dnssec mx signed -b 10.53.0.1 @10.53.0.1 > dig.out.ns1.test$n || ret=1
 grep "^mx.signed.*AAAA" dig.out.ns1.test$n > /dev/null 2>&1 || ret=1
 grep "AUTHORITY: 2," dig.out.ns1.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that AAAA is included in additional section, qtype=MX, unsigned, over IPV6 ($n)"
+echo_i "checking that AAAA is included in additional section, qtype=MX, unsigned, over IPV6 ($n)"
 if $TESTSOCK6 fd92:7065:b8e:ffff::1
 then
 ret=0
 $DIG $DIGOPTS +add +dnssec mx unsigned -b fd92:7065:b8e:ffff::1 @fd92:7065:b8e:ffff::1 > dig.out.ns1.test$n || ret=1
 grep "^mx.unsigned.*AAAA" dig.out.ns1.test$n > /dev/null 2>&1 || ret=1
 grep "AUTHORITY: 1," dig.out.ns1.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 else
-echo "I: skipped."
+echo_i "skipped."
 fi
 
 
@@ -233,168 +234,168 @@ fi
 #      filter-aaaa { 10.53.0.4; };
 #
 n=`expr $n + 1`
-echo "I:checking that AAAA is returned when only AAAA record exists, signed with break-dnssec ($n)"
+echo_i "checking that AAAA is returned when only AAAA record exists, signed with break-dnssec ($n)"
 ret=0
 $DIG $DIGOPTS aaaa aaaa-only.signed -b 10.53.0.4 @10.53.0.4 > dig.out.ns4.test$n || ret=1
 grep "AUTHORITY: 1," dig.out.ns4.test$n > /dev/null || ret=1
 grep ::2 dig.out.ns4.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that AAAA is returned when only AAAA record exists, unsigned with break-dnssec ($n)"
+echo_i "checking that AAAA is returned when only AAAA record exists, unsigned with break-dnssec ($n)"
 ret=0
 $DIG $DIGOPTS aaaa aaaa-only.unsigned -b 10.53.0.4 @10.53.0.4 > dig.out.ns4.test$n || ret=1
 grep "AUTHORITY: 1," dig.out.ns4.test$n > /dev/null || ret=1
 grep ::5 dig.out.ns4.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that NODATA/NOERROR is returned when both AAAA and A records exist, signed with break-dnssec ($n)"
+echo_i "checking that NODATA/NOERROR is returned when both AAAA and A records exist, signed with break-dnssec ($n)"
 ret=0
 $DIG $DIGOPTS aaaa dual.signed -b 10.53.0.4 @10.53.0.4 > dig.out.ns4.test$n || ret=1
 grep "ANSWER: 0" dig.out.ns4.test$n > /dev/null || ret=1
 grep "AUTHORITY: 0," dig.out.ns4.test$n > /dev/null || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that NODATA/NOERROR is returned when both AAAA and A records exist, unsigned with break-dnssec ($n)"
+echo_i "checking that NODATA/NOERROR is returned when both AAAA and A records exist, unsigned with break-dnssec ($n)"
 ret=0
 $DIG $DIGOPTS aaaa dual.unsigned -b 10.53.0.4 @10.53.0.4 > dig.out.ns4.test$n || ret=1
 grep "ANSWER: 0" dig.out.ns4.test$n > /dev/null || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that NODATA/NOERROR is returned when both AAAA and A records exist, signed and DO set with break-dnssec ($n)"
+echo_i "checking that NODATA/NOERROR is returned when both AAAA and A records exist, signed and DO set with break-dnssec ($n)"
 ret=0
 $DIG $DIGOPTS aaaa dual.signed +dnssec -b 10.53.0.4 @10.53.0.4 > dig.out.ns4.test$n || ret=1
 grep "ANSWER: 0" dig.out.ns4.test$n > /dev/null || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that NODATA/NOERROR is returned when both AAAA and A records exist, unsigned and DO set with break-dnssec ($n)"
+echo_i "checking that NODATA/NOERROR is returned when both AAAA and A records exist, unsigned and DO set with break-dnssec ($n)"
 ret=0
 $DIG $DIGOPTS aaaa dual.unsigned -b 10.53.0.4 @10.53.0.4 > dig.out.ns4.test$n || ret=1
 grep "ANSWER: 0" dig.out.ns4.test$n > /dev/null || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that AAAA is returned when both AAAA and A records exist and query source does not match acl with break-dnssec ($n)"
+echo_i "checking that AAAA is returned when both AAAA and A records exist and query source does not match acl with break-dnssec ($n)"
 ret=0
 $DIG $DIGOPTS aaaa dual.unsigned -b 10.53.0.2 @10.53.0.4 > dig.out.ns4.test$n || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep ::6 dig.out.ns4.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that A and not AAAA is returned when both AAAA and A records exist, signed and qtype=ANY with break-dnssec ($n)"
+echo_i "checking that A and not AAAA is returned when both AAAA and A records exist, signed and qtype=ANY with break-dnssec ($n)"
 ret=0
 $DIG $DIGOPTS any dual.signed -b 10.53.0.4 @10.53.0.4 > dig.out.ns4.test$n || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "1.0.0.3" dig.out.ns4.test$n > /dev/null || ret=1
 grep "::3" dig.out.ns4.test$n > /dev/null && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that A and not AAAA is returned when both AAAA and A records exist, unsigned and qtype=ANY with break-dnssec ($n)"
+echo_i "checking that A and not AAAA is returned when both AAAA and A records exist, unsigned and qtype=ANY with break-dnssec ($n)"
 ret=0
 $DIG $DIGOPTS any dual.unsigned -b 10.53.0.4 @10.53.0.4 > dig.out.ns4.test$n || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "1.0.0.6" dig.out.ns4.test$n > /dev/null || ret=1
 grep "::6" dig.out.ns4.test$n > /dev/null && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that A and not AAAA is returned when both AAAA and A records exist, signed, qtype=ANY and DO is set with break-dnssec ($n)"
+echo_i "checking that A and not AAAA is returned when both AAAA and A records exist, signed, qtype=ANY and DO is set with break-dnssec ($n)"
 ret=0
 $DIG $DIGOPTS any dual.signed +dnssec -b 10.53.0.4 @10.53.0.4 > dig.out.ns4.test$n || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "1.0.0.3" dig.out.ns4.test$n > /dev/null || ret=1
 grep ::3 dig.out.ns4.test$n > /dev/null && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that A and not AAAA is returned when both AAAA and A records exist, unsigned, qtype=ANY and DO is set with break-dnssec ($n)"
+echo_i "checking that A and not AAAA is returned when both AAAA and A records exist, unsigned, qtype=ANY and DO is set with break-dnssec ($n)"
 ret=0
 $DIG $DIGOPTS any dual.unsigned +dnssec -b 10.53.0.4 @10.53.0.4 > dig.out.ns4.test$n || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "1.0.0.6" dig.out.ns4.test$n > /dev/null || ret=1
 grep "::6" dig.out.ns4.test$n > /dev/null && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that both A and AAAA are returned when both AAAA and A records exist, qtype=ANY and query source does not match acl with break-dnssec ($n)"
+echo_i "checking that both A and AAAA are returned when both AAAA and A records exist, qtype=ANY and query source does not match acl with break-dnssec ($n)"
 ret=0
 $DIG $DIGOPTS any dual.unsigned -b 10.53.0.2 @10.53.0.4 > dig.out.ns4.test$n || ret=1
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep 1.0.0.6 dig.out.ns4.test$n > /dev/null || ret=1
 grep ::6 dig.out.ns4.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that AAAA is returned when both AAAA and A record exists, unsigned over IPv6 with break-dnssec ($n)"
+echo_i "checking that AAAA is returned when both AAAA and A record exists, unsigned over IPv6 with break-dnssec ($n)"
 if $TESTSOCK6 fd92:7065:b8e:ffff::4
 then
 ret=0
 $DIG $DIGOPTS aaaa dual.unsigned -b fd92:7065:b8e:ffff::4 @fd92:7065:b8e:ffff::4 > dig.out.ns4.test$n || ret=1
 grep 2001:db8::6 dig.out.ns4.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 else
-echo "I: skipped."
+echo_i "skipped."
 fi
 
 n=`expr $n + 1`
-echo "I:checking that AAAA is omitted from additional section, qtype=NS, with break-dnssec ($n)"
+echo_i "checking that AAAA is omitted from additional section, qtype=NS, with break-dnssec ($n)"
 ret=0
 $DIG $DIGOPTS +add ns unsigned -b 10.53.0.4 @10.53.0.4 > dig.out.ns4.test$n || ret=1
 grep AAAA dig.out.ns4.test$n > /dev/null 2>&1 && ret=1
 grep "ADDITIONAL: 2" dig.out.ns4.test$n > /dev/null 2>&1 || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that AAAA is omitted from additional section, qtype=MX, unsigned, with break-dnssec ($n)"
+echo_i "checking that AAAA is omitted from additional section, qtype=MX, unsigned, with break-dnssec ($n)"
 ret=0
 $DIG $DIGOPTS +add +dnssec mx unsigned -b 10.53.0.4 @10.53.0.4 > dig.out.ns4.test$n || ret=1
 grep "^mx.unsigned.*AAAA" dig.out.ns4.test$n > /dev/null 2>&1 && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that AAAA is omitted from additional section, qtype=MX, signed, with break-dnssec ($n)"
+echo_i "checking that AAAA is omitted from additional section, qtype=MX, signed, with break-dnssec ($n)"
 ret=0
 $DIG $DIGOPTS +add +dnssec mx signed -b 10.53.0.4 @10.53.0.4 > dig.out.ns4.test$n || ret=1
 grep "^mx.signed.*AAAA" dig.out.ns4.test$n > /dev/null 2>&1 && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that AAAA is included in additional section, qtype=MX, unsigned, over IPV6, with break-dnssec ($n)"
+echo_i "checking that AAAA is included in additional section, qtype=MX, unsigned, over IPV6, with break-dnssec ($n)"
 if $TESTSOCK6 fd92:7065:b8e:ffff::4
 then
 ret=0
 $DIG $DIGOPTS +add +dnssec mx unsigned -b fd92:7065:b8e:ffff::4 @fd92:7065:b8e:ffff::4 > dig.out.ns4.test$n || ret=1
 grep "^mx.unsigned.*AAAA" dig.out.ns4.test$n > /dev/null 2>&1 || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 else
-echo "I: skipped."
+echo_i "skipped."
 fi
 
 
@@ -404,164 +405,164 @@ fi
 #      filter-aaaa { 10.53.0.2; };
 #
 n=`expr $n + 1`
-echo "I:checking that AAAA is returned when only AAAA record exists, signed, recursive ($n)"
+echo_i "checking that AAAA is returned when only AAAA record exists, signed, recursive ($n)"
 ret=0
 $DIG $DIGOPTS aaaa aaaa-only.signed -b 10.53.0.2 @10.53.0.2 > dig.out.ns2.test$n || ret=1
 grep ::2 dig.out.ns2.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that AAAA is returned when only AAAA record exists, unsigned, recursive ($n)"
+echo_i "checking that AAAA is returned when only AAAA record exists, unsigned, recursive ($n)"
 ret=0
 $DIG $DIGOPTS aaaa aaaa-only.unsigned -b 10.53.0.2 @10.53.0.2 > dig.out.ns2.test$n || ret=1
 grep ::5 dig.out.ns2.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that NODATA/NOERROR is returned when both AAAA and A records exist, signed, recursive ($n)"
+echo_i "checking that NODATA/NOERROR is returned when both AAAA and A records exist, signed, recursive ($n)"
 ret=0
 $DIG $DIGOPTS aaaa dual.signed -b 10.53.0.2 @10.53.0.2 > dig.out.ns2.test$n || ret=1
 grep "ANSWER: 0" dig.out.ns2.test$n > /dev/null || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that NODATA/NOERROR is returned when both AAAA and A records exist, unsigned, recursive ($n)"
+echo_i "checking that NODATA/NOERROR is returned when both AAAA and A records exist, unsigned, recursive ($n)"
 ret=0
 $DIG $DIGOPTS aaaa dual.unsigned -b 10.53.0.2 @10.53.0.2 > dig.out.ns2.test$n || ret=1
 grep "ANSWER: 0" dig.out.ns2.test$n > /dev/null || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that AAAA is returned when both AAAA and A records exist, signed and DO set, recursive ($n)"
+echo_i "checking that AAAA is returned when both AAAA and A records exist, signed and DO set, recursive ($n)"
 ret=0
 $DIG $DIGOPTS aaaa dual.signed +dnssec -b 10.53.0.2 @10.53.0.2 > dig.out.ns2.test$n || ret=1
 grep ::3 dig.out.ns2.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that NODATA/NOERROR is returned when both AAAA and A records exist, unsigned and DO set, recursive ($n)"
+echo_i "checking that NODATA/NOERROR is returned when both AAAA and A records exist, unsigned and DO set, recursive ($n)"
 ret=0
 $DIG $DIGOPTS aaaa dual.unsigned +dnssec -b 10.53.0.2 @10.53.0.2 > dig.out.ns2.test$n || ret=1
 grep "ANSWER: 0" dig.out.ns2.test$n > /dev/null || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that AAAA is returned when both AAAA and A records exist and query source does not match acl, recursive ($n)"
+echo_i "checking that AAAA is returned when both AAAA and A records exist and query source does not match acl, recursive ($n)"
 ret=0
 $DIG $DIGOPTS aaaa dual.unsigned -b 10.53.0.1 @10.53.0.2 > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep ::6 dig.out.ns2.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that A and not AAAA is returned when both AAAA and A records exist, signed and qtype=ANY recursive ($n)"
+echo_i "checking that A and not AAAA is returned when both AAAA and A records exist, signed and qtype=ANY recursive ($n)"
 ret=0
 $DIG $DIGOPTS any dual.signed -b 10.53.0.2 @10.53.0.2 > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "1.0.0.3" dig.out.ns2.test$n > /dev/null || ret=1
 grep "::3" dig.out.ns2.test$n > /dev/null && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that A and not AAAA is returned when both AAAA and A records exist, unsigned and qtype=ANY recursive ($n)"
+echo_i "checking that A and not AAAA is returned when both AAAA and A records exist, unsigned and qtype=ANY recursive ($n)"
 ret=0
 $DIG $DIGOPTS any dual.unsigned -b 10.53.0.2 @10.53.0.2 > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "1.0.0.6" dig.out.ns2.test$n > /dev/null || ret=1
 grep "::6" dig.out.ns2.test$n > /dev/null && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that both A and AAAA are returned when both AAAA and A records exist, signed, qtype=ANY and DO is set, recursive ($n)"
+echo_i "checking that both A and AAAA are returned when both AAAA and A records exist, signed, qtype=ANY and DO is set, recursive ($n)"
 ret=0
 $DIG $DIGOPTS any dual.signed +dnssec -b 10.53.0.2 @10.53.0.2 > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep ::3 dig.out.ns2.test$n > /dev/null || ret=1
 grep "1.0.0.3" dig.out.ns2.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that A and not AAAA is returned when both AAAA and A records exist, unsigned, qtype=ANY and DO is set, recursive ($n)"
+echo_i "checking that A and not AAAA is returned when both AAAA and A records exist, unsigned, qtype=ANY and DO is set, recursive ($n)"
 ret=0
 $DIG $DIGOPTS any dual.unsigned +dnssec -b 10.53.0.2 @10.53.0.2 > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "1.0.0.6" dig.out.ns2.test$n > /dev/null || ret=1
 grep "::6" dig.out.ns2.test$n > /dev/null && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that both A and AAAA are returned when both AAAA and A records exist, qtype=ANY and query source does not match acl, recursive ($n)"
+echo_i "checking that both A and AAAA are returned when both AAAA and A records exist, qtype=ANY and query source does not match acl, recursive ($n)"
 ret=0
 $DIG $DIGOPTS any dual.unsigned -b 10.53.0.1 @10.53.0.2 > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep 1.0.0.6 dig.out.ns2.test$n > /dev/null || ret=1
 grep ::6 dig.out.ns2.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that AAAA is returned when both AAAA and A record exists, unsigned over IPv6, recursive ($n)"
+echo_i "checking that AAAA is returned when both AAAA and A record exists, unsigned over IPv6, recursive ($n)"
 if $TESTSOCK6 fd92:7065:b8e:ffff::2
 then
 ret=0
 $DIG $DIGOPTS aaaa dual.unsigned -b fd92:7065:b8e:ffff::2 @fd92:7065:b8e:ffff::2 > dig.out.ns2.test$n || ret=1
 grep 2001:db8::6 dig.out.ns2.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 else
-echo "I: skipped."
+echo_i "skipped."
 fi
 
 n=`expr $n + 1`
-echo "I:checking that AAAA is omitted from additional section, qtype=NS ($n)"
+echo_i "checking that AAAA is omitted from additional section, qtype=NS ($n)"
 ret=0
 $DIG $DIGOPTS +add ns unsigned -b 10.53.0.2 @10.53.0.2 > dig.out.ns2.test$n || ret=1
 grep AAAA dig.out.ns2.test$n > /dev/null 2>&1 && ret=1
 grep "ADDITIONAL: 2" dig.out.ns2.test$n > /dev/null 2>&1 || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that AAAA is omitted from additional section, qtype=MX, unsigned ($n)"
+echo_i "checking that AAAA is omitted from additional section, qtype=MX, unsigned ($n)"
 ret=0
 $DIG $DIGOPTS +add +dnssec mx unsigned -b 10.53.0.2 @10.53.0.2 > dig.out.ns2.test$n || ret=1
 grep "^mx.unsigned.*AAAA" dig.out.ns2.test$n > /dev/null 2>&1 && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that AAAA is included in additional section, qtype=MX, signed ($n)"
+echo_i "checking that AAAA is included in additional section, qtype=MX, signed ($n)"
 ret=0
 $DIG $DIGOPTS +add +dnssec mx signed -b 10.53.0.2 @10.53.0.2 > dig.out.ns2.test$n || ret=1
 grep "^mx.signed.*AAAA" dig.out.ns2.test$n > /dev/null 2>&1 || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that AAAA is included in additional section, qtype=MX, unsigned, over IPV6 ($n)"
+echo_i "checking that AAAA is included in additional section, qtype=MX, unsigned, over IPV6 ($n)"
 if $TESTSOCK6 fd92:7065:b8e:ffff::2
 then
 ret=0
 $DIG $DIGOPTS +add +dnssec mx unsigned -b fd92:7065:b8e:ffff::2 @fd92:7065:b8e:ffff::2 > dig.out.ns2.test$n || ret=1
 grep "^mx.unsigned.*AAAA" dig.out.ns2.test$n > /dev/null 2>&1 || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 else
-echo "I: skipped."
+echo_i "skipped."
 fi
 
 
@@ -571,165 +572,165 @@ fi
 #      filter-aaaa { 10.53.0.3; };
 #
 n=`expr $n + 1`
-echo "I:checking that AAAA is returned when only AAAA record exists, signed, recursive with break-dnssec ($n)"
+echo_i "checking that AAAA is returned when only AAAA record exists, signed, recursive with break-dnssec ($n)"
 ret=0
 $DIG $DIGOPTS aaaa aaaa-only.signed -b 10.53.0.3 @10.53.0.3 > dig.out.ns3.test$n || ret=1
 grep ::2 dig.out.ns3.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that AAAA is returned when only AAAA record exists, unsigned, recursive with break-dnssec ($n)"
+echo_i "checking that AAAA is returned when only AAAA record exists, unsigned, recursive with break-dnssec ($n)"
 ret=0
 $DIG $DIGOPTS aaaa aaaa-only.unsigned -b 10.53.0.3 @10.53.0.3 > dig.out.ns3.test$n || ret=1
 grep ::5 dig.out.ns3.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that NODATA/NOERROR is returned when both AAAA and A records exist, signed, recursive with break-dnssec ($n)"
+echo_i "checking that NODATA/NOERROR is returned when both AAAA and A records exist, signed, recursive with break-dnssec ($n)"
 ret=0
 $DIG $DIGOPTS aaaa dual.signed -b 10.53.0.3 @10.53.0.3 > dig.out.ns3.test$n || ret=1
 grep "ANSWER: 0" dig.out.ns3.test$n > /dev/null || ret=1
 grep "status: NOERROR" dig.out.ns3.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that NODATA/NOERROR is returned when both AAAA and A records exist, unsigned, recursive with break-dnssec ($n)"
+echo_i "checking that NODATA/NOERROR is returned when both AAAA and A records exist, unsigned, recursive with break-dnssec ($n)"
 ret=0
 $DIG $DIGOPTS aaaa dual.unsigned -b 10.53.0.3 @10.53.0.3 > dig.out.ns3.test$n || ret=1
 grep "ANSWER: 0" dig.out.ns3.test$n > /dev/null || ret=1
 grep "status: NOERROR" dig.out.ns3.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that NODATA/NOERROR is returned when both AAAA and A records exist, signed and DO set, recursive with break-dnssec ($n)"
+echo_i "checking that NODATA/NOERROR is returned when both AAAA and A records exist, signed and DO set, recursive with break-dnssec ($n)"
 ret=0
 $DIG $DIGOPTS aaaa dual.signed +dnssec -b 10.53.0.3 @10.53.0.3 > dig.out.ns3.test$n || ret=1
 grep "ANSWER: 0" dig.out.ns3.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that NODATA/NOERROR is returned when both AAAA and A records exist, unsigned and DO set, recursive with break-dnssec ($n)"
+echo_i "checking that NODATA/NOERROR is returned when both AAAA and A records exist, unsigned and DO set, recursive with break-dnssec ($n)"
 ret=0
 $DIG $DIGOPTS aaaa dual.unsigned +dnssec -b 10.53.0.3 @10.53.0.3 > dig.out.ns3.test$n || ret=1
 grep "ANSWER: 0" dig.out.ns3.test$n > /dev/null || ret=1
 grep "status: NOERROR" dig.out.ns3.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that AAAA is returned when both AAAA and A records exist and query source does not match acl, recursive with break-dnssec ($n)"
+echo_i "checking that AAAA is returned when both AAAA and A records exist and query source does not match acl, recursive with break-dnssec ($n)"
 ret=0
 $DIG $DIGOPTS aaaa dual.unsigned -b 10.53.0.1 @10.53.0.3 > dig.out.ns3.test$n || ret=1
 grep "status: NOERROR" dig.out.ns3.test$n > /dev/null || ret=1
 grep ::6 dig.out.ns3.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that A and not AAAA is returned when both AAAA and A records exist, signed and qtype=ANY with break-dnssec ($n)"
+echo_i "checking that A and not AAAA is returned when both AAAA and A records exist, signed and qtype=ANY with break-dnssec ($n)"
 ret=0
 $DIG $DIGOPTS any dual.signed -b 10.53.0.3 @10.53.0.3 > dig.out.ns3.test$n || ret=1
 grep "status: NOERROR" dig.out.ns3.test$n > /dev/null || ret=1
 grep "1.0.0.3" dig.out.ns3.test$n > /dev/null || ret=1
 grep "::3" dig.out.ns3.test$n > /dev/null && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that A and not AAAA is returned when both AAAA and A records exist, unsigned and qtype=ANY with break-dnssec ($n)"
+echo_i "checking that A and not AAAA is returned when both AAAA and A records exist, unsigned and qtype=ANY with break-dnssec ($n)"
 ret=0
 $DIG $DIGOPTS any dual.unsigned -b 10.53.0.3 @10.53.0.3 > dig.out.ns3.test$n || ret=1
 grep "status: NOERROR" dig.out.ns3.test$n > /dev/null || ret=1
 grep "1.0.0.6" dig.out.ns3.test$n > /dev/null || ret=1
 grep "::6" dig.out.ns3.test$n > /dev/null && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that A and not AAAA is returned when both AAAA and A records exist, signed, qtype=ANY and DO is set with break-dnssec ($n)"
+echo_i "checking that A and not AAAA is returned when both AAAA and A records exist, signed, qtype=ANY and DO is set with break-dnssec ($n)"
 ret=0
 $DIG $DIGOPTS any dual.signed +dnssec -b 10.53.0.3 @10.53.0.3 > dig.out.ns3.test$n || ret=1
 grep "status: NOERROR" dig.out.ns3.test$n > /dev/null || ret=1
 grep "1.0.0.3" dig.out.ns3.test$n > /dev/null || ret=1
 grep ::3 dig.out.ns3.test$n > /dev/null && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that A and not AAAA is returned when both AAAA and A records exist, unsigned, qtype=ANY and DO is set with break-dnssec ($n)"
+echo_i "checking that A and not AAAA is returned when both AAAA and A records exist, unsigned, qtype=ANY and DO is set with break-dnssec ($n)"
 ret=0
 $DIG $DIGOPTS any dual.unsigned +dnssec -b 10.53.0.3 @10.53.0.3 > dig.out.ns3.test$n || ret=1
 grep "status: NOERROR" dig.out.ns3.test$n > /dev/null || ret=1
 grep "1.0.0.6" dig.out.ns3.test$n > /dev/null || ret=1
 grep "::6" dig.out.ns3.test$n > /dev/null && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that both A and AAAA are returned when both AAAA and A records exist, qtype=ANY and query source does not match acl, recursive with break-dnssec ($n)"
+echo_i "checking that both A and AAAA are returned when both AAAA and A records exist, qtype=ANY and query source does not match acl, recursive with break-dnssec ($n)"
 ret=0
 $DIG $DIGOPTS any dual.unsigned -b 10.53.0.1 @10.53.0.3 > dig.out.ns3.test$n || ret=1
 grep "status: NOERROR" dig.out.ns3.test$n > /dev/null || ret=1
 grep 1.0.0.6 dig.out.ns3.test$n > /dev/null || ret=1
 grep ::6 dig.out.ns3.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that AAAA is returned when both AAAA and A record exists, unsigned over IPv6, recursive with break-dnssec ($n)"
+echo_i "checking that AAAA is returned when both AAAA and A record exists, unsigned over IPv6, recursive with break-dnssec ($n)"
 if $TESTSOCK6 fd92:7065:b8e:ffff::3
 then
 ret=0
 $DIG $DIGOPTS aaaa dual.unsigned -b fd92:7065:b8e:ffff::3 @fd92:7065:b8e:ffff::3 > dig.out.ns3.test$n || ret=1
 grep 2001:db8::6 dig.out.ns3.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 else
-echo "I: skipped."
+echo_i "skipped."
 fi
 
 n=`expr $n + 1`
-echo "I:checking that AAAA is omitted from additional section, qtype=NS, recursive with break-dnssec ($n)"
+echo_i "checking that AAAA is omitted from additional section, qtype=NS, recursive with break-dnssec ($n)"
 ret=0
 $DIG $DIGOPTS +add ns unsigned -b 10.53.0.3 @10.53.0.3 > dig.out.ns3.test$n || ret=1
 grep AAAA dig.out.ns3.test$n > /dev/null 2>&1 && ret=1
 grep "ADDITIONAL: 2" dig.out.ns3.test$n > /dev/null 2>&1 || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that AAAA is omitted from additional section, qtype=MX, unsigned, recursive with break-dnssec ($n)"
+echo_i "checking that AAAA is omitted from additional section, qtype=MX, unsigned, recursive with break-dnssec ($n)"
 ret=0
 $DIG $DIGOPTS +add +dnssec mx unsigned -b 10.53.0.3 @10.53.0.3 > dig.out.ns3.test$n || ret=1
 grep "^mx.unsigned.*AAAA" dig.out.ns3.test$n > /dev/null 2>&1 && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that AAAA is omitted from additional section, qtype=MX, signed, recursive with break-dnssec ($n)"
+echo_i "checking that AAAA is omitted from additional section, qtype=MX, signed, recursive with break-dnssec ($n)"
 ret=0
 $DIG $DIGOPTS +add +dnssec mx signed -b 10.53.0.3 @10.53.0.3 > dig.out.ns3.test$n || ret=1
 grep "^mx.signed.*AAAA" dig.out.ns3.test$n > /dev/null 2>&1 && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that AAAA is included in additional section, qtype=MX, unsigned, over IPV6, recursive with break-dnssec ($n)"
+echo_i "checking that AAAA is included in additional section, qtype=MX, unsigned, over IPV6, recursive with break-dnssec ($n)"
 if $TESTSOCK6 fd92:7065:b8e:ffff::3
 then
 ret=0
 $DIG $DIGOPTS +add +dnssec mx unsigned -b fd92:7065:b8e:ffff::3 @fd92:7065:b8e:ffff::3 > dig.out.ns3.test$n || ret=1
 grep "^mx.unsigned.*AAAA" dig.out.ns3.test$n > /dev/null 2>&1 || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 else
-echo "I: skipped."
+echo_i "skipped."
 fi
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index 4d43f0679ba54b849b28c38f4ae96779fde0cc0b..5fb753484e9e11690aeddaa5d531bc893d77e781 100644 (file)
@@ -16,5 +16,6 @@ rm -f badoptoption.out
 rm -f nametoolong.out 
 rm -f noquestions.out 
 rm -f twoquestions.out 
+rm -f ns*/named.conf
 rm -f ns*/named.run
 rm -f ns*/named.memstats
similarity index 91%
rename from bin/tests/system/formerr/ns1/named.conf
rename to bin/tests/system/formerr/ns1/named.conf.in
index 0c591827f5ff40bbdefae0c6bd16833306077812..a9a5b1c4bf7f3c53267f5ad3360250951cd34cbc 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.15 2009/05/29 23:47:49 tbox Exp $ */
-
-controls { /* empty */ };
-
 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; };
@@ -33,4 +29,3 @@ zone "." {
        type master;
        file "root.db";
 };
-
diff --git a/bin/tests/system/formerr/setup.sh b/bin/tests/system/formerr/setup.sh
new file mode 100644 (file)
index 0000000..c69f051
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+#
+# Copyright (C)  2018  Internet Systems Consortium, Inc. ("ISC")
+#
+# 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 http://mozilla.org/MPL/2.0/.
+
+SYSTEMTESTTOP=..
+. $SYSTEMTESTTOP/conf.sh
+
+$SHELL clean.sh
+copy_setports ns1/named.conf.in ns1/named.conf
index 81114713c53bee1668f905d6fdeb36b822ca1443..4ef47ec38f4def5f057a9107968c1544721123bc 100644 (file)
@@ -19,39 +19,38 @@ SYSTEMTESTTOP=..
 
 status=0
 
-echo "I:test name to long"
-$PERL formerr.pl -a 10.53.0.1 -p 5300 nametoolong > nametoolong.out
+echo_i "test name to long"
+$PERL formerr.pl -a 10.53.0.1 -p ${PORT} nametoolong > nametoolong.out
 ans=`grep got: nametoolong.out`
 if [ "${ans}" != "got: 000080010000000000000000" ];
 then
-       echo "I:failed"; status=`expr $status + 1`;
+       echo_i "failed"; status=`expr $status + 1`;
 fi
 
-echo "I:two questions"
-$PERL formerr.pl -a 10.53.0.1 -p 5300 twoquestions > twoquestions.out
+echo_i "two questions"
+$PERL formerr.pl -a 10.53.0.1 -p ${PORT} twoquestions > twoquestions.out
 ans=`grep got: twoquestions.out`
 if [ "${ans}" != "got: 000080010000000000000000" ];
 then
-       echo "I:failed"; status=`expr $status + 1`;
+       echo_i "failed"; status=`expr $status + 1`;
 fi
 
 # this one arguable could be NOERORR.
-echo "I:no questions"
-$PERL formerr.pl -a 10.53.0.1 -p 5300 noquestions > noquestions.out
+echo_i "no questions"
+$PERL formerr.pl -a 10.53.0.1 -p ${PORT} noquestions > noquestions.out
 ans=`grep got: noquestions.out`
 if [ "${ans}" != "got: 000080010000000000000000" ];
 then
-       echo "I:failed"; status=`expr $status + 1`;
+       echo_i "failed"; status=`expr $status + 1`;
 fi
 
-echo "I:bad OPT option"
-$PERL formerr.pl -a 10.53.0.1 -p 5300 badoptoption > badoptoption.out
+echo_i "bad OPT option"
+$PERL formerr.pl -a 10.53.0.1 -p ${PORT} badoptoption > badoptoption.out
 ans=`grep got: badoptoption.out`
 if [ "${ans}" != "got: 00008001000100000000000100000100020000291000000000000000" ];
 then
-       echo "I:failed"; status=`expr $status + 1`;
+       echo_i "failed"; status=`expr $status + 1`;
 fi
 
-echo "I:exit status: $status"
-
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index 5e21ab15e516f15dc2843461de923413c82f9efe..31389d522f1a54b0b04b0a5af15f804c56b92dc2 100644 (file)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: clean.sh,v 1.6 2007/09/26 03:22:43 marka Exp $
-
 #
 # Clean up after forward tests.
 #
 rm -f dig.out.*
+rm -f */named.conf
 rm -f */named.memstats
 rm -f */named.run
similarity index 93%
rename from bin/tests/system/forward/ns1/named.conf
rename to bin/tests/system/forward/ns1/named.conf.in
index 8c3fcfa47f7aea477b53205c27163c6dd22b839f..71c059f62a81155c623d27bd09941d2b4a78df19 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.11 2007/06/19 23:47:03 tbox Exp $ */
-
-controls { /* empty */ };
-
 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 93%
rename from bin/tests/system/forward/ns2/named.conf
rename to bin/tests/system/forward/ns2/named.conf.in
index 7a65ed399a9bdb618f0e9b39d8e94c9b2ae0b32b..d9489c2fa98d9b577eca1f4106f662905fe354a4 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.11 2007/06/19 23:47:03 tbox Exp $ */
-
-controls { /* empty */ };
-
 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 93%
rename from bin/tests/system/forward/ns3/named.conf
rename to bin/tests/system/forward/ns3/named.conf.in
index 459c34958af22670ff0475b81228626149e8ec7e..c9e93c5bfd4c09a6186b6bf0842dda0379c11bcd 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.11 2007/06/19 23:47:03 tbox Exp $ */
-
-controls { /* empty */ };
-
 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; };
@@ -53,4 +49,3 @@ zone "example3." {
        forward only;
        forwarders { };
 };
-
similarity index 93%
rename from bin/tests/system/forward/ns4/named.conf
rename to bin/tests/system/forward/ns4/named.conf.in
index 86b29d9412cf89b1660a46158c0285119e347d77..8e335cb94ae6a77208263a32d169be3b2846799c 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.11 2007/06/19 23:47:03 tbox Exp $ */
-
-controls { /* empty */ };
-
 options {
        query-source address 10.53.0.4;
        notify-source 10.53.0.4;
        transfer-source 10.53.0.4;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.4; };
        listen-on-v6 { none; };
similarity index 91%
rename from bin/tests/system/forward/ns5/named.conf
rename to bin/tests/system/forward/ns5/named.conf.in
index 960a242d40874d0d61aa80012acac4f1cf30a472..6d7aa41dcf150bbe0fa45da6b9f8ad8f7dd38088 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.3 2011/10/13 22:48:23 tbox Exp $ */
-
-controls { /* empty */ };
-
 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";
        listen-on { 10.53.0.5; };
        listen-on-v6 { none; };
diff --git a/bin/tests/system/forward/setup.sh b/bin/tests/system/forward/setup.sh
new file mode 100644 (file)
index 0000000..01a86be
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/sh
+#
+# Copyright (C)  2018  Internet Systems Consortium, Inc. ("ISC")
+#
+# 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 http://mozilla.org/MPL/2.0/.
+
+SYSTEMTESTTOP=..
+. $SYSTEMTESTTOP/conf.sh
+
+$SHELL clean.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
+copy_setports ns4/named.conf.in ns4/named.conf
+copy_setports ns5/named.conf.in ns5/named.conf
index 5a99c6df4150d66166cee608d6669aec0e74f7eb..87fb5eeea6475b23d299827441d8906c487178dc 100644 (file)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: tests.sh,v 1.9 2011/10/13 22:48:23 tbox Exp $
-
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
+DIGOPTS="-p ${PORT}"
+
 root=10.53.0.1
 hidden=10.53.0.2
 f1=10.53.0.3
@@ -25,117 +25,117 @@ f2=10.53.0.4
 
 status=0
 
-echo "I:checking that a forward zone overrides global forwarders"
+echo_i "checking that a forward zone overrides global forwarders"
 ret=0
-$DIG txt.example1. txt @$hidden -p 5300 > dig.out.hidden || ret=1
-$DIG txt.example1. txt @$f1 -p 5300 > dig.out.f1 || ret=1
+$DIG $DIGOPTS txt.example1. txt @$hidden > dig.out.hidden || ret=1
+$DIG $DIGOPTS txt.example1. txt @$f1 > dig.out.f1 || ret=1
 $PERL ../digcomp.pl dig.out.hidden dig.out.f1 || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that a forward first zone no forwarders recurses"
+echo_i "checking that a forward first zone no forwarders recurses"
 ret=0
-$DIG txt.example2. txt @$root -p 5300 > dig.out.root || ret=1
-$DIG txt.example2. txt @$f1 -p 5300 > dig.out.f1 || ret=1
+$DIG $DIGOPTS txt.example2. txt @$root > dig.out.root || ret=1
+$DIG $DIGOPTS txt.example2. txt @$f1 > dig.out.f1 || ret=1
 $PERL ../digcomp.pl dig.out.root dig.out.f1 || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that a forward only zone no forwarders fails"
+echo_i "checking that a forward only zone no forwarders fails"
 ret=0
-$DIG txt.example2. txt @$root -p 5300 > dig.out.root || ret=1
-$DIG txt.example2. txt @$f1 -p 5300 > dig.out.f1 || ret=1
+$DIG $DIGOPTS txt.example2. txt @$root > dig.out.root || ret=1
+$DIG $DIGOPTS txt.example2. txt @$f1 > dig.out.f1 || ret=1
 $PERL ../digcomp.pl dig.out.root dig.out.f1 || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that global forwarders work"
+echo_i "checking that global forwarders work"
 ret=0
-$DIG txt.example4. txt @$hidden -p 5300 > dig.out.hidden || ret=1
-$DIG txt.example4. txt @$f1 -p 5300 > dig.out.f1 || ret=1
+$DIG $DIGOPTS txt.example4. txt @$hidden > dig.out.hidden || ret=1
+$DIG $DIGOPTS txt.example4. txt @$f1 > dig.out.f1 || ret=1
 $PERL ../digcomp.pl dig.out.hidden dig.out.f1 || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that a forward zone works"
+echo_i "checking that a forward zone works"
 ret=0
-$DIG txt.example1. txt @$hidden -p 5300 > dig.out.hidden || ret=1
-$DIG txt.example1. txt @$f2 -p 5300 > dig.out.f2 || ret=1
+$DIG $DIGOPTS txt.example1. txt @$hidden > dig.out.hidden || ret=1
+$DIG $DIGOPTS txt.example1. txt @$f2 > dig.out.f2 || ret=1
 $PERL ../digcomp.pl dig.out.hidden dig.out.f2 || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that forwarding doesn't spontaneously happen"
+echo_i "checking that forwarding doesn't spontaneously happen"
 ret=0
-$DIG txt.example2. txt @$root -p 5300 > dig.out.root || ret=1
-$DIG txt.example2. txt @$f2 -p 5300 > dig.out.f2 || ret=1
+$DIG $DIGOPTS txt.example2. txt @$root > dig.out.root || ret=1
+$DIG $DIGOPTS txt.example2. txt @$f2 > dig.out.f2 || ret=1
 $PERL ../digcomp.pl dig.out.root dig.out.f2 || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that a forward zone with no specified policy works"
+echo_i "checking that a forward zone with no specified policy works"
 ret=0
-$DIG txt.example3. txt @$hidden -p 5300 > dig.out.hidden || ret=1
-$DIG txt.example3. txt @$f2 -p 5300 > dig.out.f2 || ret=1
+$DIG $DIGOPTS txt.example3. txt @$hidden > dig.out.hidden || ret=1
+$DIG $DIGOPTS txt.example3. txt @$f2 > dig.out.f2 || ret=1
 $PERL ../digcomp.pl dig.out.hidden dig.out.f2 || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that a forward only doesn't recurse"
+echo_i "checking that a forward only doesn't recurse"
 ret=0
-$DIG txt.example5. txt @$f2 -p 5300 > dig.out.f2 || ret=1
+$DIG $DIGOPTS txt.example5. txt @$f2 > dig.out.f2 || ret=1
 grep "SERVFAIL" dig.out.f2 > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking for negative caching of forwarder response"
+echo_i "checking for negative caching of forwarder response"
 # prime the cache, shutdown the forwarder then check that we can
 # get the answer from the cache.  restart forwarder.
 ret=0
-$DIG nonexist. txt @10.53.0.5 -p 5300 > dig.out.f2 || ret=1
+$DIG $DIGOPTS nonexist. txt @10.53.0.5 > dig.out.f2 || ret=1
 grep "status: NXDOMAIN" dig.out.f2 > /dev/null || ret=1
 $PERL ../stop.pl . ns4 || ret=1
-$DIG nonexist. txt @10.53.0.5 -p 5300 > dig.out.f2 || ret=1
+$DIG $DIGOPTS nonexist. txt @10.53.0.5 > dig.out.f2 || ret=1
 grep "status: NXDOMAIN" dig.out.f2 > /dev/null || ret=1
-$PERL ../start.pl --restart --noclean . ns4 || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+$PERL ../start.pl --restart --noclean --port ${PORT} . ns4 || ret=1
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that forward only zone overrides empty zone"
+echo_i "checking that forward only zone overrides empty zone"
 ret=0
-$DIG 1.0.10.in-addr.arpa TXT @10.53.0.4 -p 5300 > dig.out.f2
+$DIG $DIGOPTS 1.0.10.in-addr.arpa TXT @10.53.0.4 > dig.out.f2
 grep "status: NOERROR" dig.out.f2 > /dev/null || ret=1
-$DIG 2.0.10.in-addr.arpa TXT @10.53.0.4 -p 5300 > dig.out.f2
+$DIG $DIGOPTS 2.0.10.in-addr.arpa TXT @10.53.0.4 > dig.out.f2
 grep "status: NXDOMAIN" dig.out.f2 > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that DS lookups for grafting forward zones are isolated"
+echo_i "checking that DS lookups for grafting forward zones are isolated"
 ret=0
-$DIG grafted A @10.53.0.4 -p 5300 > dig.out.q1
-$DIG grafted DS @10.53.0.4 -p 5300 > dig.out.q2
-$DIG grafted A @10.53.0.4 -p 5300 > dig.out.q3
-$DIG grafted AAAA @10.53.0.4 -p 5300 > dig.out.q4
+$DIG $DIGOPTS grafted A @10.53.0.4 > dig.out.q1
+$DIG $DIGOPTS grafted DS @10.53.0.4 > dig.out.q2
+$DIG $DIGOPTS grafted A @10.53.0.4 > dig.out.q3
+$DIG $DIGOPTS grafted AAAA @10.53.0.4 > dig.out.q4
 grep "status: NOERROR" dig.out.q1 > /dev/null || ret=1
 grep "status: NXDOMAIN" dig.out.q2 > /dev/null || ret=1
 grep "status: NOERROR" dig.out.q3 > /dev/null || ret=1
 grep "status: NOERROR" dig.out.q4 > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that rfc1918 inherited 'forward first;' zones are warned about"
+echo_i "checking that rfc1918 inherited 'forward first;' zones are warned about"
 ret=0
 $CHECKCONF rfc1918-inherited.conf | grep "forward first;" >/dev/null || ret=1
 $CHECKCONF rfc1918-notinherited.conf | grep "forward first;" >/dev/null && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that ULA inherited 'forward first;' zones are warned about"
+echo_i "checking that ULA inherited 'forward first;' zones are warned about"
 ret=0
 $CHECKCONF ula-inherited.conf | grep "forward first;" >/dev/null || ret=1
 $CHECKCONF ula-notinherited.conf | grep "forward first;" >/dev/null && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index c7d5d63bd40016b25bd223a8b9d2708e9cc6291f..4b235af3c0b92a8bdcda58bfbd8b1a5cd43756ac 100644 (file)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: clean.sh,v 1.9 2007/09/26 03:22:43 marka Exp $
-
 #
 # Clean up after glue tests.
 #
 
 rm -f dig.out ns1/cache
+rm -f */named.conf
 rm -f */named.memstats
 rm -f */named.run
similarity index 92%
rename from bin/tests/system/glue/ns1/named.conf
rename to bin/tests/system/glue/ns1/named.conf.in
index 51952fba464937e5d7e36a282d535769f2ec173d..d4fde30a208230d9009a9d7fa46b7328d0664ae0 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.17 2009/01/30 23:47:50 tbox Exp $ */
-
-controls { /* empty */ };
-
 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; };
index 4fa1aad0a961c0408dbe9b5555083c232712b20d..6b81131ea15ec6edd26bb8ccbc7d500d456f4406 100644 (file)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: setup.sh,v 1.6 2007/06/19 23:47:03 tbox Exp $
+SYSTEMTESTTOP=..
+. $SYSTEMTESTTOP/conf.sh
+
+$SHELL clean.sh
+copy_setports ns1/named.conf.in ns1/named.conf
 
 cd ns1 && cp -f cache.in cache
index b9287d86e256cf29389e52692c272e40b2a899cd..9b09dc073195a5f6caf1537d4a575491396ea884 100644 (file)
@@ -15,8 +15,6 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: tests.sh,v 1.9 2007/06/19 23:47:03 tbox Exp $
-
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
@@ -24,23 +22,25 @@ SYSTEMTESTTOP=..
 # Do glue tests.
 #
 
+DIGOPTS="+norec -p ${PORT}"
+
 status=0
 
-echo "I:testing that a ccTLD referral gets a full glue set from the root zone"
-$DIG +norec @10.53.0.1 -p 5300 foo.bar.fi. A >dig.out || status=1
+echo_i "testing that a ccTLD referral gets a full glue set from the root zone"
+$DIG $DIGOPTS @10.53.0.1 foo.bar.fi. A >dig.out || status=1
 $PERL ../digcomp.pl --lc fi.good dig.out || status=1
 
-echo "I:testing that we find glue A RRs we are authoritative for"
+echo_i "testing that we find glue A RRs we are authoritative for"
 $DIG +norec @10.53.0.1 -p 5300 foo.bar.xx. a >dig.out || status=1
 $PERL ../digcomp.pl xx.good dig.out || status=1
 
-echo "I:testing that we find glue A/AAAA RRs in the cache"
+echo_i "testing that we find glue A/AAAA RRs in the cache"
 $DIG +norec @10.53.0.1 -p 5300 foo.bar.yy. a >dig.out || status=1
 $PERL ../digcomp.pl yy.good dig.out || status=1
 
-echo "I:testing that we don't find out-of-zone glue"
-$DIG +norec @10.53.0.1 -p 5300 example.net. a > dig.out || status=1
+echo_i "testing that we don't find out-of-zone glue"
+$DIG $DIGOPTS @10.53.0.1 example.net. a > dig.out || status=1
 $PERL ../digcomp.pl noglue.good dig.out || status=1
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index a9705a382b3821fd5977f3bb1b29f7f1922a99a5..4b218c65b9d01a5aa915ba75d1856434fc0cc981 100644 (file)
@@ -12,6 +12,7 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
+rm -f */named.conf
 rm -f */named.memstats
 rm -f */named.run
 rm -f */trusted.conf
@@ -83,7 +84,6 @@ rm -f ns4/K*
 rm -f ns4/noixfr.db
 rm -f ns4/noixfr.db.jnl
 rm -f ns5/K*
-rm -f ns5/named.conf
 rm -f ns5/bits.bk
 rm -f ns5/bits.bk.jnl
 rm -f ns5/bits.bk.signed
similarity index 94%
rename from bin/tests/system/inline/ns1/named.conf
rename to bin/tests/system/inline/ns1/named.conf.in
index b86396239d1ffc6696e96c2f0f0ce7038c4f101c..21ca9f9550ffb97e1c095edaa0bae963b0efbf32 100644 (file)
@@ -14,8 +14,6 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.3 2011/10/25 01:54:20 marka Exp $ */
-
 // NS1
 
 controls { /* empty */ };
@@ -24,7 +22,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 91%
rename from bin/tests/system/inline/ns2/named.conf
rename to bin/tests/system/inline/ns2/named.conf.in
index bfe9f5abbf64aa2a908507dc0047448169388fd9..a2aedcbd5f1b425bc84ac65fbc831fa9c7e1a968 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.4 2012/02/23 07:09:28 tbox Exp $ */
-
 // NS2
 
 include "../../common/rndc.key";
 
-controls { inet 10.53.0.2 port 9953 allow { any; } keys { rndc_key; }; };
+controls {
+       inet 10.53.0.2 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
+};
 
 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 94%
rename from bin/tests/system/inline/ns3/named.conf
rename to bin/tests/system/inline/ns3/named.conf.in
index 93e7b69bc06fb22e8d587a749034288f72b2adb1..7d6359b6a27ce964809df214995afc5d60a846eb 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.8 2012/02/23 06:53:15 marka Exp $ */
-
 // NS3
 
 include "../../common/rndc.key";
 
-controls { inet 10.53.0.3 port 9953 allow { any; } keys { rndc_key; }; };
+controls {
+       inet 10.53.0.3 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
+};
 
 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; };
similarity index 91%
rename from bin/tests/system/inline/ns4/named.conf
rename to bin/tests/system/inline/ns4/named.conf.in
index 3195b4f08835bf4ec1569ea3f8596a68e53f8b26..8b1816e0787f36943e0593dd5f2d64937cbe2664 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.2 2011/08/30 23:46:52 tbox Exp $ */
-
-// NS2
-
-controls { /* empty */ };
+// NS4
 
 options {
        query-source address 10.53.0.4;
        notify-source 10.53.0.4;
        transfer-source 10.53.0.4;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.4; };
        listen-on-v6 { none; };
index 9f19fec9c8feb1f79cb3eb9182b2a3154f23e00c..fc7cfbc6029f7a67f3b58c16a2796af88fa1f938 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf.post,v 1.2 2011/10/12 00:10:19 marka Exp $ */
-
 // NS5
 
 include "../../common/rndc.key";
 
-controls { inet 10.53.0.5 port 9953 allow { any; } keys { rndc_key; }; };
+controls {
+       inet 10.53.0.5 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
+};
 
 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";
        listen-on { 10.53.0.5; };
        listen-on-v6 { none; };
index fc989a981440bdd862ca3a95b56a6d55be3bcc66..59720d6b59fad4bab542740fb2a93271296393c2 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf.pre,v 1.2 2011/10/12 00:10:20 marka Exp $ */
-
 // NS5
 
 include "../../common/rndc.key";
 
-controls { inet 10.53.0.5 port 9953 allow { any; } keys { rndc_key; }; };
+controls {
+       inet 10.53.0.5 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
+};
 
 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";
        listen-on { 10.53.0.5; };
        listen-on-v6 { none; };
similarity index 88%
rename from bin/tests/system/inline/ns6/named.conf
rename to bin/tests/system/inline/ns6/named.conf.in
index b7108ad7062f95421271c9cccb7c4ce3ed796f82..6e2bcf190587bec1788f248c02d47e892201d71b 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.2 2011/10/25 01:54:21 marka Exp $ */
-
 // NS6
 
 include "../../common/rndc.key";
 
-controls { inet 10.53.0.6 port 9953 allow { any; } keys { rndc_key; }; };
+controls {
+       inet 10.53.0.6 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
+};
 
 options {
        query-source address 10.53.0.6;
        notify-source 10.53.0.6;
        transfer-source 10.53.0.6;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.6; };
        listen-on-v6 { none; };
similarity index 95%
rename from bin/tests/system/inline/ns7/named.conf
rename to bin/tests/system/inline/ns7/named.conf.in
index b2046c6c06eb4f2b50faecad4690a4939ffd8120..9f25b363f03fc6e65476931e25a2d8e574aae743 100644 (file)
 
 include "../../common/rndc.key";
 
-controls { inet 10.53.0.7 port 9953 allow { any; } keys { rndc_key; }; };
+controls {
+       inet 10.53.0.7 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
+};
 
 options {
        query-source address 10.53.0.7;
        notify-source 10.53.0.7;
        transfer-source 10.53.0.7;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.7; };
        listen-on-v6 { none; };
index 5875440567801ae394e1359417f318055e76dd01..70a4bd929020f5bc6844800de16c290065c5c2fc 100644 (file)
@@ -41,7 +41,13 @@ touch ns4/trusted.conf
 cp ns4/noixfr.db.in ns4/noixfr.db
 rm -f ns4/noixfr.db.jnl
 
-cp ns5/named.conf.pre ns5/named.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
+copy_setports ns4/named.conf.in ns4/named.conf
+copy_setports ns5/named.conf.pre ns5/named.conf
+copy_setports ns6/named.conf.in ns6/named.conf
+copy_setports ns7/named.conf.in ns7/named.conf
 
 (cd ns3; $SHELL -e sign.sh)
 (cd ns1; $SHELL -e sign.sh)
index c20bf57a749a32ac26bbb65dc10fc6d86aacf9a3..2ef871071b2bd6e1b72bc01a9066a697e76cdb15 100755 (executable)
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
-DIGOPTS="+tcp +dnssec"
+DIGOPTS="+tcp +dnssec -p ${PORT}"
+RNDCCMD="$RNDC -c $SYSTEMTESTTOP/common/rndc.conf -p ${CONTROLPORT} -s"
 
 status=0
 n=0
 
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing -nsec3param 1 0 0 - nsec3 > /dev/null 2>&1
+$RNDCCMD 10.53.0.3 signing -nsec3param 1 0 0 - nsec3 > /dev/null 2>&1
 
 for i in 1 2 3 4 5 6 7 8 9 0
 do
-       nsec3param=`$DIG +short @10.53.0.3 -p 5300 nsec3param nsec3.`
+       nsec3param=`$DIG $DIGOPTS +nodnssec +short @10.53.0.3 nsec3param nsec3.`
        test "$nsec3param" = "1 0 0 -" && break
        sleep 1
 done
@@ -35,400 +36,400 @@ done
 for i in 1 2 3 4 5 6 7 8 9 0
 do
         ans=0
-        $RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing -nsec3param 1 0 0 - retransfer3 > /dev/null 2>&1 || ans=1
+        $RNDCCMD 10.53.0.3 signing -nsec3param 1 0 0 - retransfer3 > /dev/null 2>&1 || ans=1
        [ $ans = 0 ] && break
+        sleep 1
 done
 
 for i in 1 2 3 4 5 6 7 8 9 0
 do
-       nsec3param=`$DIG +short @10.53.0.3 -p 5300 nsec3param retransfer3.`
+       nsec3param=`$DIG $DIGOPTS +nodnssec +short @10.53.0.3 nsec3param retransfer3.`
        test "$nsec3param" = "1 0 0 -" && break
        sleep 1
 done
 
 n=`expr $n + 1`
-echo "I:checking that rrsigs are replaced with ksk only ($n)"
+echo_i "checking that rrsigs are replaced with ksk only ($n)"
 ret=0
-$DIG @10.53.0.3 -p 5300 axfr nsec3. |
+$DIG $DIGOPTS @10.53.0.3 axfr nsec3. |
        awk '/RRSIG NSEC3/ {a[$1]++} END { for (i in a) {if (a[i] != 1) exit (1)}}' || ret=1
-#$DIG @10.53.0.3 -p 5300 axfr nsec3. | grep -w NSEC | grep -v "IN.RRSIG.NSEC" 
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that the zone is signed on initial transfer ($n)"
+echo_i "checking that the zone is signed on initial transfer ($n)"
 ret=0
 for i in 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10
 do
        ret=0
-       $RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing -list bits > signing.out.test$n 2>&1
+       $RNDCCMD 10.53.0.3 signing -list bits > signing.out.test$n 2>&1
        keys=`grep '^Done signing' signing.out.test$n | wc -l`
        [ $keys = 2 ] || ret=1
        if [ $ret = 0 ]; then break; fi
        sleep 1
 done
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking expired signatures are updated on load ($n)"
+echo_i "checking expired signatures are updated on load ($n)"
 ret=0
-$DIG $DIGOPTS @10.53.0.3 -p 5300 +noall +answer +dnssec expired SOA > dig.out.ns3.test$n
+$DIG $DIGOPTS @10.53.0.3 +noall +answer +dnssec expired SOA > dig.out.ns3.test$n
 expiry=`awk '$4 == "RRSIG" { print $9 }' dig.out.ns3.test$n`
 [ "$expiry" = "20110101000000" ] && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking removal of private type record via 'rndc signing -clear' ($n)"
+echo_i "checking removal of private type record via 'rndc signing -clear' ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing -list bits > signing.out.test$n 2>&1
+$RNDCCMD 10.53.0.3 signing -list bits > signing.out.test$n 2>&1
 keys=`sed -n -e 's/Done signing with key \(.*\)$/\1/p' signing.out.test$n`
 for key in $keys; do
-       $RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing -clear ${key} bits > /dev/null || ret=1
+       $RNDCCMD 10.53.0.3 signing -clear ${key} bits > /dev/null || ret=1
        break;  # We only want to remove 1 record for now.
-done 2>&1 |sed 's/^/I:ns3 /'
+done 2>&1 |sed 's/^/ns3 /' | cat_i
 
 for i in 1 2 3 4 5 6 7 8 9 10
 do
        ans=0
-       $RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing -list bits > signing.out.test$n 2>&1
+       $RNDCCMD 10.53.0.3 signing -list bits > signing.out.test$n 2>&1
         num=`grep "Done signing with" signing.out.test$n | wc -l`
        [ $num = 1 ] && break
        sleep 1
 done
 [ $ans = 0 ] || ret=1
 
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking private type was properly signed ($n)"
+echo_i "checking private type was properly signed ($n)"
 ret=0
-$DIG $DIGOPTS @10.53.0.6 -p 5300 bits TYPE65534 > dig.out.ns6.test$n
+$DIG $DIGOPTS @10.53.0.6 bits TYPE65534 > dig.out.ns6.test$n
 grep "ANSWER: 2," dig.out.ns6.test$n > /dev/null || ret=1
 grep "flags:.* ad[ ;]" dig.out.ns6.test$n > /dev/null || ret=1
 
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking removal of remaining private type record via 'rndc signing -clear all' ($n)"
+echo_i "checking removal of remaining private type record via 'rndc signing -clear all' ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing -clear all bits > /dev/null || ret=1
+$RNDCCMD 10.53.0.3 signing -clear all bits > /dev/null || ret=1
 
 for i in 1 2 3 4 5 6 7 8 9 10
 do
        ans=0
-       $RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing -list bits > signing.out.test$n 2>&1
+       $RNDCCMD 10.53.0.3 signing -list bits > signing.out.test$n 2>&1
        grep "No signing records found" signing.out.test$n > /dev/null || ans=1
        [ $ans = 1 ] || break
        sleep 1
 done
 [ $ans = 0 ] || ret=1
 
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking negative private type response was properly signed ($n)"
+echo_i "checking negative private type response was properly signed ($n)"
 ret=0
 sleep 1
-$DIG $DIGOPTS @10.53.0.6 -p 5300 bits TYPE65534 > dig.out.ns6.test$n
+$DIG $DIGOPTS @10.53.0.6 bits TYPE65534 > dig.out.ns6.test$n
 grep "status: NOERROR" dig.out.ns6.test$n > /dev/null || ret=1
 grep "ANSWER: 0," dig.out.ns6.test$n > /dev/null || ret=1
 grep "flags:.* ad[ ;]" dig.out.ns6.test$n > /dev/null || ret=1
 
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 $NSUPDATE << EOF
 zone bits
-server 10.53.0.2 5300
+server 10.53.0.2 ${PORT}
 update add added.bits 0 A 1.2.3.4
 send
 EOF
 
 n=`expr $n + 1`
-echo "I:checking that the record is added on the hidden master ($n)"
+echo_i "checking that the record is added on the hidden master ($n)"
 ret=0
-$DIG $DIGOPTS @10.53.0.2 -p 5300 added.bits A > dig.out.ns2.test$n
+$DIG $DIGOPTS @10.53.0.2 added.bits A > dig.out.ns2.test$n
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns2.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that update has been transfered and has been signed ($n)"
+echo_i "checking that update has been transfered and has been signed ($n)"
 ret=0
 for i in 1 2 3 4 5 6 7 8 9 10
 do
        ret=0
-       $DIG $DIGOPTS @10.53.0.3 -p 5300 added.bits A > dig.out.ns3.test$n
+       $DIG $DIGOPTS @10.53.0.3 added.bits A > dig.out.ns3.test$n
        grep "status: NOERROR" dig.out.ns3.test$n > /dev/null || ret=1
        grep "ANSWER: 2," dig.out.ns3.test$n > /dev/null || ret=1
        if [ $ret = 0 ]; then break; fi
        sleep 1
 done
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 $NSUPDATE << EOF
 zone bits
-server 10.53.0.2 5300
+server 10.53.0.2 ${PORT}
 update add bits 0 SOA ns2.bits. . 2011072400 20 20 1814400 3600
 send
 EOF
 
 n=`expr $n + 1`
-echo "I:checking YYYYMMDDVV (2011072400) serial on hidden master ($n)"
+echo_i "checking YYYYMMDDVV (2011072400) serial on hidden master ($n)"
 ret=0
-$DIG $DIGOPTS @10.53.0.2 -p 5300 bits SOA > dig.out.ns2.test$n
+$DIG $DIGOPTS @10.53.0.2 bits SOA > dig.out.ns2.test$n
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns2.test$n > /dev/null || ret=1
 grep "2011072400" dig.out.ns2.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking YYYYMMDDVV (2011072400) serial in signed zone ($n)"
+echo_i "checking YYYYMMDDVV (2011072400) serial in signed zone ($n)"
 for i in 1 2 3 4 5 6 7 8 9 10
 do
        ret=0
-       $DIG $DIGOPTS @10.53.0.3 -p 5300 bits SOA > dig.out.ns3.test$n
+       $DIG $DIGOPTS @10.53.0.3 bits SOA > dig.out.ns3.test$n
        grep "status: NOERROR" dig.out.ns3.test$n > /dev/null || ret=1
        grep "ANSWER: 2," dig.out.ns3.test$n > /dev/null || ret=1
        grep "2011072400" dig.out.ns3.test$n > /dev/null || ret=1
        if [ $ret = 0 ]; then break; fi
        sleep 1
 done
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that the zone is signed on initial transfer, noixfr ($n)"
+echo_i "checking that the zone is signed on initial transfer, noixfr ($n)"
 ret=0
 for i in 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10
 do
        ret=0
-       $RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing -list noixfr > signing.out.test$n 2>&1
+       $RNDCCMD 10.53.0.3 signing -list noixfr > signing.out.test$n 2>&1
        keys=`grep '^Done signing' signing.out.test$n | wc -l`
        [ $keys = 2 ] || ret=1
        if [ $ret = 0 ]; then break; fi
        sleep 1
 done
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 $NSUPDATE << EOF
 zone noixfr
-server 10.53.0.4 5300
+server 10.53.0.4 ${PORT}
 update add added.noixfr 0 A 1.2.3.4
 send
 EOF
 
 n=`expr $n + 1`
-echo "I:checking that the record is added on the hidden master, noixfr ($n)"
+echo_i "checking that the record is added on the hidden master, noixfr ($n)"
 ret=0
-$DIG $DIGOPTS @10.53.0.4 -p 5300 added.noixfr A > dig.out.ns4.test$n
+$DIG $DIGOPTS @10.53.0.4 added.noixfr A > dig.out.ns4.test$n
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns4.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that update has been transfered and has been signed, noixfr ($n)"
+echo_i "checking that update has been transfered and has been signed, noixfr ($n)"
 ret=0
 for i in 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10
 do
        ret=0
-       $DIG $DIGOPTS @10.53.0.3 -p 5300 added.noixfr A > dig.out.ns3.test$n
+       $DIG $DIGOPTS @10.53.0.3 added.noixfr A > dig.out.ns3.test$n
        grep "status: NOERROR" dig.out.ns3.test$n > /dev/null || ret=1
        grep "ANSWER: 2," dig.out.ns3.test$n > /dev/null || ret=1
        if [ $ret = 0 ]; then break; fi
        sleep 1
 done
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 $NSUPDATE << EOF
 zone noixfr
-server 10.53.0.4 5300
+server 10.53.0.4 ${PORT}
 update add noixfr 0 SOA ns4.noixfr. . 2011072400 20 20 1814400 3600
 send
 EOF
 
 n=`expr $n + 1`
-echo "I:checking YYYYMMDDVV (2011072400) serial on hidden master, noixfr ($n)"
+echo_i "checking YYYYMMDDVV (2011072400) serial on hidden master, noixfr ($n)"
 ret=0
-$DIG $DIGOPTS @10.53.0.4 -p 5300 noixfr SOA > dig.out.ns4.test$n
+$DIG $DIGOPTS @10.53.0.4 noixfr SOA > dig.out.ns4.test$n
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns4.test$n > /dev/null || ret=1
 grep "2011072400" dig.out.ns4.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking YYYYMMDDVV (2011072400) serial in signed zone, noixfr ($n)"
+echo_i "checking YYYYMMDDVV (2011072400) serial in signed zone, noixfr ($n)"
 for i in 1 2 3 4 5 6 7 8 9 10
 do
        ret=0
-       $DIG $DIGOPTS @10.53.0.3 -p 5300 noixfr SOA > dig.out.ns3.test$n
+       $DIG $DIGOPTS @10.53.0.3 noixfr SOA > dig.out.ns3.test$n
        grep "status: NOERROR" dig.out.ns3.test$n > /dev/null || ret=1
        grep "ANSWER: 2," dig.out.ns3.test$n > /dev/null || ret=1
        grep "2011072400" dig.out.ns3.test$n > /dev/null || ret=1
        if [ $ret = 0 ]; then break; fi
        sleep 1
 done
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that the master zone signed on initial load ($n)"
+echo_i "checking that the master zone signed on initial load ($n)"
 ret=0
 for i in 1 2 3 4 5 6 7 8 9 10
 do
        ret=0
-       $RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing -list master  > signing.out.test$n 2>&1
+       $RNDCCMD 10.53.0.3 signing -list master  > signing.out.test$n 2>&1
        keys=`grep '^Done signing' signing.out.test$n | wc -l`
        [ $keys = 2 ] || ret=1
        if [ $ret = 0 ]; then break; fi
        sleep 1
 done
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking removal of private type record via 'rndc signing -clear' (master) ($n)"
+echo_i "checking removal of private type record via 'rndc signing -clear' (master) ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing -list master > signing.out.test$n 2>&1
+$RNDCCMD 10.53.0.3 signing -list master > signing.out.test$n 2>&1
 keys=`sed -n -e 's/Done signing with key \(.*\)$/\1/p' signing.out.test$n`
 for key in $keys; do
-       $RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing -clear ${key} master > /dev/null || ret=1
+       $RNDCCMD 10.53.0.3 signing -clear ${key} master > /dev/null || ret=1
        break;  # We only want to remove 1 record for now.
-done 2>&1 |sed 's/^/I:ns3 /'
+done 2>&1 |sed 's/^/ns3 /' | cat_i
 
 for i in 1 2 3 4 5 6 7 8 9
 do
        ans=0
-       $RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing -list master > signing.out.test$n 2>&1
+       $RNDCCMD 10.53.0.3 signing -list master > signing.out.test$n 2>&1
         num=`grep "Done signing with" signing.out.test$n | wc -l`
        [ $num = 1 ] && break
        sleep 1
 done
 [ $ans = 0 ] || ret=1
 
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking private type was properly signed (master) ($n)"
+echo_i "checking private type was properly signed (master) ($n)"
 ret=0
-$DIG $DIGOPTS @10.53.0.6 -p 5300 master TYPE65534 > dig.out.ns6.test$n
+$DIG $DIGOPTS @10.53.0.6 master TYPE65534 > dig.out.ns6.test$n
 grep "ANSWER: 2," dig.out.ns6.test$n > /dev/null || ret=1
 grep "flags:.* ad[ ;]" dig.out.ns6.test$n > /dev/null || ret=1
 
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking removal of remaining private type record via 'rndc signing -clear' (master) ($n)"
+echo_i "checking removal of remaining private type record via 'rndc signing -clear' (master) ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing -clear all master > /dev/null || ret=1
+$RNDCCMD 10.53.0.3 signing -clear all master > /dev/null || ret=1
 for i in 1 2 3 4 5 6 7 8 9 10
 do
        ans=0
-       $RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing -list master > signing.out.test$n 2>&1
+       $RNDCCMD 10.53.0.3 signing -list master > signing.out.test$n 2>&1
        grep "No signing records found" signing.out.test$n > /dev/null || ans=1
        [ $ans = 1 ] || break
        sleep 1
 done
 [ $ans = 0 ] || ret=1
 
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:check adding of record to unsigned master ($n)"
+echo_i "check adding of record to unsigned master ($n)"
 ret=0
 cp ns3/master2.db.in ns3/master.db
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 reload master || ret=1
+$RNDCCMD 10.53.0.3 reload master 2>&1 | sed 's/^/ns3 /' | cat_i
 for i in 1 2 3 4 5 6 7 8 9
 do
        ans=0
-       $DIG $DIGOPTS @10.53.0.3 -p 5300 e.master A > dig.out.ns3.test$n
+       $DIG $DIGOPTS @10.53.0.3 e.master A > dig.out.ns3.test$n
        grep "10.0.0.5" dig.out.ns3.test$n > /dev/null || ans=1
        grep "ANSWER: 2," dig.out.ns3.test$n > /dev/null || ans=1
        [ $ans = 1 ] || break
        sleep 1
 done
 [ $ans = 0 ] || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:check adding record fails when SOA serial not changed ($n)"
+echo_i "check adding record fails when SOA serial not changed ($n)"
 ret=0
 echo "c A 10.0.0.3" >> ns3/master.db
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 reload || ret=1
+$RNDCCMD 10.53.0.3 reload 2>&1 | sed 's/^/ns3 /' | cat_i
 sleep 1
-$DIG $DIGOPTS @10.53.0.3 -p 5300 c.master A > dig.out.ns3.test$n
+$DIG $DIGOPTS @10.53.0.3 c.master A > dig.out.ns3.test$n
 grep "NXDOMAIN" dig.out.ns3.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:check adding record works after updating SOA serial ($n)"
+echo_i "check adding record works after updating SOA serial ($n)"
 ret=0
 cp ns3/master3.db.in ns3/master.db
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 reload master || ret=1
+$RNDCCMD 10.53.0.3 reload master 2>&1 | sed 's/^/ns3 /' | cat_i
 for i in 1 2 3 4 5 6 7 8 9
 do
        ans=0
-       $DIG $DIGOPTS @10.53.0.3 -p 5300 c.master A > dig.out.ns3.test$n
+       $DIG $DIGOPTS @10.53.0.3 c.master A > dig.out.ns3.test$n
        grep "10.0.0.3" dig.out.ns3.test$n > /dev/null || ans=1
        grep "ANSWER: 2," dig.out.ns3.test$n > /dev/null || ans=1
        [ $ans = 1 ] || break
        sleep 1
 done
 [ $ans = 0 ] || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:check the added record was properly signed ($n)"
+echo_i "check the added record was properly signed ($n)"
 ret=0
-$DIG $DIGOPTS @10.53.0.3 -p 5300 e.master A > dig.out.ns6.test$n
+$DIG $DIGOPTS @10.53.0.3 e.master A > dig.out.ns6.test$n
 grep "10.0.0.5" dig.out.ns6.test$n > /dev/null || ans=1
 grep "ANSWER: 2," dig.out.ns6.test$n > /dev/null || ans=1
 grep "flags:.* ad[ ;]" dig.out.ns6.test$n > /dev/null || ans=1
 
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that the dynamic master zone signed on initial load ($n)"
+echo_i "checking that the dynamic master zone signed on initial load ($n)"
 ret=0
 for i in 1 2 3 4 5 6 7 8 9 10
 do
        ret=0
-       $RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 signing -list dynamic > signing.out.test$n 2>&1
+       $RNDCCMD 10.53.0.3 signing -list dynamic > signing.out.test$n 2>&1
        keys=`grep '^Done signing' signing.out.test$n | wc -l`
        [ $keys = 2 ] || ret=1
        if [ $ret = 0 ]; then break; fi
        sleep 1
 done
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking master zone that was updated while offline is correct ($n)"
+echo_i "checking master zone that was updated while offline is correct ($n)"
 ret=0
-serial=`$DIG $DIGOPTS +short @10.53.0.3 -p 5300 updated SOA | awk '{print $3}'`
+serial=`$DIG $DIGOPTS +nodnssec +short @10.53.0.3 updated SOA | awk '{print $3}'`
 # serial should have changed
 [ "$serial" = "2000042407" ] && ret=1
 # e.updated should exist and should be signed
-$DIG $DIGOPTS @10.53.0.3 -p 5300 e.updated A > dig.out.ns3.test$n
+$DIG $DIGOPTS @10.53.0.3 e.updated A > dig.out.ns3.test$n
 grep "status: NOERROR" dig.out.ns3.test$n > /dev/null || ret=1
 grep "ANSWER: 2," dig.out.ns3.test$n > /dev/null || ret=1
 # updated.db.signed.jnl should exist, should have the source serial
@@ -439,397 +440,397 @@ serial=`$JOURNALPRINT ns3/updated.db.signed.jnl | head -1 | awk '{print $4}'`
 [ "$serial" = "2000042408" ] || ret=1
 diffsize=`$JOURNALPRINT ns3/updated.db.signed.jnl | wc -l`
 [ "$diffsize" -le 13 ] || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking adding of record to unsigned master using UPDATE ($n)"
+echo_i "checking adding of record to unsigned master using UPDATE ($n)"
 ret=0
 
-[ -f ns3/dynamic.db.jnl ] && { ret=1 ; echo "I:journal exists (pretest)" ; }
+[ -f ns3/dynamic.db.jnl ] && { ret=1 ; echo_i "journal exists (pretest)" ; }
 
 $NSUPDATE << EOF
 zone dynamic
-server 10.53.0.3 5300
+server 10.53.0.3 ${PORT}
 update add e.dynamic 0 A 1.2.3.4
 send
 EOF
 
-[ -f ns3/dynamic.db.jnl ] || { ret=1 ; echo "I:journal does not exist (posttest)" ; }
+[ -f ns3/dynamic.db.jnl ] || { ret=1 ; echo_i "journal does not exist (posttest)" ; }
 
 for i in 1 2 3 4 5 6 7 8 9 10
 do 
        ans=0
-       $DIG $DIGOPTS @10.53.0.3 -p 5300 e.dynamic > dig.out.ns3.test$n
+       $DIG $DIGOPTS @10.53.0.3 e.dynamic > dig.out.ns3.test$n
        grep "status: NOERROR" dig.out.ns3.test$n > /dev/null || ans=1
        grep "ANSWER: 2," dig.out.ns3.test$n > /dev/null || ans=1
        grep "1.2.3.4" dig.out.ns3.test$n > /dev/null || ans=1
        [ $ans = 0 ] && break
        sleep 1
 done
-[ $ans = 0 ] || { ret=1; echo "I:signed record not found"; cat dig.out.ns3.test$n ; }
+[ $ans = 0 ] || { ret=1; echo_i "signed record not found"; cat dig.out.ns3.test$n ; }
 
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:stop bump in the wire signer server ($n)"
+echo_i "stop bump in the wire signer server ($n)"
 ret=0
 $PERL ../stop.pl . ns3 || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:restart bump in the wire signer server ($n)"
+echo_i "restart bump in the wire signer server ($n)"
 ret=0
-$PERL ../start.pl --noclean --restart . ns3 || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+$PERL ../start.pl --noclean --restart --port ${PORT} . ns3 || ret=1
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 $NSUPDATE << EOF
 zone bits
-server 10.53.0.2 5300
+server 10.53.0.2 ${PORT}
 update add bits 0 SOA ns2.bits. . 2011072450 20 20 1814400 3600
 send
 EOF
 
 n=`expr $n + 1`
-echo "I:checking YYYYMMDDVV (2011072450) serial on hidden master ($n)"
+echo_i "checking YYYYMMDDVV (2011072450) serial on hidden master ($n)"
 ret=0
-$DIG $DIGOPTS @10.53.0.2 -p 5300 bits SOA > dig.out.ns2.test$n
+$DIG $DIGOPTS @10.53.0.2 bits SOA > dig.out.ns2.test$n
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns2.test$n > /dev/null || ret=1
 grep "2011072450" dig.out.ns2.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking YYYYMMDDVV (2011072450) serial in signed zone ($n)"
+echo_i "checking YYYYMMDDVV (2011072450) serial in signed zone ($n)"
 for i in 1 2 3 4 5 6 7 8 9 10
 do
        ret=0
-       $DIG $DIGOPTS @10.53.0.3 -p 5300 bits SOA > dig.out.ns3.test$n
+       $DIG $DIGOPTS @10.53.0.3 bits SOA > dig.out.ns3.test$n
        grep "status: NOERROR" dig.out.ns3.test$n > /dev/null || ret=1
        grep "ANSWER: 2," dig.out.ns3.test$n > /dev/null || ret=1
        grep "2011072450" dig.out.ns3.test$n > /dev/null || ret=1
        if [ $ret = 0 ]; then break; fi
        sleep 1
 done
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 $NSUPDATE << EOF
 zone noixfr
-server 10.53.0.4 5300
+server 10.53.0.4 ${PORT}
 update add noixfr 0 SOA ns4.noixfr. . 2011072450 20 20 1814400 3600
 send
 EOF
 
 n=`expr $n + 1`
-echo "I:checking YYYYMMDDVV (2011072450) serial on hidden master, noixfr ($n)"
+echo_i "checking YYYYMMDDVV (2011072450) serial on hidden master, noixfr ($n)"
 ret=0
-$DIG $DIGOPTS @10.53.0.4 -p 5300 noixfr SOA > dig.out.ns4.test$n
+$DIG $DIGOPTS @10.53.0.4 noixfr SOA > dig.out.ns4.test$n
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns4.test$n > /dev/null || ret=1
 grep "2011072450" dig.out.ns4.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking YYYYMMDDVV (2011072450) serial in signed zone, noixfr ($n)"
+echo_i "checking YYYYMMDDVV (2011072450) serial in signed zone, noixfr ($n)"
 for i in 1 2 3 4 5 6 7 8 9 10
 do
        ret=0
-       $DIG $DIGOPTS @10.53.0.3 -p 5300 noixfr SOA > dig.out.ns3.test$n
+       $DIG $DIGOPTS @10.53.0.3 noixfr SOA > dig.out.ns3.test$n
        grep "status: NOERROR" dig.out.ns3.test$n > /dev/null || ret=1
        grep "ANSWER: 2," dig.out.ns3.test$n > /dev/null || ret=1
        grep "2011072450" dig.out.ns3.test$n > /dev/null || ret=1
        if [ $ret = 0 ]; then break; fi
        sleep 1
 done
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 $NSUPDATE << EOF
 zone bits
-server 10.53.0.3 5300
+server 10.53.0.3 ${PORT}
 update add bits 0 SOA ns2.bits. . 2011072460 20 20 1814400 3600
 send
 EOF
 
 n=`expr $n + 1`
-echo "I:checking forwarded update on hidden master ($n)"
+echo_i "checking forwarded update on hidden master ($n)"
 ret=0
-$DIG $DIGOPTS @10.53.0.2 -p 5300 bits SOA > dig.out.ns2.test$n
+$DIG $DIGOPTS @10.53.0.2 bits SOA > dig.out.ns2.test$n
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns2.test$n > /dev/null || ret=1
 grep "2011072460" dig.out.ns2.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking forwarded update on signed zone ($n)"
+echo_i "checking forwarded update on signed zone ($n)"
 for i in 1 2 3 4 5 6 7 8 9 10
 do
        ret=0
-       $DIG $DIGOPTS @10.53.0.3 -p 5300 bits SOA > dig.out.ns3.test$n
+       $DIG $DIGOPTS @10.53.0.3 bits SOA > dig.out.ns3.test$n
        grep "status: NOERROR" dig.out.ns3.test$n > /dev/null || ret=1
        grep "ANSWER: 2," dig.out.ns3.test$n > /dev/null || ret=1
        grep "2011072460" dig.out.ns3.test$n > /dev/null || ret=1
        if [ $ret = 0 ]; then break; fi
        sleep 1
 done
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 $NSUPDATE << EOF
 zone noixfr
-server 10.53.0.3 5300
+server 10.53.0.3 ${PORT}
 update add noixfr 0 SOA ns4.noixfr. . 2011072460 20 20 1814400 3600
 send
 EOF
 
 n=`expr $n + 1`
-echo "I:checking forwarded update on hidden master, noixfr ($n)"
+echo_i "checking forwarded update on hidden master, noixfr ($n)"
 ret=0
-$DIG $DIGOPTS @10.53.0.4 -p 5300 noixfr SOA > dig.out.ns4.test$n
+$DIG $DIGOPTS @10.53.0.4 noixfr SOA > dig.out.ns4.test$n
 grep "status: NOERROR" dig.out.ns4.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns4.test$n > /dev/null || ret=1
 grep "2011072460" dig.out.ns4.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking forwarded update on signed zone, noixfr ($n)"
+echo_i "checking forwarded update on signed zone, noixfr ($n)"
 for i in 1 2 3 4 5 6 7 8 9 10
 do
        ret=0
-       $DIG $DIGOPTS @10.53.0.3 -p 5300 noixfr SOA > dig.out.ns3.test$n
+       $DIG $DIGOPTS @10.53.0.3 noixfr SOA > dig.out.ns3.test$n
        grep "status: NOERROR" dig.out.ns3.test$n > /dev/null || ret=1
        grep "ANSWER: 2," dig.out.ns3.test$n > /dev/null || ret=1
        grep "2011072460" dig.out.ns3.test$n > /dev/null || ret=1
        if [ $ret = 0 ]; then break; fi
        sleep 1
 done
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking turning on of inline signing in a slave zone via reload ($n)"
-$DIG $DIGOPTS @10.53.0.5 -p 5300 +dnssec bits SOA > dig.out.ns5.test$n
+echo_i "checking turning on of inline signing in a slave zone via reload ($n)"
+$DIG $DIGOPTS @10.53.0.5 +dnssec bits SOA > dig.out.ns5.test$n
 grep "status: NOERROR" dig.out.ns5.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns5.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:setup broken"; fi
+if [ $ret != 0 ]; then echo_i "setup broken"; fi
 status=`expr $status + $ret`
-cp ns5/named.conf.post ns5/named.conf
+
+copy_setports ns5/named.conf.post ns5/named.conf
 (cd ns5; $KEYGEN -q -r $RANDFILE bits) > /dev/null 2>&1
 (cd ns5; $KEYGEN -q -r $RANDFILE -f KSK bits) > /dev/null 2>&1
-$RNDC -c ../common/rndc.conf -s 10.53.0.5 -p 9953 reload 2>&1 | sed 's/^/I:ns5 /'
+$RNDCCMD 10.53.0.5 reload 2>&1 | sed 's/^/ns5 /' | cat_i
 for i in 1 2 3 4 5 6 7 8 9 10
 do
        ret=0
-       $DIG $DIGOPTS @10.53.0.5 -p 5300 bits SOA > dig.out.ns5.test$n
+       $DIG $DIGOPTS @10.53.0.5 bits SOA > dig.out.ns5.test$n
        grep "status: NOERROR" dig.out.ns5.test$n > /dev/null || ret=1
        grep "ANSWER: 2," dig.out.ns5.test$n > /dev/null || ret=1
        if [ $ret = 0 ]; then break; fi
        sleep 1
 done
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking rndc freeze/thaw of dynamic inline zone no change ($n)"
+echo_i "checking rndc freeze/thaw of dynamic inline zone no change ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 freeze dynamic > freeze.test$n 2>&1 || { echo "I: rndc freeze dynamic failed" ; sed 's/^/I:/' < freeze.test$n ; ret=1;  }
+$RNDCCMD 10.53.0.3 freeze dynamic > freeze.test$n 2>&1 || { echo_i "/' < freeze.test$n"; ret=1;  }
 sleep 1
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 thaw dynamic > thaw.test$n 2>&1 || { echo "I: rndc thaw dynamic failed" ; ret=1; }
+$RNDCCMD 10.53.0.3 thaw dynamic > thaw.test$n 2>&1 || { echo_i "rndc thaw dynamic failed" ; ret=1; }
 sleep 1
 grep "zone dynamic/IN (unsigned): ixfr-from-differences: unchanged" ns3/named.run > /dev/null ||  ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 
 n=`expr $n + 1`
-echo "I:checking rndc freeze/thaw of dynamic inline zone ($n)"
+echo_i "checking rndc freeze/thaw of dynamic inline zone ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 freeze dynamic > freeze.test$n 2>&1 || ret=1 
+$RNDCCMD 10.53.0.3 freeze dynamic > freeze.test$n 2>&1 || ret=1
 sleep 1
 awk '$2 == ";" && $3 == "serial" { printf("%d %s %s\n", $1 + 1, $2, $3); next; }
      { print; }
      END { print "freeze1.dynamic. 0 TXT freeze1"; } ' ns3/dynamic.db > ns3/dynamic.db.new
 mv ns3/dynamic.db.new ns3/dynamic.db
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 thaw dynamic > thaw.test$n 2>&1 || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+$RNDCCMD 10.53.0.3 thaw dynamic > thaw.test$n 2>&1 || ret=1
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:check added record freeze1.dynamic ($n)"
+echo_i "check added record freeze1.dynamic ($n)"
 for i in 1 2 3 4 5 6 7 8 9
 do
     ret=0
-    $DIG $DIGOPTS @10.53.0.3 -p 5300 freeze1.dynamic TXT > dig.out.ns3.test$n
+    $DIG $DIGOPTS @10.53.0.3 freeze1.dynamic TXT > dig.out.ns3.test$n
     grep "status: NOERROR" dig.out.ns3.test$n > /dev/null || ret=1
     grep "ANSWER: 2," dig.out.ns3.test$n > /dev/null || ret=1
     test $ret = 0 && break
     sleep 1
 done
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 # allow 1 second so that file time stamps change
 sleep 1
 
 n=`expr $n + 1`
-echo "I:checking rndc freeze/thaw of server ($n)"
+echo_i "checking rndc freeze/thaw of server ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 freeze > freeze.test$n 2>&1 || ret=1
+$RNDCCMD 10.53.0.3 freeze > freeze.test$n 2>&1 || ret=1
 sleep 1
 awk '$2 == ";" && $3 == "serial" { printf("%d %s %s\n", $1 + 1, $2, $3); next; }
      { print; }
      END { print "freeze2.dynamic. 0 TXT freeze2"; } ' ns3/dynamic.db > ns3/dynamic.db.new
 mv ns3/dynamic.db.new ns3/dynamic.db
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 thaw > thaw.test$n 2>&1 || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+$RNDCCMD 10.53.0.3 thaw > thaw.test$n 2>&1 || ret=1
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:check added record freeze2.dynamic ($n)"
+echo_i "check added record freeze2.dynamic ($n)"
 for i in 1 2 3 4 5 6 7 8 9
 do
     ret=0
-    $DIG $DIGOPTS @10.53.0.3 -p 5300 freeze2.dynamic TXT > dig.out.ns3.test$n
+    $DIG $DIGOPTS @10.53.0.3 freeze2.dynamic TXT > dig.out.ns3.test$n
     grep "status: NOERROR" dig.out.ns3.test$n > /dev/null || ret=1
     grep "ANSWER: 2," dig.out.ns3.test$n > /dev/null || ret=1
     test $ret = 0 && break
     sleep 1
 done
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:check rndc reload allows reuse of inline-signing zones ($n)"
+echo_i "check rndc reload allows reuse of inline-signing zones ($n)"
 ret=0
-{ $RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 reload 2>&1 || ret=1 ; } |
-sed 's/^/I:ns3 /'
+{ $RNDCCMD 10.53.0.3 reload 2>&1 || ret=1 ; } | sed 's/^/ns3 /' | cat_i
 grep "not reusable" ns3/named.run > /dev/null 2>&1 && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:check rndc sync removes both signed and unsigned journals ($n)"
+echo_i "check rndc sync removes both signed and unsigned journals ($n)"
 ret=0
 [ -f ns3/dynamic.db.jnl ] || ret=1
 [ -f ns3/dynamic.db.signed.jnl ] || ret=1
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 sync -clean dynamic 2>&1 || ret=1
+$RNDCCMD 10.53.0.3 sync -clean dynamic 2>&1 || ret=1
 [ -f ns3/dynamic.db.jnl ] && ret=1
 [ -f ns3/dynamic.db.signed.jnl ] && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 $NSUPDATE << EOF
 zone retransfer
-server 10.53.0.2 5300
+server 10.53.0.2 ${PORT}
 update add added.retransfer 0 A 1.2.3.4
 send
 
 EOF
 
 n=`expr $n + 1`
-echo "I:checking that the retransfer record is added on the hidden master ($n)"
+echo_i "checking that the retransfer record is added on the hidden master ($n)"
 ret=0
-$DIG $DIGOPTS @10.53.0.2 -p 5300 added.retransfer A > dig.out.ns2.test$n
+$DIG $DIGOPTS @10.53.0.2 added.retransfer A > dig.out.ns2.test$n
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns2.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that the change has not been transfered due to notify ($n)"
+echo_i "checking that the change has not been transfered due to notify ($n)"
 ret=0
 for i in 0 1 2 3 4 5 6 7 8 9
 do
        ans=0
-       $DIG $DIGOPTS @10.53.0.3 -p 5300 added.retransfer A > dig.out.ns3.test$n
+       $DIG $DIGOPTS @10.53.0.3 added.retransfer A > dig.out.ns3.test$n
        grep "status: NOERROR" dig.out.ns3.test$n > /dev/null || ans=1
        [ $ans = 0 ] && break
        sleep 1
 done
-if [ $ans != 1 ]; then echo "I:failed"; ret=1; fi
+if [ $ans != 1 ]; then echo_i "failed"; ret=1; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:check rndc retransfer of a inline slave zone works ($n)"
+echo_i "check rndc retransfer of a inline slave zone works ($n)"
 ret=0
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 retransfer retransfer 2>&1 || ret=1
+$RNDCCMD 10.53.0.3 retransfer retransfer 2>&1 || ret=1
 for i in 0 1 2 3 4 5 6 7 8 9
 do
        ans=0
-       $DIG $DIGOPTS @10.53.0.3 -p 5300 added.retransfer A > dig.out.ns3.test$n
+       $DIG $DIGOPTS @10.53.0.3 added.retransfer A > dig.out.ns3.test$n
        grep "status: NOERROR" dig.out.ns3.test$n > /dev/null || ans=1
        grep "ANSWER: 2," dig.out.ns3.test$n > /dev/null || ans=1
        [ $ans = 0 ] && break
        sleep 1
 done
 [ $ans = 1 ] && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:check rndc retransfer of a inline nsec3 slave retains nsec3 ($n)"
+echo_i "check rndc retransfer of a inline nsec3 slave retains nsec3 ($n)"
 ret=0
 for i in 0 1 2 3 4 5 6 7 8 9
 do
        ans=0
-       $DIG $DIGOPTS @10.53.0.3 -p 5300 nonexist.retransfer3 A > dig.out.ns3.pre.test$n
+       $DIG $DIGOPTS @10.53.0.3 nonexist.retransfer3 A > dig.out.ns3.pre.test$n
        grep "status: NXDOMAIN" dig.out.ns3.pre.test$n > /dev/null || ans=1
        grep "NSEC3" dig.out.ns3.pre.test$n > /dev/null || ans=1
        [ $ans = 0 ] && break
        sleep 1
 done
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 retransfer retransfer3 2>&1 || ret=1
+$RNDCCMD 10.53.0.3 retransfer retransfer3 2>&1 || ret=1
 for i in 0 1 2 3 4 5 6 7 8 9
 do
        ans=0
-       $DIG $DIGOPTS @10.53.0.3 -p 5300 nonexist.retransfer3 A > dig.out.ns3.post.test$n
+       $DIG $DIGOPTS @10.53.0.3 nonexist.retransfer3 A > dig.out.ns3.post.test$n
        grep "status: NXDOMAIN" dig.out.ns3.post.test$n > /dev/null || ans=1
        grep "NSEC3" dig.out.ns3.post.test$n > /dev/null || ans=1
        [ $ans = 0 ] && break
        sleep 1
 done
 [ $ans = 1 ] && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 # NOTE: The test below should be considered fragile.  More details can be found
 # in the comment inside ns7/named.conf.
 n=`expr $n + 1`
-echo "I:check rndc retransfer of a inline nsec3 slave does not trigger an infinite loop ($n)"
+echo_i "check rndc retransfer of a inline nsec3 slave does not trigger an infinite loop ($n)"
 ret=0
 zone=nsec3-loop
 # Add slave zone using rndc
-$RNDC -c ../common/rndc.conf -s 10.53.0.7 -p 9953 addzone $zone \
+$RNDCCMD 10.53.0.7 addzone $zone \
        '{ type slave; masters { 10.53.0.2; }; file "'$zone'.db"; inline-signing yes; auto-dnssec maintain; };'
 # Wait until slave zone is fully signed using NSEC
 for i in 1 2 3 4 5 6 7 8 9 0
 do
        ret=1
-       $RNDC -c ../common/rndc.conf -s 10.53.0.7 -p 9953 signing -list $zone > signing.out.test$n 2>&1
+       $RNDCCMD 10.53.0.7 signing -list $zone > signing.out.test$n 2>&1
        keys=`grep '^Done signing' signing.out.test$n | wc -l`
        [ $keys -eq 3 ] && ret=0 && break
        sleep 1
 done
 # Switch slave zone to NSEC3
-$RNDC -c ../common/rndc.conf -s 10.53.0.7 -p 9953 signing -nsec3param 1 0 2 12345678 $zone > /dev/null 2>&1
+$RNDCCMD 10.53.0.7 signing -nsec3param 1 0 2 12345678 $zone > /dev/null 2>&1
 # Wait until slave zone is fully signed using NSEC3
 for i in 1 2 3 4 5 6 7 8 9 0
 do
        ret=1
-       nsec3param=`$DIG +short @10.53.0.7 -p 5300 nsec3param $zone`
+       nsec3param=`$DIG $DIGOPTS +nodnssec +short @10.53.0.7 nsec3param $zone`
        test "$nsec3param" = "1 0 2 12345678" && ret=0 && break
        sleep 1
 done
 # Attempt to retransfer the slave zone from master
-$RNDC -c ../common/rndc.conf -s 10.53.0.7 -p 9953 retransfer $zone
+$RNDCCMD 10.53.0.7 retransfer $zone
 # Check whether the signer managed to fully sign the retransferred zone by
 # waiting for a specific SOA serial number to appear in the logs; if this
 # specific SOA serial number does not appear in the logs, it means the signer
@@ -844,63 +845,63 @@ do
        [ $? -eq 0 ] && ret=0 && break
        sleep 1
 done
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:stop bump in the wire signer server ($n)"
+echo_i "stop bump in the wire signer server ($n)"
 ret=0
 $PERL ../stop.pl . ns3 || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:update SOA record while stopped"
+echo_i "update SOA record while stopped"
 cp ns3/master4.db.in ns3/master.db
 rm ns3/master.db.jnl
 
 n=`expr $n + 1`
-echo "I:restart bump in the wire signer server ($n)"
+echo_i "restart bump in the wire signer server ($n)"
 ret=0
-$PERL ../start.pl --noclean --restart . ns3 || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+$PERL ../start.pl --noclean --restart --port ${PORT} . ns3 || ret=1
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:updates to SOA parameters other than serial while stopped are reflected in signed zone ($n)"
+echo_i "updates to SOA parameters other than serial while stopped are reflected in signed zone ($n)"
 ret=0
 for i in 1 2 3 4 5 6 7 8 9
 do
        ans=0
-       $DIG $DIGOPTS @10.53.0.3 -p 5300 master SOA > dig.out.ns3.test$n
+       $DIG $DIGOPTS @10.53.0.3 master SOA > dig.out.ns3.test$n
        grep "hostmaster" dig.out.ns3.test$n > /dev/null || ans=1
        grep "ANSWER: 2," dig.out.ns3.test$n > /dev/null || ans=1
        [ $ans = 1 ] || break
        sleep 1
 done
 [ $ans = 0 ] || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:test add/del zone combinations ($n)"
+echo_i "test add/del zone combinations ($n)"
 ret=0
 for zone in a b c d e f g h i j k l m n o p q r s t u v w x y z
 do
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 addzone test-$zone \
+$RNDCCMD 10.53.0.2 addzone test-$zone \
        '{ type master; file "bits.db.in"; allow-transfer { any; }; };'
-$DIG $DIGOPTS @10.53.0.2 -p 5300 test-$zone SOA > dig.out.ns2.$zone.test$n
+$DIG $DIGOPTS @10.53.0.2 test-$zone SOA > dig.out.ns2.$zone.test$n
 grep "status: NOERROR," dig.out.ns2.$zone.test$n  > /dev/null || { ret=1; cat dig.out.ns2.$zone.test$n; }
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 addzone test-$zone \
+$RNDCCMD 10.53.0.3 addzone test-$zone \
        '{ type slave; masters { 10.53.0.2; }; file "'test-$zone.bk'"; inline-signing yes; auto-dnssec maintain; allow-transfer { any; }; };'
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 delzone test-$zone > /dev/null 2>&1
+$RNDCCMD 10.53.0.3 delzone test-$zone > /dev/null 2>&1
 done
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:testing adding external keys to a inline zone ($n)"
+echo_i "testing adding external keys to a inline zone ($n)"
 ret=0
-$DIG $DIGOPTS @10.53.0.3 -p 5300 dnskey externalkey > dig.out.ns3.test$n
+$DIG $DIGOPTS @10.53.0.3 dnskey externalkey > dig.out.ns3.test$n
 for alg in 3 7 12 13
 do
    [ $alg = 3 -a ! -f checkdsa ] && continue;
@@ -908,23 +909,23 @@ do
    [ $alg = 13 -a ! -f checkecdsa ] && continue;
 
    case $alg in
-   3) echo "I: checking DSA";;
-   7) echo "I: checking NSEC3RSASHA1";;
-   12) echo "I: checking GOST";;
-   13) echo "I: checking ECDSAP256SHA256";;
-   *) echo "I: checking $alg";;
+   3) echo_i "checking DSA";;
+   7) echo_i "checking NSEC3RSASHA1";;
+   12) echo_i "checking GOST";;
+   13) echo_i "checking ECDSAP256SHA256";;
+   *) echo_i "checking $alg";;
    esac
 
    dnskeys=`grep "IN.DNSKEY.25[67] [0-9]* $alg " dig.out.ns3.test$n | wc -l`
    rrsigs=`grep "RRSIG.DNSKEY $alg " dig.out.ns3.test$n | wc -l`
-   test ${dnskeys:-0} -eq 3 || { echo "I: failed $alg (dnskeys ${dnskeys:-0})"; ret=1; }
-   test ${rrsigs:-0} -eq 2 || { echo "I: failed $alg (rrsigs ${rrsigs:-0})"; ret=1; }
+   test ${dnskeys:-0} -eq 3 || { echo_i "failed $alg (dnskeys ${dnskeys:-0})"; ret=1; }
+   test ${rrsigs:-0} -eq 2 || { echo_i "failed $alg (rrsigs ${rrsigs:-0})"; ret=1; }
 done
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:testing imported key won't overwrite a private key ($n)"
+echo_i "testing imported key won't overwrite a private key ($n)"
 ret=0
 key=`$KEYGEN -r $RANDFILE -q import.example`
 cp ${key}.key import.key
@@ -935,45 +936,45 @@ rm -f ${key}.private
 $IMPORTKEY -f import.key import.example > /dev/null 2>&1 || ret=1
 # now that it's an external key, re-import should succeed
 $IMPORTKEY -f import.key import.example > /dev/null 2>&1 || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:testing that inline signing works with inactive ZSK and active KSK ($n)"
+echo_i "testing that inline signing works with inactive ZSK and active KSK ($n)"
 ret=0
 
-$DIG $DIGOPTS @10.53.0.3 -p 5300 soa inactivezsk  > dig.out.ns3.pre.test$n || ret=1
+$DIG $DIGOPTS @10.53.0.3 soa inactivezsk  > dig.out.ns3.pre.test$n || ret=1
 soa1=`awk '$4 == "SOA" { print $7 }' dig.out.ns3.pre.test$n`
 
 $NSUPDATE << EOF
-server 10.53.0.2 5300
+server 10.53.0.2 ${PORT}
 update add added.inactivezsk 0 IN TXT added record
 send
 EOF
 
 for i in 1 2 3 4 5 6 7 8 9 10
 do
-    $DIG $DIGOPTS @10.53.0.3 -p 5300 soa inactivezsk  > dig.out.ns3.post.test$n || ret=1
+    $DIG $DIGOPTS @10.53.0.3 soa inactivezsk  > dig.out.ns3.post.test$n || ret=1
     soa2=`awk '$4 == "SOA" { print $7 }' dig.out.ns3.post.test$n`
     test ${soa1:-0} -ne ${soa2:-0} && break
     sleep 1
 done
 test ${soa1:-0} -ne ${soa2:-0} || ret=1
 
-$DIG $DIGOPTS @10.53.0.3 -p 5300 txt added.inactivezsk > dig.out.ns3.test$n || ret=1
+$DIG $DIGOPTS @10.53.0.3 txt added.inactivezsk > dig.out.ns3.test$n || ret=1
 grep "ANSWER: 3," dig.out.ns3.test$n > /dev/null || ret=1
 grep "RRSIG" dig.out.ns3.test$n > /dev/null || ret=1
 grep "TXT 7 2" dig.out.ns3.test$n > /dev/null || ret=1
 grep "TXT 8 2" dig.out.ns3.test$n > /dev/null || ret=1
 
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:testing that inline signing works with inactive KSK and active ZSK ($n)"
+echo_i "testing that inline signing works with inactive KSK and active ZSK ($n)"
 ret=0
 
-$DIG $DIGOPTS @10.53.0.3 -p 5300 axfr inactiveksk > dig.out.ns3.test$n
+$DIG $DIGOPTS @10.53.0.3 axfr inactiveksk > dig.out.ns3.test$n
 
 #
 #  check that DNSKEY is signed with ZSK for algorithm 7
@@ -999,8 +1000,8 @@ kskid=`awk "${awk}" dig.out.ns3.test$n |
        $DSFROMKEY -2 -f - inactiveksk | awk '{ print $4}' `
 grep "DNSKEY 8 1 [0-9]* [0-9]* [0-9]* ${kskid} " dig.out.ns3.test$n > /dev/null || ret=1
 
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index c1137c41d6953056959a68de8db2364efd227035..1920a91a12e25d513e30c82c2728ecb7a88e43a3 100644 (file)
@@ -15,3 +15,6 @@
 # PERFORMANCE OF THIS SOFTWARE.
 
 rm -f dig.out.test*
+rm -f */named.memstats
+rm -f */named.conf
+rm -f */named.run
similarity index 96%
rename from bin/tests/system/integrity/ns1/named.conf
rename to bin/tests/system/integrity/ns1/named.conf.in
index 7aad031d173e081400cf5b97ca071997bac0bcfb..eda290d1c69817e4a02a060ce25fbc9ed6b63643 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-controls { /* empty */ };
-
 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; };
@@ -30,8 +28,6 @@ options {
        check-integrity no;
 };
 
-include "../../common/controls.conf";
-
 zone "." {
        type hint;
        file "../../common/root.hint";
diff --git a/bin/tests/system/integrity/setup.sh b/bin/tests/system/integrity/setup.sh
new file mode 100644 (file)
index 0000000..c69f051
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+#
+# Copyright (C)  2018  Internet Systems Consortium, Inc. ("ISC")
+#
+# 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 http://mozilla.org/MPL/2.0/.
+
+SYSTEMTESTTOP=..
+. $SYSTEMTESTTOP/conf.sh
+
+$SHELL clean.sh
+copy_setports ns1/named.conf.in ns1/named.conf
index 6ded61b9bdbddef88836b8e95280f090eaf1ff65..0f1f29c4c6971d6821d1c47e3514203577447de0 100644 (file)
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
+DIGOPTS="-p ${PORT}"
+
 status=0
 n=1
 
-echo "I:check that 'check-integrity yes; check-mx-cname fail;' works ($n)"
+echo_i "check that 'check-integrity yes; check-mx-cname fail;' works ($n)"
 ret=0
-$DIG -p 5300 @10.53.0.1 mx mx-cname-fail > dig.out.test$n || ret=1
+$DIG $DIGOPTS @10.53.0.1 mx mx-cname-fail > dig.out.test$n || ret=1
 grep "status: SERVFAIL," dig.out.test$n > /dev/null || ret=1
 grep "zone mx-cname-fail/IN: mx-cname-fail/MX 'cname.mx-cname-fail' is a CNAME (illegal)" ns1/named.run > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that 'check-integrity yes; check-mx-cname warn;' works ($n)"
+echo_i "check that 'check-integrity yes; check-mx-cname warn;' works ($n)"
 ret=0
-$DIG -p 5300 @10.53.0.1 mx mx-cname-warn > dig.out.test$n || ret=1
+$DIG $DIGOPTS @10.53.0.1 mx mx-cname-warn > dig.out.test$n || ret=1
 grep "status: NOERROR," dig.out.test$n > /dev/null || ret=1
 grep "zone mx-cname-warn/IN: mx-cname-warn/MX 'cname.mx-cname-warn' is a CNAME (illegal)" ns1/named.run > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that 'check-integrity yes; check-mx-cname ignore;' works ($n)"
+echo_i "check that 'check-integrity yes; check-mx-cname ignore;' works ($n)"
 ret=0
-$DIG -p 5300 @10.53.0.1 mx mx-cname-ignore > dig.out.test$n || ret=1
+$DIG $DIGOPTS @10.53.0.1 mx mx-cname-ignore > dig.out.test$n || ret=1
 grep "status: NOERROR," dig.out.test$n > /dev/null || ret=1
 grep "zone mx-cname-ignore/IN: mx-cname-ignore/MX 'cname.mx-cname-ignore' is a CNAME (illegal)" ns1/named.run > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that 'check-integrity no; check-mx-cname fail;' works ($n)"
+echo_i "check that 'check-integrity no; check-mx-cname fail;' works ($n)"
 ret=0
-$DIG -p 5300 @10.53.0.1 mx no-mx-cname-fail > dig.out.test$n || ret=1
+$DIG $DIGOPTS @10.53.0.1 mx no-mx-cname-fail > dig.out.test$n || ret=1
 grep "status: NOERROR," dig.out.test$n > /dev/null || ret=1
 grep "zone no-mx-cname-fail/IN: no-mx-cname-fail/MX 'cname.no-mx-cname-fail' is a CNAME (illegal)" ns1/named.run > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that 'check-integrity no; check-mx-cname warn;' works ($n)"
+echo_i "check that 'check-integrity no; check-mx-cname warn;' works ($n)"
 ret=0
-$DIG -p 5300 @10.53.0.1 mx no-mx-cname-warn > dig.out.test$n || ret=1
+$DIG $DIGOPTS @10.53.0.1 mx no-mx-cname-warn > dig.out.test$n || ret=1
 grep "status: NOERROR," dig.out.test$n > /dev/null || ret=1
 grep "zone no-mx-cname-warn/IN: no-mx-cname-warn/MX 'cname.no-mx-cname-warn' is a CNAME (illegal)" ns1/named.run > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that 'check-integrity no; check-mx-cname ignore;' works ($n)"
+echo_i "check that 'check-integrity no; check-mx-cname ignore;' works ($n)"
 ret=0
-$DIG -p 5300 @10.53.0.1 mx no-mx-cname-ignore > dig.out.test$n || ret=1
+$DIG $DIGOPTS @10.53.0.1 mx no-mx-cname-ignore > dig.out.test$n || ret=1
 grep "status: NOERROR," dig.out.test$n > /dev/null || ret=1
 grep "zone no-mx-cname-ignore/IN: no-mx-cname-ignore/MX 'cname.no-mx-cname-ignore' is a CNAME (illegal)" ns1/named.run > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that 'check-integrity yes; check-srv-cname fail;' works ($n)"
+echo_i "check that 'check-integrity yes; check-srv-cname fail;' works ($n)"
 ret=0
-$DIG -p 5300 @10.53.0.1 srv srv-cname-fail > dig.out.test$n || ret=1
+$DIG $DIGOPTS @10.53.0.1 srv srv-cname-fail > dig.out.test$n || ret=1
 grep "status: SERVFAIL," dig.out.test$n > /dev/null || ret=1
 grep "zone srv-cname-fail/IN: srv-cname-fail/SRV 'cname.srv-cname-fail' is a CNAME (illegal)" ns1/named.run > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that 'check-integrity yes; check-srv-cname warn;' works ($n)"
+echo_i "check that 'check-integrity yes; check-srv-cname warn;' works ($n)"
 ret=0
-$DIG -p 5300 @10.53.0.1 srv srv-cname-warn > dig.out.test$n || ret=1
+$DIG $DIGOPTS @10.53.0.1 srv srv-cname-warn > dig.out.test$n || ret=1
 grep "status: NOERROR," dig.out.test$n > /dev/null || ret=1
 grep "zone srv-cname-warn/IN: srv-cname-warn/SRV 'cname.srv-cname-warn' is a CNAME (illegal)" ns1/named.run > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that 'check-integrity yes; check-srv-cname ignore;' works ($n)"
+echo_i "check that 'check-integrity yes; check-srv-cname ignore;' works ($n)"
 ret=0
-$DIG -p 5300 @10.53.0.1 srv srv-cname-ignore > dig.out.test$n || ret=1
+$DIG $DIGOPTS @10.53.0.1 srv srv-cname-ignore > dig.out.test$n || ret=1
 grep "status: NOERROR," dig.out.test$n > /dev/null || ret=1
 grep "zone srv-cname-ignore/IN: srv-cname-ignore/SRV 'cname.srv-cname-ignore' is a CNAME (illegal)" ns1/named.run > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that 'check-integrity no; check-srv-cname fail;' works ($n)"
+echo_i "check that 'check-integrity no; check-srv-cname fail;' works ($n)"
 ret=0
-$DIG -p 5300 @10.53.0.1 srv no-srv-cname-fail > dig.out.test$n || ret=1
+$DIG $DIGOPTS @10.53.0.1 srv no-srv-cname-fail > dig.out.test$n || ret=1
 grep "status: NOERROR," dig.out.test$n > /dev/null || ret=1
 grep "zone no-srv-cname-fail/IN: no-srv-cname-fail/SRV 'cname.no-srv-cname-fail' is a CNAME (illegal)" ns1/named.run > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that 'check-integrity no; check-srv-cname warn;' works ($n)"
+echo_i "check that 'check-integrity no; check-srv-cname warn;' works ($n)"
 ret=0
-$DIG -p 5300 @10.53.0.1 srv no-srv-cname-warn > dig.out.test$n || ret=1
+$DIG $DIGOPTS @10.53.0.1 srv no-srv-cname-warn > dig.out.test$n || ret=1
 grep "status: NOERROR," dig.out.test$n > /dev/null || ret=1
 grep "zone no-srv-cname-warn/IN: no-srv-cname-warn/SRV 'cname.no-srv-cname-warn' is a CNAME (illegal)" ns1/named.run > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:check that 'check-integrity no; check-srv-cname ignore;' works ($n)"
+echo_i "check that 'check-integrity no; check-srv-cname ignore;' works ($n)"
 ret=0
-$DIG -p 5300 @10.53.0.1 srv no-srv-cname-ignore > dig.out.test$n || ret=1
+$DIG $DIGOPTS @10.53.0.1 srv no-srv-cname-ignore > dig.out.test$n || ret=1
 grep "status: NOERROR," dig.out.test$n > /dev/null || ret=1
 grep "zone no-srv-cname-ignore/IN: no-srv-cname-ignore/SRV 'cname.no-srv-cname-ignore' is a CNAME (illegal)" ns1/named.run > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 test $status -eq 0 || exit 1
index 91bf54c7cfb8c995a9db7abf19f2874ddbec69a4..c4bb2b5a7545154604d1cd716a51ca3be7de6ec1 100644 (file)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id$
-
-rm -f ns1/named.conf ns1/myftp.db
+rm -f ns1/myftp.db
 rm -f ns3/*.jnl ns3/mytest.db ns3/subtest.db
 rm -f ns4/*.jnl ns4/*.db
 rm -f */named.memstats
+rm -f */named.conf
 rm -f */named.run
 rm -f */ans.run
 rm -f dig.out dig.out1 dig.out2 dig.out3
similarity index 91%
rename from bin/tests/system/ixfr/ns3/named.conf
rename to bin/tests/system/ixfr/ns3/named.conf.in
index c4288ac234448c92efac7f13cb5a255fb1bd6820..e497b41d69468aa31cc7ea7c6cf7f3f1cd7d8975 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.3 2011/09/07 23:46:27 tbox Exp $ */
-
 options {
        query-source address 10.53.0.3;
        notify-source 10.53.0.3;
        transfer-source 10.53.0.3;
        allow-transfer { any; };
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.3; };
        listen-on-v6 { none; };
@@ -35,7 +33,7 @@ key rndc_key {
 };
 
 controls {
-       inet 10.53.0.3 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.3 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 view "primary" {
similarity index 76%
rename from bin/tests/system/ixfr/ns4/named.conf
rename to bin/tests/system/ixfr/ns4/named.conf.in
index b8c8e8cc1ca965643b1374e643e1aaf1a5ae0d10..05ed3fa128f46271bd668c118a39649eb21826cd 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.3 2011/09/07 23:46:28 tbox Exp $ */
-
 options {
-        query-source address 10.53.0.4;
-        notify-source 10.53.0.4;
-        transfer-source 10.53.0.4;
-        port 5300;
-        pid-file "named.pid";
-        listen-on { 10.53.0.4; };
-        listen-on-v6 { none; };
-        recursion no;
-        notify yes;
+       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;
+       notify yes;
 };
 
 key rndc_key {
@@ -34,7 +32,7 @@ key rndc_key {
 };
 
 controls {
-        inet 10.53.0.4 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.4 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 view "primary" {
index 4b064015d43b48365990b2049d6f368442f3f682..87796fec5c19b019d88c984ab3c1e15bda13df85 100644 (file)
@@ -19,6 +19,6 @@ if $PERL -e 'use Net::DNS;' 2>/dev/null
 then
     :
 else
-    echo "I:This test requires the Net::DNS library." >&2
+    echo_i "This test requires the Net::DNS library." >&2
     exit 1
 fi
index 9715b06945bc3f5a9040c63ed9aa4d3d86d0beae..464f34278efe180147b44a1f17632441476d7913 100644 (file)
@@ -25,7 +25,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; };
@@ -39,10 +39,13 @@ key rndc_key {
 };
 
 controls {
-       inet 10.53.0.1 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.1 port ${CONTROLPORT} allow { any; } keys { rndc_key; };
 };
 EOF
 
+copy_setports ns3/named.conf.in ns3/named.conf
+copy_setports ns4/named.conf.in ns4/named.conf
+
 # Setup initial db files for ns3
 cp ns3/mytest0.db ns3/mytest.db
 cp ns3/subtest0.db ns3/subtest.db
index a64e6d9a6e28928205082eeb88aa289fc8bbe220..aa1d567ae9262871c013a5655c4797aed3d15c4d 100644 (file)
@@ -15,9 +15,6 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id$
-
-
 # WARNING: The test labelled "testing request-ixfr option in view vs zone"
 #          is fragile because it depends upon counting instances of records
 #          in the log file - need a better approach <sdm> - until then,
@@ -28,12 +25,11 @@ SYSTEMTESTTOP=..
 
 status=0
 
-DIGOPTS="+tcp +noadd +nosea +nostat +noquest +nocomm +nocmd"
-DIGCMD="$DIG $DIGOPTS @10.53.0.1 -p 5300"
-SENDCMD="$PERL ../send.pl 10.53.0.2 5301"
-RNDCCMD="$RNDC -s 10.53.0.1 -p 9953 -c ../common/rndc.conf"
+DIGOPTS="+tcp +noadd +nosea +nostat +noquest +nocomm +nocmd -p ${PORT}"
+SENDCMD="$PERL ../send.pl 10.53.0.2 ${EXTRAPORT1}"
+RNDCCMD="$RNDC -p ${CONTROLPORT} -c ../common/rndc.conf -s"
 
-echo "I:testing initial AXFR"
+echo_i "testing initial AXFR"
 
 $SENDCMD <<EOF
 /SOA/
@@ -63,21 +59,21 @@ zone "nil" {
 };
 EOF
 
-$RNDCCMD reload
+$RNDCCMD 10.53.0.1 reload
 
 for i in 0 1 2 3 4 5 6 7 8 9
 do
-       $DIGCMD nil. SOA > dig.out
+       $DIG $DIGOPTS @10.53.0.1 nil. SOA > dig.out
        grep "SOA" dig.out > /dev/null && break
        sleep 1
 done
 
-$DIGCMD nil. TXT | grep 'initial AXFR' >/dev/null || {
-    echo "I:failed"
+$DIG $DIGOPTS @10.53.0.1 nil. TXT | grep 'initial AXFR' >/dev/null || {
+    echo_i "failed"
     status=1
 }
 
-echo "I:testing successful IXFR"
+echo_i "testing successful IXFR"
 
 # We change the IP address of a.nil., and the TXT record at the apex.
 # Then we do a SOA-only update.
@@ -100,16 +96,16 @@ EOF
 
 sleep 1
 
-$RNDCCMD refresh nil
+$RNDCCMD 10.53.0.1 refresh nil
 
 sleep 2
 
-$DIGCMD nil. TXT | grep 'successful IXFR' >/dev/null || {
-    echo "I:failed"
+$DIG $DIGOPTS @10.53.0.1 nil. TXT | grep 'successful IXFR' >/dev/null || {
+    echo_i "failed"
     status=1
 }
 
-echo "I:testing AXFR fallback after IXFR failure"
+echo_i "testing AXFR fallback after IXFR failure"
 
 # Provide a broken IXFR response and a working fallback AXFR response
 
@@ -134,34 +130,34 @@ EOF
 
 sleep 1
 
-$RNDCCMD refresh nil
+$RNDCCMD 10.53.0.1 refresh nil
 
 sleep 2
 
-$DIGCMD nil. TXT | grep 'fallback AXFR' >/dev/null || {
-    echo "I:failed"
+$DIG $DIGOPTS @10.53.0.1 nil. TXT | grep 'fallback AXFR' >/dev/null || {
+    echo_i "failed"
     status=1
 }
 
-echo "I:testing ixfr-from-differences option"
-# ns3 is master; ns4 is slave 
+echo_i "testing ixfr-from-differences option"
+# ns3 is master; ns4 is slave
 $CHECKZONE test. ns3/mytest.db > /dev/null 2>&1
 if [ $? -ne 0 ]
 then
-    echo "I:named-checkzone returned failure on ns3/mytest.db"
+    echo_i "named-checkzone returned failure on ns3/mytest.db"
 fi
 # modify the master
-#echo "I: digging against master: "
-#$DIG $DIGOPTS @10.53.0.3 -p 5300 a host1.test.
-#echo "I: digging against slave: "
-#$DIG $DIGOPTS @10.53.0.4 -p 5300 a host1.test.
+#echo_i "digging against master: "
+#$DIG $DIGOPTS @10.53.0.3 a host1.test.
+#echo_i "digging against slave: "
+#$DIG $DIGOPTS @10.53.0.4 a host1.test.
 
 cp ns3/mytest1.db ns3/mytest.db
-$RNDC -s 10.53.0.3 -p 9953 -c ../common/rndc.conf reload
+$RNDCCMD 10.53.0.3 reload
 
 for i in 0 1 2 3 4 5 6 7 8 9
 do
-       $DIG +tcp -p 5300 @10.53.0.4 SOA test > dig.out
+       $DIG $DIGOPTS +tcp @10.53.0.4 SOA test > dig.out
        grep -i "hostmaster\.test\..2" dig.out > /dev/null && break
        sleep 1
 done
@@ -176,28 +172,28 @@ do
 done
 if [ $INCR -ne 1 ]
 then
-    echo "I:failed to get incremental response"
+    echo_i "failed to get incremental response"
     status=1
 fi
 
-echo "I:testing request-ixfr option in view vs zone"
+echo_i "testing request-ixfr option in view vs zone"
 # There's a view with 2 zones. In the view, "request-ixfr yes"
 # but in the zone "sub.test", request-ixfr no"
 # we want to make sure that a change to sub.test results in AXFR, while
 # changes to test. result in IXFR
 
-echo "I: this result should be AXFR"
+echo_i " this result should be AXFR"
 cp ns3/subtest1.db ns3/subtest.db # change to sub.test zone, should be AXFR
-$RNDC -s 10.53.0.3 -p 9953 -c ../common/rndc.conf reload
+$RNDCCMD 10.53.0.3 reload
 
 for i in 0 1 2 3 4 5 6 7 8 9
 do
-       $DIG +tcp -p 5300 @10.53.0.4 SOA sub.test > dig.out
+       $DIG $DIGOPTS +tcp @10.53.0.4 SOA sub.test > dig.out
        grep -i "hostmaster\.test\..3" dig.out > /dev/null && break
        sleep 1
 done
 
-echo "I: this result should be AXFR"
+echo_i " this result should be AXFR"
 for i in 0 1 2 3 4 5 6 7 8 9
 do
        NONINCR=`grep 'sub\.test/IN/primary' ns4/named.run|grep "got nonincremental" | wc -l`
@@ -206,19 +202,19 @@ do
 done
 if [ $NONINCR -ne 2 ]
 then
-    echo "I:failed to get nonincremental response in 2nd AXFR test"
+    echo_i "failed to get nonincremental response in 2nd AXFR test"
     status=1
 else
-    echo "I:  success: AXFR it was"
+    echo_i "  success: AXFR it was"
 fi
 
-echo "I: this result should be IXFR"
+echo_i " this result should be IXFR"
 cp ns3/mytest2.db ns3/mytest.db # change to test zone, should be IXFR
-$RNDC -s 10.53.0.3 -p 9953 -c ../common/rndc.conf reload
+$RNDCCMD 10.53.0.3 reload
 
 for i in 0 1 2 3 4 5 6 7 8 9
 do
-       $DIG +tcp -p 5300 @10.53.0.4 SOA test > dig.out
+       $DIG $DIGOPTS +tcp @10.53.0.4 SOA test > dig.out
        grep -i "hostmaster\.test\..4" dig.out > /dev/null && break
        sleep 1
 done
@@ -231,39 +227,39 @@ do
 done
 if [ $INCR -ne 2 ]
 then
-    echo "I:failed to get incremental response in 2nd IXFR test"
+    echo_i "failed to get incremental response in 2nd IXFR test"
     status=1
 else
-    echo "I:  success: IXFR it was"
+    echo_i "  success: IXFR it was"
 fi
 
-echo "I:testing DiG's handling of a multi message AXFR style IXFR response" 
+echo_i "testing DiG's handling of a multi message AXFR style IXFR response"
 (
 (sleep 10 && kill $$) 2>/dev/null &
 sub=$!
-$DIG ixfr=0 large -p 5300 @10.53.0.3 > dig.out
+$DIG -p ${PORT} ixfr=0 large @10.53.0.3 > dig.out
 kill $sub
 )
 lines=`grep hostmaster.large dig.out | wc -l`
-test ${lines:-0} -eq 2 || { echo "I:failed"; status=1; }
+test ${lines:-0} -eq 2 || { echo_i "failed"; status=1; }
 messages=`sed -n 's/^;;.*messages \([0-9]*\),.*/\1/p' dig.out`
-test ${messages:-0} -gt 1 || { echo "I:failed"; status=1; }
+test ${messages:-0} -gt 1 || { echo_i "failed"; status=1; }
 
-echo "I:test 'dig +notcp ixfr=<value>' vs 'dig ixfr=<value> +notcp' vs 'dig ixfr=<value>'"
+echo_i "test 'dig +notcp ixfr=<value>' vs 'dig ixfr=<value> +notcp' vs 'dig ixfr=<value>'"
 ret=0
 # Should be "switch to TCP" response
-$DIG +notcp ixfr=1 test -p 5300 @10.53.0.4 > dig.out1 || ret=1
-$DIG ixfr=1 +notcp test -p 5300 @10.53.0.4 > dig.out2 || ret=1
+$DIG $DIGOPTS +notcp ixfr=1 test @10.53.0.4 > dig.out1 || ret=1
+$DIG $DIGOPTS ixfr=1 +notcp test @10.53.0.4 > dig.out2 || ret=1
 $PERL ../digcomp.pl dig.out1 dig.out2 || ret=1
 awk '$4 == "SOA" { soacnt++} END {if (soacnt == 1) exit(0); else exit(1);}' dig.out1 || ret=1
 awk '$4 == "SOA" { if ($7 == 4) exit(0); else exit(1);}' dig.out1 || ret=1
 # Should be incremental transfer.
-$DIG ixfr=1 test -p 5300 @10.53.0.4 > dig.out3 || ret=1
+$DIG $DIGOPTS ixfr=1 test @10.53.0.4 > dig.out3 || ret=1
 awk '$4 == "SOA" { soacnt++} END { if (soacnt == 6) exit(0); else exit(1);}' dig.out3 || ret=1
 if [ ${ret} != 0 ]; then
-       echo "I:failed";
+       echo_i "failed";
        status=1;
 fi
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index 5e4632fa3288e3303986f9dd354bbc5fbd616e5d..eb2a10521c96ad6ebb78b839270016d0abd84457 100644 (file)
@@ -13,7 +13,7 @@
 # PERFORMANCE OF THIS SOFTWARE.
 
 rm -f dig.out.*
-rm -f ns1/named.conf
+rm -f ns?/named.conf
 rm -f ns?/named.memstats
 rm -f ns?/named.run
 
similarity index 94%
rename from bin/tests/system/legacy/ns1/named2.conf
rename to bin/tests/system/legacy/ns1/named1.conf.in
index 03459c8bbd7c684a014c741a4fda8300ecfc30fb..4d59d7f39265443cb639fbba63487c71616de8e6 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-controls { /* empty */ };
-
 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; };
@@ -31,5 +29,3 @@ zone "." {
        type master;
        file "root.db";
 };
-
-include "trusted.conf";
similarity index 96%
rename from bin/tests/system/legacy/ns1/named1.conf
rename to bin/tests/system/legacy/ns1/named2.conf.in
index 7e92843b44ff30f181e6f536985db9726e069444..911d8b5c7251663a8e5fbdbe67e6b9c07127bd27 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-controls { /* empty */ };
-
 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; };
@@ -31,3 +29,5 @@ zone "." {
        type master;
        file "root.db";
 };
+
+include "trusted.conf";
similarity index 96%
rename from bin/tests/system/legacy/ns2/named.conf
rename to bin/tests/system/legacy/ns2/named.conf.in
index e5cebdf685539c49bc1a69664fb9bab72bbc50cc..c8003e646546d1068d27c653efd16ad463eb4565 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-controls { /* empty */ };
-
 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 96%
rename from bin/tests/system/legacy/ns3/named.conf
rename to bin/tests/system/legacy/ns3/named.conf.in
index 03d707eae2feb419152af24de9531b916de37ba3..7493c1993bd473de9f84c8c495e6e9a60feb392f 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-controls { /* empty */ };
-
 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; };
similarity index 96%
rename from bin/tests/system/legacy/ns4/named.conf
rename to bin/tests/system/legacy/ns4/named.conf.in
index 8a1bbced11cf07e000980dfbceeca76ff467c4b4..cba66b05bf7b7cf6ae736278889fb7e13e8a6eec 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-controls { /* empty */ };
-
 options {
        query-source address 10.53.0.4;
        notify-source 10.53.0.4;
        transfer-source 10.53.0.4;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.4; };
        listen-on-v6 { none; };
similarity index 96%
rename from bin/tests/system/legacy/ns5/named.conf
rename to bin/tests/system/legacy/ns5/named.conf.in
index 2133938229f6f507359c49b66c6246f200d8c1f6..9116b9d48b991bb35e07c093ea2dfd67f51ee122 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-controls { /* empty */ };
-
 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";
        listen-on { 10.53.0.5; };
        listen-on-v6 { none; };
similarity index 96%
rename from bin/tests/system/legacy/ns6/named.conf
rename to bin/tests/system/legacy/ns6/named.conf.in
index 1f3dfb7ee65f2336faa1834ca15510e1a27b3239..e74b994f2981cadda539b9fac2785a1c30ed6300 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-controls { /* empty */ };
-
 options {
        query-source address 10.53.0.6;
        notify-source 10.53.0.6;
        transfer-source 10.53.0.6;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.6; };
        listen-on-v6 { none; };
index fa83485714bb7b4bc96f5246168ff1434da38fb1..d8dfbabd79e91ff19d39a5afdc7dcef6466a544c 100755 (executable)
@@ -17,7 +17,7 @@
 SYSTEMTESTTOP=../..
 . $SYSTEMTESTTOP/conf.sh
 
-echo "I:sign edns512"
+echo_i "sign edns512"
 
 zone=edns512
 infile=edns512.db.in
similarity index 96%
rename from bin/tests/system/legacy/ns7/named.conf
rename to bin/tests/system/legacy/ns7/named.conf.in
index 8cb0818153bb881eca4a7600df039d79ebd151a6..68541255142db1832f8d568b724795e36dc7b0a1 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-controls { /* empty */ };
-
 options {
        query-source address 10.53.0.7;
        notify-source 10.53.0.7;
        transfer-source 10.53.0.7;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.7; };
        listen-on-v6 { none; };
index e48218cb361ced1db854ca7a7f793d60c2273070..4e8ca3248cfc397c23e9a2b655d68fa76d62f0e9 100755 (executable)
@@ -17,7 +17,7 @@
 SYSTEMTESTTOP=../..
 . $SYSTEMTESTTOP/conf.sh
 
-echo "I:sign edns512-notcp"
+echo_i "sign edns512-notcp"
 
 zone=edns512-notcp
 infile=edns512-notcp.db.in
index 5f190fa64b601ae648a84dfd096501e7209ae214..7fb23e107aae1b0f8b87b7207910fb155ffceaf6 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright (C) 2014  Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C)  Internet Systems Consortium, Inc. ("ISC")
 #
 # Permission to use, copy, modify, and/or distribute this software for any
 # purpose with or without fee is hereby granted, provided that the above
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
-cp -f ns1/named1.conf ns1/named.conf
+$SHELL clean.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
index 0f5282ba3f256328e1fc839c09e6972346c87d26..d20862ebcd45b0cd1d74b7b941b63e4239c64aa5 100755 (executable)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id$
-
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
+DIGOPTS="-p ${PORT}"
+
 status=0
 n=0
 
 n=`expr $n + 1`
-echo "I:checking drop edns server setup ($n)"
+echo_i "checking drop edns server setup ($n)"
 ret=0
-$DIG +edns @10.53.0.2 -p 5300 dropedns soa > dig.out.1.test$n
+$DIG $DIGOPTS +edns @10.53.0.2 dropedns soa > dig.out.1.test$n
 grep "connection timed out; no servers could be reached" dig.out.1.test$n > /dev/null || ret=1
-$DIG +noedns @10.53.0.2 -p 5300 dropedns soa > dig.out.2.test$n || 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 +noedns +tcp @10.53.0.2 -p 5300 dropedns soa > dig.out.3.test$n || 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 +edns +tcp @10.53.0.2 -p 5300 dropedns soa > dig.out.4.test$n
+$DIG $DIGOPTS +edns +tcp @10.53.0.2 dropedns soa > dig.out.4.test$n
 grep "connection timed out; no servers could be reached" dig.out.4.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking recursive lookup to drop edns server succeeds ($n)"
+echo_i "checking recursive lookup to drop edns server succeeds ($n)"
 ret=0
-$DIG +tcp  @10.53.0.1 -p 5300 dropedns soa > dig.out.test$n || ret=1
+$DIG $DIGOPTS +tcp @10.53.0.1 dropedns soa > dig.out.test$n || ret=1
 grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking drop edns + no tcp server setup ($n)"
+echo_i "checking drop edns + no tcp server setup ($n)"
 ret=0
-$DIG +edns @10.53.0.3 -p 5300 dropedns-notcp soa > dig.out.1.test$n
+$DIG $DIGOPTS +edns @10.53.0.3 dropedns-notcp soa > dig.out.1.test$n
 grep "connection timed out; no servers could be reached" dig.out.1.test$n > /dev/null || ret=1
-$DIG +noedns +tcp  @10.53.0.3 -p 5300 dropedns-notcp soa > dig.out.2.test$n
+$DIG $DIGOPTS +noedns +tcp @10.53.0.3 dropedns-notcp soa > dig.out.2.test$n
 grep "connection timed out; no servers could be reached" dig.out.2.test$n > /dev/null
-$DIG +noedns @10.53.0.3 -p 5300 dropedns-notcp soa > dig.out.3.test$n || 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
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking recursive lookup to drop edns + no tcp server succeeds ($n)"
+echo_i "checking recursive lookup to drop edns + no tcp server succeeds ($n)"
 ret=0
-$DIG +tcp  @10.53.0.1 -p 5300 dropedns-notcp soa > dig.out.test$n || ret=1
+$DIG $DIGOPTS +tcp @10.53.0.1 dropedns-notcp soa > dig.out.test$n || ret=1
 grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking plain dns server setup ($n)"
+echo_i "checking plain dns server setup ($n)"
 ret=0
-$DIG +edns @10.53.0.4 -p 5300 plain soa > dig.out.1.test$n || ret=1
+$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
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking recursive lookup to plain dns server succeeds ($n)"
+echo_i "checking recursive lookup to plain dns server succeeds ($n)"
 ret=0
-$DIG +tcp  @10.53.0.1 -p 5300 plain soa > dig.out.test$n || ret=1
+$DIG $DIGOPTS +tcp @10.53.0.1 plain soa > dig.out.test$n || ret=1
 grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking plain dns + no tcp server setup ($n)"
+echo_i "checking plain dns + no tcp server setup ($n)"
 ret=0
-$DIG +edns @10.53.0.5 -p 5300 plain-notcp soa > dig.out.1.test$n || ret=1
+$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 +edns +tcp @10.53.0.5 -p 5300 plain-notcp soa > dig.out.2.test$n
+$DIG $DIGOPTS +edns +tcp @10.53.0.5 plain-notcp soa > dig.out.2.test$n
 grep "connection timed out; no servers could be reached" dig.out.2.test$n > /dev/null
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking recursive lookup to plain dns + no tcp server succeeds ($n)"
+echo_i "checking recursive lookup to plain dns + no tcp server succeeds ($n)"
 ret=0
-$DIG +tcp  @10.53.0.1 -p 5300 plain-notcp soa > dig.out.test$n || ret=1
+$DIG $DIGOPTS +tcp @10.53.0.1 plain-notcp soa > dig.out.test$n || ret=1
 grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 n=`expr $n + 1`
 
-echo "I:checking edns 512 server setup ($n)"
+echo_i "checking edns 512 server setup ($n)"
 ret=0
-$DIG +edns @10.53.0.6 -p 5300 edns512 soa > dig.out.1.test$n || ret=1
+$DIG $DIGOPTS +edns @10.53.0.6 edns512 soa > dig.out.1.test$n || ret=1
 grep "status: NOERROR" dig.out.1.test$n > /dev/null || ret=1
-$DIG +edns +tcp  @10.53.0.6 -p 5300 edns512 soa > dig.out.2.test$n || ret=1
+$DIG $DIGOPTS +edns +tcp @10.53.0.6 edns512 soa > dig.out.2.test$n || ret=1
 grep "status: NOERROR" dig.out.1.test$n > /dev/null || ret=1
-$DIG +edns @10.53.0.6 -p 5300 txt500.edns512 txt > dig.out.3.test$n
+$DIG $DIGOPTS +edns @10.53.0.6 txt500.edns512 txt > dig.out.3.test$n
 grep "connection timed out; no servers could be reached" dig.out.3.test$n > /dev/null
-$DIG +edns +bufsize=512 +ignor @10.53.0.6 -p 5300 txt500.edns512 txt > dig.out.4.test$n
+$DIG $DIGOPTS +edns +bufsize=512 +ignor @10.53.0.6 txt500.edns512 txt > dig.out.4.test$n
 grep "status: NOERROR" dig.out.4.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking recursive lookup to edns 512 server succeeds ($n)"
+echo_i "checking recursive lookup to edns 512 server succeeds ($n)"
 ret=0
-$DIG +tcp  @10.53.0.1 -p 5300 txt500.edns512 txt > dig.out.test$n || ret=1
+$DIG $DIGOPTS +tcp @10.53.0.1 txt500.edns512 txt > dig.out.test$n || ret=1
 grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking edns 512 + no tcp server setup ($n)"
+echo_i "checking edns 512 + no tcp server setup ($n)"
 ret=0
-$DIG +noedns @10.53.0.7 -p 5300 edns512-notcp soa > dig.out.1.test$n || ret=1
+$DIG $DIGOPTS +noedns @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
-$DIG +noedns +tcp  @10.53.0.7 -p 5300 edns512-notcp soa > dig.out.2.test$n
+$DIG $DIGOPTS +noedns +tcp @10.53.0.7 edns512-notcp soa > dig.out.2.test$n
 grep "connection timed out; no servers could be reached" dig.out.2.test$n > /dev/null
-$DIG +edns @10.53.0.7 -p 5300 edns512-notcp soa > dig.out.3.test$n
+$DIG $DIGOPTS +edns @10.53.0.7 edns512-notcp soa > dig.out.3.test$n
 grep "connection timed out; no servers could be reached" dig.out.3.test$n > /dev/null
-$DIG +edns +bufsize=512 +ignor @10.53.0.7 -p 5300 edns512-notcp soa > dig.out.4.test$n
+$DIG $DIGOPTS +edns +bufsize=512 +ignor @10.53.0.7 edns512-notcp soa > dig.out.4.test$n
 grep "status: NOERROR" dig.out.4.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking recursive lookup to edns 512 + no tcp server succeeds ($n)"
+echo_i "checking recursive lookup to edns 512 + no tcp server succeeds ($n)"
 ret=0
-$DIG +tcp  @10.53.0.1 -p 5300 edns512-notcp soa > dig.out.test$n || ret=1
+$DIG $DIGOPTS +tcp @10.53.0.1 edns512-notcp soa > dig.out.test$n || ret=1
 grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 if $SHELL ../testcrypto.sh > /dev/null 2>&1
 then
     $PERL $SYSTEMTESTTOP/stop.pl . ns1
 
-    cp -f ns1/named2.conf ns1/named.conf
+    copy_setports ns1/named2.conf.in ns1/named.conf
 
-    $PERL $SYSTEMTESTTOP/start.pl --noclean --restart . ns1
+    $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . ns1
 
     n=`expr $n + 1`
-    echo "I:checking recursive lookup to edns 512 + no tcp + trust anchor fails ($n)"
+    echo_i "checking recursive lookup to edns 512 + no tcp + trust anchor fails ($n)"
     ret=0
-    $DIG +tcp  @10.53.0.1 -p 5300 edns512-notcp soa > dig.out.test$n
+    $DIG $DIGOPTS +tcp @10.53.0.1 edns512-notcp soa > dig.out.test$n
     grep "status: SERVFAIL" dig.out.test$n > /dev/null ||
         grep "connection timed out;" dig.out.test$n > /dev/null || ret=1
-    if [ $ret != 0 ]; then echo "I:failed"; fi
+    if [ $ret != 0 ]; then echo_i "failed"; fi
     status=`expr $status + $ret`
 else
-    echo "I:skipping checking recursive lookup to edns 512 + no tcp + trust anchor fails as crypto not enabled"
+    echo_i "skipping checking recursive lookup to edns 512 + no tcp + trust anchor fails as crypto not enabled"
 fi 
 
-
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index 62f9ff2c560cf1da80bba125232970bab84cf46d..55f48dbac61876f81385ed156eac5d48c162eb11 100644 (file)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: clean.sh,v 1.11 2007/09/26 03:22:44 marka Exp $
-
 #
 # Clean up after limits tests.
 #
 rm -f dig.out.*
 rm -f */named.memstats
+rm -f */named.conf
 rm -f */named.run
similarity index 92%
rename from bin/tests/system/limits/ns1/named.conf
rename to bin/tests/system/limits/ns1/named.conf.in
index e8e439e1f14ec7b2f84e4580fa2a3cf51326827a..aeb0634af902a9d50a399472d4709b2f5c4d23a1 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.14 2007/06/19 23:47:03 tbox Exp $ */
-
-controls { /* empty */ };
-
 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; };
diff --git a/bin/tests/system/limits/setup.sh b/bin/tests/system/limits/setup.sh
new file mode 100644 (file)
index 0000000..c69f051
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+#
+# Copyright (C)  2018  Internet Systems Consortium, Inc. ("ISC")
+#
+# 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 http://mozilla.org/MPL/2.0/.
+
+SYSTEMTESTTOP=..
+. $SYSTEMTESTTOP/conf.sh
+
+$SHELL clean.sh
+copy_setports ns1/named.conf.in ns1/named.conf
index 95fe04c4fd41f0cdda24ea68da218fd6eccace62..966fdd5f8008303f94b8b3b3be270dbd2ebab809 100644 (file)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: tests.sh,v 1.19 2011/11/04 23:46:15 tbox Exp $
-
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
+DIGOPTS="-p ${PORT}"
+
 status=0
 
-echo "I:1000 A records"
-$DIG +tcp +norec 1000.example. @10.53.0.1 a -p 5300 > dig.out.1000 || status=1
-#dig 1000.example. @10.53.0.1 a -p 5300 > knowngood.dig.out.1000
+echo_i "1000 A records"
+$DIG $DIGOPTS +tcp +norec 1000.example. @10.53.0.1 a > dig.out.1000 || status=1
+# $DIG $DIGOPTS 1000.example. @10.53.0.1 a > knowngood.dig.out.1000
 $PERL ../digcomp.pl knowngood.dig.out.1000 dig.out.1000 || status=1
 
-echo "I:2000 A records"
-$DIG +tcp +norec 2000.example. @10.53.0.1 a -p 5300 > dig.out.2000 || status=1
-#dig 2000.example. @10.53.0.1 a -p 5300 > knowngood.dig.out.2000
+echo_i "2000 A records"
+$DIG $DIGOPTS +tcp +norec 2000.example. @10.53.0.1 a > dig.out.2000 || status=1
+# $DIG $DIGOPTS 2000.example. @10.53.0.1 a > knowngood.dig.out.2000
 $PERL ../digcomp.pl knowngood.dig.out.2000 dig.out.2000 || status=1
 
-echo "I:3000 A records"
-$DIG +tcp +norec 3000.example. @10.53.0.1 a -p 5300 > dig.out.3000 || status=1
-#dig 3000.example. @10.53.0.1 a -p 5300 > knowngood.dig.out.3000
+echo_i "3000 A records"
+$DIG $DIGOPTS +tcp +norec 3000.example. @10.53.0.1 a > dig.out.3000 || status=1
+# $DIG $DIGOPTS 3000.example. @10.53.0.1 a > knowngood.dig.out.3000
 $PERL ../digcomp.pl knowngood.dig.out.3000 dig.out.3000 || status=1
 
-echo "I:4000 A records"
-$DIG +tcp +norec 4000.example. @10.53.0.1 a -p 5300 > dig.out.4000 || status=1
-#dig 4000.example. @10.53.0.1 a -p 5300 > knowngood.dig.out.4000
+echo_i "4000 A records"
+$DIG $DIGOPTS +tcp +norec 4000.example. @10.53.0.1 a > dig.out.4000 || status=1
+# $DIG $DIGOPTS 4000.example. @10.53.0.1 a > knowngood.dig.out.4000
 $PERL ../digcomp.pl knowngood.dig.out.4000 dig.out.4000 || status=1
 
-echo "I:exactly maximum rrset"
-$DIG +tcp +norec +noedns a-maximum-rrset.example. @10.53.0.1 a -p 5300 > dig.out.a-maximum-rrset \
+echo_i "exactly maximum rrset"
+$DIG $DIGOPTS +tcp +norec +noedns a-maximum-rrset.example. @10.53.0.1 a > dig.out.a-maximum-rrset \
        || status=1
-#dig a-maximum-rrset.example. @10.53.0.1 a -p 5300 > knowngood.dig.out.a-maximum-rrset
+# $DIG $DIGOPTS a-maximum-rrset.example. @10.53.0.1 a > knowngood.dig.out.a-maximum-rrset
 $PERL ../digcomp.pl knowngood.dig.out.a-maximum-rrset dig.out.a-maximum-rrset || status=1
 
-echo "I:exceed maximum rrset (5000 A records)"
-$DIG +tcp +norec +noadd 5000.example. @10.53.0.1 a -p 5300 > dig.out.exceed || status=1
+echo_i "exceed maximum rrset (5000 A records)"
+$DIG $DIGOPTS +tcp +norec +noadd 5000.example. @10.53.0.1 a > dig.out.exceed || status=1
 # Look for truncation bit (tc).
 grep 'flags: .*tc.*;' dig.out.exceed > /dev/null || {
-    echo "I:TC bit was not set"
+    echo_i "TC bit was not set"
     status=1
 }
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index becb05d2be322e92cc69f75e1303431fbc17a383..2c1d9ed5aeae30bfc3b074c6530f453b7c102d88 100644 (file)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: clean.sh,v 1.4 2011/03/22 16:51:50 smann Exp $
-
 #
 # Clean up after log file tests
 #
+rm -f ns1/rndc.conf
+rm -f ns1/controls.conf
+rm -f ns1/named.conf
 rm -f ns1/named.pid ns1/named.run
 rm -f ns1/named.memstats ns1/dig.out
 rm -f ns1/named_log ns1/named_pipe ns1/named_sym
-rm -f ns1/named.conf
 rm -rf ns1/named_dir
 rm -f ns1/query_log
 rm -f ns1/rndc.out.test*
diff --git a/bin/tests/system/logfileconfig/ns1/controls.conf.in b/bin/tests/system/logfileconfig/ns1/controls.conf.in
new file mode 100644 (file)
index 0000000..bc5b110
--- /dev/null
@@ -0,0 +1,13 @@
+/*
+ * Copyright (C) 2018  Internet Systems Consortium, Inc. ("ISC")
+ *
+ * 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 http://mozilla.org/MPL/2.0/.
+ */
+
+controls {
+        inet 127.0.0.1 port @CONTROLPORT@
+                allow { 127.0.0.1/32; ::1/128; }
+                keys { "rndc-key"; };
+};
index 9cbd03900c439675587c125e06fa29b627d05c42..a7bb5341b23b171f3a9846a0902580d8d6c5cddd 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.dirconf,v 1.2 2011/03/04 14:43:57 smann Exp $ */
-
 options {
-        query-source address 10.53.0.1;
-        notify-source 10.53.0.1;
-        transfer-source 10.53.0.1;
-        port 5300;
-        pid-file "named.pid";
-        listen-on port 5300 {
-                10.53.0.1;
-        };
-        listen-on-v6 { none; };
+       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 no;
        notify yes;
 };
@@ -39,11 +35,7 @@ logging {
         category lame-servers { null; };
 };
 
-controls {
-    inet 127.0.0.1 port 9593 allow {
-                         127.0.0.1/32; ::1/128; }
-                         keys { "rndc-key"; };
-};
+include "controls.conf";
 
 key "rndc-key" {
         algorithm hmac-md5;
index bf5d02f2cc840d8e82633b0caf97e601bff7d0ca..258db0d97ccdde5aae3c21a574b818d677aeb65d 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.pipeconf,v 1.2 2011/03/04 14:43:57 smann Exp $ */
-
 options {
-        query-source address 10.53.0.1;
-        notify-source 10.53.0.1;
-        transfer-source 10.53.0.1;
-        port 5300;
-        pid-file "named.pid";
-        listen-on port 5300 {
-                10.53.0.1;
-        };
-        listen-on-v6 { none; };
+       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 no;
        notify yes;
 };
@@ -39,11 +35,7 @@ logging {
         category lame-servers { null; };
 };
 
-controls {
-    inet 127.0.0.1 port 9593 allow {
-                         127.0.0.1/32; ::1/128; }
-                         keys { "rndc-key"; };
-};
+include "controls.conf";
 
 key "rndc-key" {
         algorithm hmac-md5;
index 64cfbfad9388fcf301c8c98ddffccc418b6425b3..1d7b0587725b3ca95cd056f091a91da27a7bbe2f 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.plain,v 1.2 2011/03/04 14:43:57 smann Exp $ */
-
 options {
-        query-source address 10.53.0.1;
-        notify-source 10.53.0.1;
-        transfer-source 10.53.0.1;
-        port 5300;
-        pid-file "named.pid";
-        listen-on port 5300 {
-                10.53.0.1;
-        };
-        listen-on-v6 { none; };
+       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 no;
        notify yes;
 };
@@ -39,18 +35,13 @@ logging {
         category lame-servers { null; };
 };
 
-controls {
-    inet 127.0.0.1 port 9593 allow {
-                         127.0.0.1/32; ::1/128; }
-                         keys { "rndc-key"; };
-};
+include "controls.conf";
 
 key "rndc-key" {
         algorithm hmac-md5;
         secret "Am9vCg==";
 };
 
-
 zone "." {
        type master;
        file "root.db";
index fc3f9bdbf5d82327bf3fa91805fca49636d30fad..edf04e96764428e19889a4d09542108e8ab2ec8d 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.symconf,v 1.2 2011/03/04 14:43:57 smann Exp $ */
-
 options {
-        query-source address 10.53.0.1;
-        notify-source 10.53.0.1;
-        transfer-source 10.53.0.1;
-        port 5300;
-        pid-file "named.pid";
-        listen-on port 5300 {
-                10.53.0.1;
-        };
-        listen-on-v6 { none; };
+       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 no;
        notify yes;
 };
@@ -39,11 +35,7 @@ logging {
         category lame-servers { null; };
 };
 
-controls {
-    inet 127.0.0.1 port 9593 allow {
-                         127.0.0.1/32; ::1/128; }
-                         keys { "rndc-key"; };
-};
+include "controls.conf";
 
 key "rndc-key" {
         algorithm hmac-md5;
index 2dfc14e940ae4f838a66870dcd00e33ddfdfb428..7ba6374e72cd762e82a59d7bedf0ed05af710cd3 100644 (file)
@@ -18,11 +18,9 @@ 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 port 5300 {
-               10.53.0.1;
-       };
+       listen-on { 10.53.0.1; };
        listen-on-v6 { none; };
        recursion no;
        notify yes;
@@ -44,11 +42,7 @@ logging {
        category queries { query_log; };
 };
 
-controls {
-    inet 127.0.0.1 port 9593 allow {
-                        127.0.0.1/32; ::1/128; }
-                        keys { "rndc-key"; };
-};
+include "controls.conf";
 
 key "rndc-key" {
        algorithm hmac-sha256;
index cc4efc5569c8ecb750999ebb56c90986d81847c6..ea5ca5fd0e11597763ca47c530168ed69d747f95 100644 (file)
@@ -18,11 +18,9 @@ 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 port 5300 {
-               10.53.0.1;
-       };
+       listen-on { 10.53.0.1; };
        listen-on-v6 { none; };
        recursion no;
        notify yes;
@@ -44,11 +42,7 @@ logging {
        category queries { query_log; };
 };
 
-controls {
-    inet 127.0.0.1 port 9593 allow {
-                        127.0.0.1/32; ::1/128; }
-                        keys { "rndc-key"; };
-};
+include "controls.conf";
 
 key "rndc-key" {
        algorithm hmac-sha256;
similarity index 95%
rename from bin/tests/system/logfileconfig/ns1/rndc.conf
rename to bin/tests/system/logfileconfig/ns1/rndc.conf.in
index b28630adcc2d379e945627c6093c2aab4d1ec35a..642c6601e28f3c245bbc8b7cabb37507112e1755 100644 (file)
@@ -20,7 +20,7 @@ options {
 
 server 127.0.0.1 {
        key "rndc-key";
-       addresses   { 127.0.0.1 port 9593; };
+       addresses   { 127.0.0.1 port @CONTROLPORT@; };
 };
 
 key "rndc-key" {
index bf97b11011c31b92e000c7f3eaf07a428f12de7c..0e28407a4a5c1bf6e9f12d9a02cb9c0b7651ac63 100644 (file)
@@ -19,4 +19,6 @@ SYSTEMTESTTOP=..
 
 $SHELL clean.sh
 
-cp ns1/named.plain ns1/named.conf
+copy_setports ns1/named.plain ns1/named.conf
+copy_setports ns1/rndc.conf.in ns1/rndc.conf
+copy_setports ns1/controls.conf.in ns1/controls.conf
index 5bf05c376f986ad8586dc5005f93cde6044f10cd..e14103b2fa3de7e051a5bb6bf53203332f71de92 100644 (file)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: tests.sh,v 1.4 2011/03/22 16:51:50 smann Exp $
-
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 THISDIR=`pwd`
 CONFDIR="ns1"
+
 PLAINCONF="${THISDIR}/${CONFDIR}/named.plain"
-DIRCONF="${THISDIR}/${CONFDIR}/named.dirconf"
-PIPECONF="${THISDIR}/${CONFDIR}/named.pipeconf"
-SYMCONF="${THISDIR}/${CONFDIR}/named.symconf"
-VERSCONF="${THISDIR}/${CONFDIR}/named.versconf"
-UNLIMITEDCONF="${THISDIR}/${CONFDIR}/named.unlimited"
 PLAINFILE="named_log"
+DIRCONF="${THISDIR}/${CONFDIR}/named.dirconf"
 DIRFILE="named_dir"
+PIPECONF="${THISDIR}/${CONFDIR}/named.pipeconf"
 PIPEFILE="named_pipe"
+SYMCONF="${THISDIR}/${CONFDIR}/named.symconf"
 SYMFILE="named_sym"
-VERSFILE="named_vers"
+UNLIMITEDCONF="${THISDIR}/${CONFDIR}/named.unlimited"
 UNLIMITEDFILE="named_unlimited"
+DLFILE="named_deflog"
+
 PIDFILE="${THISDIR}/${CONFDIR}/named.pid"
 myRNDC="$RNDC -c ${THISDIR}/${CONFDIR}/rndc.conf"
 myNAMED="$NAMED -c ${THISDIR}/${CONFDIR}/named.conf -m record,size,mctx -T clienttest -T nosyslog -d 99 -U 4"
@@ -54,75 +53,75 @@ n=0
 
 cd $CONFDIR
 
-echo "I:testing log file validity (named -g + only plain files allowed)"
+echo_i "testing log file validity (named -g + only plain files allowed)"
 
 n=`expr $n + 1`
-echo "I: testing plain file (named -g) ($n)"
+echo_i "testing plain file (named -g) ($n)"
 # First run with a known good config.
 echo > $PLAINFILE
-cp $PLAINCONF named.conf
+copy_setports $PLAINCONF named.conf
 $myRNDC reconfig > rndc.out.test$n 2>&1
 grep "reloading configuration failed" named.run > /dev/null 2>&1
 if [ $? -ne 0 ]
 then
-       echo "I:  testing plain file succeeded"
+       echo_i "testing plain file succeeded"
 else
-       echo "I:  testing plain file failed (unexpected)"
-       echo "I:exit status: 1"
+       echo_i "testing plain file failed (unexpected)"
+       echo_i "exit status: 1"
        exit 1 
 fi
 
 # Now try directory, expect failure
 n=`expr $n + 1`
-echo "I: testing directory as log file (named -g) ($n)"
+echo_i "testing directory as log file (named -g) ($n)"
 echo > named.run
 rm -rf $DIRFILE
 mkdir -p $DIRFILE >/dev/null 2>&1
 if [ $? -eq 0 ]
 then
-       cp $DIRCONF named.conf
+       copy_setports $DIRCONF named.conf
        echo > named.run
        $myRNDC reconfig > rndc.out.test$n 2>&1
        grep "checking logging configuration failed: invalid file" named.run > /dev/null 2>&1
        if [ $? -ne 0 ]
        then
-               echo "I:  testing directory as file succeeded (UNEXPECTED)"
-               echo "I:exit status: 1"
+               echo_i "testing directory as file succeeded (UNEXPECTED)"
+               echo_i "exit status: 1"
                exit 1
        else
-               echo "I:  testing directory as log file failed (expected)"
+               echo_i "testing directory as log file failed (expected)"
        fi
 else
-       echo "I:  skipping directory test (unable to create directory)"
+       echo_i "skipping directory test (unable to create directory)"
 fi
 
 # Now try pipe file, expect failure
 n=`expr $n + 1`
-echo "I: testing pipe file as log file (named -g) ($n)"
+echo_i "testing pipe file as log file (named -g) ($n)"
 echo > named.run
 rm -f $PIPEFILE
 mkfifo $PIPEFILE >/dev/null 2>&1
 if [ $? -eq 0 ]
 then
-       cp $PIPECONF named.conf
+       copy_setports $PIPECONF named.conf
        echo > named.run
        $myRNDC reconfig > rndc.out.test$n 2>&1
        grep "checking logging configuration failed: invalid file" named.run  > /dev/null 2>&1
        if [ $? -ne 0 ]
        then
-               echo "I:  testing pipe file as log file succeeded (UNEXPECTED)"
-               echo "I:exit status: 1"
+               echo_i "testing pipe file as log file succeeded (UNEXPECTED)"
+               echo_i "exit status: 1"
                exit 1
        else
-               echo "I:  testing pipe file as log file failed (expected)"
+               echo_i "testing pipe file as log file failed (expected)"
        fi
 else
-       echo "I:  skipping pipe test (unable to create pipe)"
+       echo_i "skipping pipe test (unable to create pipe)"
 fi
 
 # Now try symlink file to plain file, expect success 
 n=`expr $n + 1`
-echo "I: testing symlink to plain file as log file (named -g) ($n)"
+echo_i "testing symlink to plain file as log file (named -g) ($n)"
 # Assume success
 echo > named.run
 echo > $PLAINFILE
@@ -130,20 +129,20 @@ rm -f  $SYMFILE  $SYMFILE
 ln -s $PLAINFILE $SYMFILE >/dev/null 2>&1
 if [ $? -eq 0 ]
 then
-       cp $SYMCONF named.conf
+       copy_setports $SYMCONF named.conf
        $myRNDC reconfig > rndc.out.test$n 2>&1
        echo > named.run
        grep "reloading configuration failed" named.run > /dev/null 2>&1
        if [ $? -ne 0 ]
        then
-               echo "I:  testing symlink to plain file succeeded"
+               echo_i "testing symlink to plain file succeeded"
        else
-               echo "I:  testing symlink to plain file failed (unexpected)"
-               echo "I:exit status: 1"
+               echo_i "testing symlink to plain file failed (unexpected)"
+               echo_i "exit status: 1"
                exit 1
        fi
 else
-       echo "I:  skipping symlink test (unable to create symlink)"
+       echo_i "skipping symlink test (unable to create symlink)"
 fi
 # Stop the server and run through a series of tests with various config
 # files while controlling the stop/start of the server.
@@ -155,82 +154,82 @@ $myNAMED > /dev/null 2>&1
 
 if [ $? -ne 0 ]
 then
-       echo "I:failed to start $myNAMED"
-       echo "I:exit status: $status"
+       echo_i "failed to start $myNAMED"
+       echo_i "exit status: $status"
        exit $status
 fi
 
 status=0
 
-echo "I:testing log file validity (only plain files allowed)"
+echo_i "testing log file validity (only plain files allowed)"
 
 n=`expr $n + 1`
-echo "I: testing plain file (named -g) ($n)"
+echo_i "testing plain file (named -g) ($n)"
 # First run with a known good config.
 echo > $PLAINFILE
-cp $PLAINCONF named.conf
+copy_setports $PLAINCONF named.conf
 $myRNDC reconfig > rndc.out.test$n 2>&1
 grep "reloading configuration failed" named.run > /dev/null 2>&1
 if [ $? -ne 0 ]
 then
-       echo "I:  testing plain file succeeded"
+       echo_i "testing plain file succeeded"
 else
-       echo "I:  testing plain file failed (unexpected)"
-       echo "I:exit status: 1"
+       echo_i "testing plain file failed (unexpected)"
+       echo_i "exit status: 1"
        exit 1 
 fi
 
 # Now try directory, expect failure
 n=`expr $n + 1`
-echo "I: testing directory as log file ($n)"
+echo_i "testing directory as log file ($n)"
 echo > named.run
 rm -rf $DIRFILE
 mkdir -p $DIRFILE >/dev/null 2>&1
 if [ $? -eq 0 ]
 then
-       cp $DIRCONF named.conf
+       copy_setports $DIRCONF named.conf
        echo > named.run
        $myRNDC reconfig > rndc.out.test$n 2>&1
        grep "configuring logging: invalid file" named.run > /dev/null 2>&1
        if [ $? -ne 0 ]
        then
-               echo "I:  testing directory as file succeeded (UNEXPECTED)"
-               echo "I:exit status: 1"
+               echo_i "testing directory as file succeeded (UNEXPECTED)"
+               echo_i "exit status: 1"
                exit 1
        else
-               echo "I:  testing directory as log file failed (expected)"
+               echo_i "testing directory as log file failed (expected)"
        fi
 else
-       echo "I:  skipping directory test (unable to create directory)"
+       echo_i "skipping directory test (unable to create directory)"
 fi
 
 # Now try pipe file, expect failure
 n=`expr $n + 1`
-echo "I: testing pipe file as log file ($n)"
+echo_i "testing pipe file as log file ($n)"
 echo > named.run
 rm -f $PIPEFILE
 mkfifo $PIPEFILE >/dev/null 2>&1
 if [ $? -eq 0 ]
 then
-       cp $PIPECONF named.conf
+       copy_setports $PIPECONF named.conf
        echo > named.run
        $myRNDC reconfig > rndc.out.test$n 2>&1
        grep "configuring logging: invalid file" named.run  > /dev/null 2>&1
        if [ $? -ne 0 ]
        then
-               echo "I:  testing pipe file as log file succeeded (UNEXPECTED)"
-               echo "I:exit status: 1"
+               echo_i "testing pipe file as log file succeeded (UNEXPECTED)"
+               echo_i "exit status: 1"
                exit 1
        else
-               echo "I:  testing pipe file as log file failed (expected)"
+               echo_i "testing pipe file as log file failed (expected)"
        fi
 else
-       echo "I:  skipping pipe test (unable to create pipe)"
+       echo_i "skipping pipe test (unable to create pipe)"
 fi
 
 # Now try symlink file to plain file, expect success 
 n=`expr $n + 1`
-echo "I: testing symlink to plain file as log file ($n)"
+echo_i "testing symlink to plain file as log file ($n)"
 # Assume success
 status=0
 echo > named.run
@@ -239,90 +238,90 @@ rm -f $SYMFILE
 ln -s $PLAINFILE $SYMFILE >/dev/null 2>&1
 if [ $? -eq 0 ]
 then
-       cp $SYMCONF named.conf
+       copy_setports $SYMCONF named.conf
        $myRNDC reconfig > rndc.out.test$n 2>&1
        echo > named.run
        grep "reloading configuration failed" named.run > /dev/null 2>&1
        if [ $? -ne 0 ]
        then
-               echo "I:  testing symlink to plain file succeeded"
+               echo_i "testing symlink to plain file succeeded"
        else
-               echo "I:  testing symlink to plain file failed (unexpected)"
-               echo "I:exit status: 1"
+               echo_i "testing symlink to plain file failed (unexpected)"
+               echo_i "exit status: 1"
                exit 1
        fi
 else
-       echo "I:  skipping symlink test (unable to create symlink)"
+       echo_i "skipping symlink test (unable to create symlink)"
 fi
 
-echo "I:testing logging functionality"
+echo_i "testing logging functionality"
 
 n=`expr $n + 1`
-echo "I: testing explicit versions ($n)"
+echo_i "testing explicit versions ($n)"
 cp $VERSCONF named.conf
 # a seconds since epoch version number
 touch $VERSFILE.1480039317
 t1=`$PERL -e 'print time()."\n";'`
 $myRNDC reconfig > rndc.out.test$n 2>&1
-$DIG version.bind txt ch @10.53.0.1 -p 5300 > dig.out.test$n
+$DIG version.bind txt ch @10.53.0.1 -p ${PORT} > dig.out.test$n
 t2=`$PERL -e 'print time()."\n";'`
 t=`expr ${t2:-0} - ${t1:-0}`
 if test ${t:-1000} -gt 5
 then
-        echo "I:  testing explicit versions failed: cleanup of old entries took too long ($t secs)"
+        echo_i "testing explicit versions failed: cleanup of old entries took too long ($t secs)"
        status=`expr $status + 1`
 fi 
 if ! grep "status: NOERROR" dig.out.test$n > /dev/null
 then
-       echo "I:  testing explicit versions failed: DiG lookup failed"
+       echo_i "testing explicit versions failed: DiG lookup failed"
        status=`expr $status + 1`
 fi
 if test_with_retry -f $VERSFILE.1480039317
 then
-       echo "I:  testing explicit versions failed: $VERSFILE.1480039317 not removed"
+       echo_i "testing explicit versions failed: $VERSFILE.1480039317 not removed"
        status=`expr $status + 1`
 fi
 if test_with_retry -f $VERSFILE.5
 then
-       echo "I:  testing explicit versions failed: $VERSFILE.5 exists"
+       echo_i "testing explicit versions failed: $VERSFILE.5 exists"
        status=`expr $status + 1`
 fi
 if test_with_retry ! -f $VERSFILE.4
 then
-       echo "I:  testing explicit versions failed: $VERSFILE.4 does not exist"
+       echo_i "testing explicit versions failed: $VERSFILE.4 does not exist"
        status=`expr $status + 1`
 fi
 
 n=`expr $n + 1`
-echo "I: testing unlimited versions ($n)"
+echo_i "testing unlimited versions ($n)"
 cp $UNLIMITEDCONF named.conf
 # a seconds since epoch version number
 touch $UNLIMITEDFILE.1480039317
 t1=`$PERL -e 'print time()."\n";'`
 $myRNDC reconfig > rndc.out.test$n 2>&1
-$DIG version.bind txt ch @10.53.0.1 -p 5300 > dig.out.test$n
+$DIG version.bind txt ch @10.53.0.1 -p ${PORT} > dig.out.test$n
 t2=`$PERL -e 'print time()."\n";'`
 t=`expr ${t2:-0} - ${t1:-0}`
 if test ${t:-1000} -gt 5
 then
-        echo "I:  testing unlimited versions failed: took too long ($t secs)"
+        echo_i "testing unlimited versions failed: took too long ($t secs)"
        status=`expr $status + 1`
 fi 
 if ! grep "status: NOERROR" dig.out.test$n > /dev/null
 then
-       echo "I:  testing unlimited versions failed: DiG lookup failed"
+       echo_i "testing unlimited versions failed: DiG lookup failed"
        status=`expr $status + 1`
 fi
 if test_with_retry ! -f $UNLIMITEDFILE.1480039317
 then
-       echo "I:  testing unlimited versions failed: $UNLIMITEDFILE.1480039317 removed"
+       echo_i "testing unlimited versions failed: $UNLIMITEDFILE.1480039317 removed"
        status=`expr $status + 1`
 fi
 if test_with_retry ! -f $UNLIMITEDFILE.4
 then
-       echo "I:  testing unlimited versions failed: $UNLIMITEDFILE.4 does not exist"
+       echo_i "testing unlimited versions failed: $UNLIMITEDFILE.4 does not exist"
        status=`expr $status + 1`
 fi
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index f526f045e32da10214fa1d17f93d33aecfc8c9c1..e43344452bd8ef2a2c87c3da21c4ff817946d8db 100644 (file)
@@ -13,6 +13,8 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
+rm -f */named.memstats
+rm -f */named.conf
 rm -f */named.run
 rm -f checkzone.out*
 rm -f dig.out.*
similarity index 92%
rename from bin/tests/system/masterfile/ns1/named.conf
rename to bin/tests/system/masterfile/ns1/named.conf.in
index 1669f94dc4e332adfd80f622d005fbb0dc9933c3..67de0b0da1fe30aec63ae2334e04151676d4a646 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.6 2007/06/19 23:47:04 tbox Exp $ */
-
-controls { /* empty */ };
-
 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 92%
rename from bin/tests/system/masterfile/ns2/named.conf
rename to bin/tests/system/masterfile/ns2/named.conf.in
index 52b9b93408e4363397266ea934dae71e70c51480..6fb0b2da48496e6d70b86b18521a7767ba35bf97 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.2 2010/09/15 03:32:34 marka Exp $ */
-
 // NS2
 
-controls { /* empty */ };
-
 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; };
@@ -48,4 +44,3 @@ zone "missing" {
        type master;
        file "missing.db";
 };
-
diff --git a/bin/tests/system/masterfile/setup.sh b/bin/tests/system/masterfile/setup.sh
new file mode 100644 (file)
index 0000000..d4f9dbc
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh
+#
+# Copyright (C)  2018  Internet Systems Consortium, Inc. ("ISC")
+#
+# 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 http://mozilla.org/MPL/2.0/.
+
+SYSTEMTESTTOP=..
+. $SYSTEMTESTTOP/conf.sh
+
+$SHELL clean.sh
+copy_setports ns1/named.conf.in ns1/named.conf
+copy_setports ns2/named.conf.in ns2/named.conf
index af2ba322a929175fb6ecf80dffeb56ef661287d6..82119f17b1a88ef050c2d06e69c55f6f1d136e89 100644 (file)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: tests.sh,v 1.7 2010/09/15 12:38:35 tbox Exp $
-
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
+DIGOPTS="-p ${PORT}"
+
 status=0
 n=0
 
 ret=0
 n=`expr $n + 1`
-echo "I:test master file \$INCLUDE semantics ($n)"
-$DIG +nostats +nocmd include. axfr @10.53.0.1 -p 5300 >dig.out.$n
+echo_i "test master file \$INCLUDE semantics ($n)"
+$DIG $DIGOPTS +nostats +nocmd include. axfr @10.53.0.1 >dig.out.$n
 
-echo "I:test master file BIND 8 compatibility TTL and \$TTL semantics ($n)"
-$DIG +nostats +nocmd ttl2. axfr @10.53.0.1 -p 5300 >>dig.out.$n
+echo_i "test master file BIND 8 compatibility TTL and \$TTL semantics ($n)"
+$DIG $DIGOPTS +nostats +nocmd ttl2. axfr @10.53.0.1 >>dig.out.$n
 
-echo "I:test of master file RFC1035 TTL and \$TTL semantics ($n)"
-$DIG +nostats +nocmd ttl2. axfr @10.53.0.1 -p 5300 >>dig.out.$n
+echo_i "test of master file RFC1035 TTL and \$TTL semantics ($n)"
+$DIG $DIGOPTS +nostats +nocmd ttl2. axfr @10.53.0.1 >>dig.out.$n
 
-diff dig.out.$n knowngood.dig.out || status=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+$DIFF  dig.out.$n knowngood.dig.out || status=1
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 ret=0
 n=`expr $n + 1`
-echo "I:test that the nameserver is running with a missing master file ($n)"
-$DIG +tcp +noall +answer example soa @10.53.0.2 -p 5300 > dig.out.$n 
+echo_i "test that the nameserver is running with a missing master file ($n)"
+$DIG $DIGOPTS +tcp +noall +answer example soa @10.53.0.2 > dig.out.$n
 grep SOA dig.out.$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 ret=0
 n=`expr $n + 1`
-echo "I:test that the nameserver returns SERVFAIL for a missing master file ($n)"
-$DIG +tcp +all missing soa @10.53.0.2 -p 5300 > dig.out.$n 
+echo_i "test that the nameserver returns SERVFAIL for a missing master file ($n)"
+$DIG $DIGOPTS +tcp +all missing soa @10.53.0.2 > dig.out.$n
 grep "status: SERVFAIL" dig.out.$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 ret=0
 n=`expr $n + 1`
-echo "I:test owner inheritence after "'$INCLUDE'" ($n)"
+echo_i "test owner inheritence after "'$INCLUDE'" ($n)"
 $CHECKZONE -Dq example zone/inheritownerafterinclude.db > checkzone.out$n
-diff checkzone.out$n zone/inheritownerafterinclude.good || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+$DIFF checkzone.out$n zone/inheritownerafterinclude.good || ret=1
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index c457bc8453b2f61d308716e3094b67e7306cefcd..769c51d6e18910a4fb3ea7a9524b0a03e22c7766 100755 (executable)
@@ -22,6 +22,7 @@ rm -f ns1/large.db ns1/large.db.raw
 rm -f dig.out.*
 rm -f dig.out
 rm -f */named.memstats
+rm -f */named.conf
 rm -f */named.run
 rm -f ns2/example.db
 rm -f ns2/transfer.db.*
similarity index 94%
rename from bin/tests/system/masterformat/ns1/named.conf
rename to bin/tests/system/masterformat/ns1/named.conf.in
index 26dad01ae7e54eb625c2ffc8ed3ea3455a052c67..d88cfdd748522d1121bdf0e3e54ff98dec2ba483 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id$ */
-
 // NS1
 
-controls { /* empty */ };
-
 options {
        pid-file "named.pid";
-       listen-on port 5300 { 10.53.0.1; };
-        port 5300;
+       listen-on port @PORT@ { 10.53.0.1; };
+       port @PORT@;
        listen-on-v6 { none; };
        recursion no;
        notify no;
similarity index 93%
rename from bin/tests/system/masterformat/ns2/named.conf
rename to bin/tests/system/masterformat/ns2/named.conf.in
index 485b8476e3c167abcf224d9b6e7828b7d416dd42..0d87bef2f8bd6a76d5cb78b9ef9b13c87d8b4f8f 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id$ */
-
 // NS2
 
-controls { /* empty */ };
-
 options {
        pid-file "named.pid";
-       listen-on port 5300 { 10.53.0.2; };
+       listen-on port @PORT@ { 10.53.0.2; };
        listen-on-v6 { none; };
-        port 5300;
+       port @PORT@;
        recursion no;
        notify no;
        dnssec-enable yes;
index 59c22b6b4f9ea0a3231ade26f55d2777bfe492f2..b77b2666aa8a2e4780d4e835429821c1acf6e49d 100755 (executable)
@@ -12,7 +12,9 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id$
+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 named-compilezone
 ln -s $CHECKZONE named-compilezone
index 703ab36c239b176bed95ce99fd02ee6ca8fd70fc..327041de1b7fe0d4ca672b9b7091016982aa18ac 100755 (executable)
@@ -14,8 +14,6 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id$
-
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
@@ -49,26 +47,26 @@ sourceserial () {
              }' < $1
 }
 
-DIGOPTS="+tcp +noauth +noadd +nosea +nostat +noquest +nocomm +nocmd"
+DIGOPTS="+tcp +noauth +noadd +nosea +nostat +noquest +nocomm +nocmd -p ${PORT}"
 
 status=0
 
-echo "I:checking that master files in raw format loaded"
+echo_i "checking that master files in raw format loaded"
 ret=0
 for zone in example example-explicit example-compat; do
     for server in 1 2; do
        for name in ns mx a aaaa cname dname txt rrsig nsec \
                    dnskey ds cdnskey cds; do
-               $DIG $DIGOPTS $name.$zone. $name @10.53.0.$server -p 5300
+               $DIG $DIGOPTS $name.$zone. $name @10.53.0.$server
                echo
        done > dig.out.$zone.$server
     done
     $PERL ../digcomp.pl dig.out.$zone.1 dig.out.$zone.2 || ret=1
 done
-[ $ret -eq 0 ] || echo "I:failed"
+[ $ret -eq 0 ] || echo_i "failed"
 status=`expr $status + $ret`
 
-echo "I:checking raw format versions"
+echo_i "checking raw format versions"
 ret=0
 israw ns1/example.db.raw || ret=1
 israw ns1/example.db.raw1 || ret=1
@@ -76,36 +74,36 @@ israw ns1/example.db.compat || ret=1
 [ "`rawversion ns1/example.db.raw`" = 1 ] || ret=1
 [ "`rawversion ns1/example.db.raw1`" = 1 ] || ret=1
 [ "`rawversion ns1/example.db.compat`" = 0 ] || ret=1
-[ $ret -eq 0 ] || echo "I:failed"
+[ $ret -eq 0 ] || echo_i "failed"
 status=`expr $status + $ret`
 
-echo "I:checking source serial numbers"
+echo_i "checking source serial numbers"
 ret=0
 [ "`sourceserial ns1/example.db.raw`" = "UNSET" ] || ret=1
 [ "`sourceserial ns1/example.db.serial.raw`" = "3333" ] || ret=1
-[ $ret -eq 0 ] || echo "I:failed"
+[ $ret -eq 0 ] || echo_i "failed"
 status=`expr $status + $ret`
 
-echo "I:waiting for transfers to complete"
+echo_i "waiting for transfers to complete"
 for i in 0 1 2 3 4 5 6 7 8 9
 do
        test -f ns2/transfer.db.raw -a -f ns2/transfer.db.txt && break
        sleep 1
 done
 
-echo "I:checking that slave was saved in raw format by default"
+echo_i "checking that slave was saved in raw format by default"
 ret=0
 israw ns2/transfer.db.raw || ret=1
-[ $ret -eq 0 ] || echo "I:failed"
+[ $ret -eq 0 ] || echo_i "failed"
 status=`expr $status + $ret`
 
-echo "I:checking that slave was saved in text format when configured"
+echo_i "checking that slave was saved in text format when configured"
 ret=0
 israw ns2/transfer.db.txt && ret=1
-[ $ret -eq 0 ] || echo "I:failed"
+[ $ret -eq 0 ] || echo_i "failed"
 status=`expr $status + $ret`
 
-echo "I:checking that slave formerly in text format is now raw"
+echo_i "checking that slave formerly in text format is now raw"
 for i in 0 1 2 3 4 5 6 7 8 9
 do
     ret=0
@@ -114,23 +112,23 @@ do
     [ $ret -eq 0 ] && break
     sleep 1
 done
-[ $ret -eq 0 ] || echo "I:failed"
+[ $ret -eq 0 ] || echo_i "failed"
 status=`expr $status + $ret`
 
-echo "I:checking that large rdatasets loaded"
+echo_i "checking that large rdatasets loaded"
 for i in 0 1 2 3 4 5 6 7 8 9
 do
 ret=0
 for a in a b c
 do
-       $DIG +tcp txt ${a}.large @10.53.0.2 -p 5300 > dig.out
+       $DIG +tcp txt ${a}.large @10.53.0.2 -p ${PORT} > dig.out
        grep "status: NOERROR" dig.out > /dev/null || ret=1
 done
 [ $ret -eq 0 ] && break
 sleep 1
 done
-[ $ret -eq 0 ] || echo "I:failed"
+[ $ret -eq 0 ] || echo_i "failed"
 status=`expr $status + $ret`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index 9b82595f63dd78de22265381f95f052ca1683a66..c340289a64c7517f52499fae801dfe0db7d8d848 100644 (file)
@@ -24,7 +24,7 @@ test -r $RANDFILE || $GENRANDOM 400 $RANDFILE
 pzone=parent.nil
 czone=child.parent.nil
 
-echo "I:generating keys"
+echo_i "generating keys"
 
 # active zsk
 zsk=`$KEYGEN -q -r $RANDFILE $czone`
index 422136dd129fc8cfe5a2d4de4fbf5fabcd64189b..823ffb93831d12c89f87c790d60781fdb572ab78 100644 (file)
@@ -14,8 +14,6 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: tests.sh,v 1.9 2011/07/08 01:43:26 each Exp $
-
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
@@ -24,7 +22,7 @@ czone=child.parent.nil cfile=child.db
 status=0
 n=1
 
-echo "I:setting key timers"
+echo_i "setting key timers"
 $SETTIME -A now+15s `cat rolling.key` > /dev/null
 
 inact=`sed 's/^K'${czone}'.+005+0*\([0-9]\)/\1/' < inact.key`
@@ -38,7 +36,7 @@ zsk=`sed 's/^K'${czone}'.+005+0*\([0-9]\)/\1/' < zsk.key`
 
 ../../../tools/genrandom 400 $RANDFILE
 
-echo "I:signing zones"
+echo_i "signing zones"
 $SIGNER -Sg -o $czone $cfile > /dev/null 2>&1
 $SIGNER -Sg -o $pzone $pfile > /dev/null 2>&1
 
@@ -59,81 +57,81 @@ awk '$2 ~ /DNSKEY/ {
        print flags, id;
 }' < ${cfile}.signed > keys
 
-echo "I:checking that KSK signed DNSKEY only ($n)"
+echo_i "checking that KSK signed DNSKEY only ($n)"
 ret=0
 grep "DNSKEY $ksk"'$' sigs > /dev/null || ret=1
 grep "SOA $ksk"'$' sigs > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that ZSK signed ($n)"
+echo_i "checking that ZSK signed ($n)"
 ret=0
 grep "SOA $zsk"'$' sigs > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that standby ZSK did not sign ($n)"
+echo_i "checking that standby ZSK did not sign ($n)"
 ret=0
 grep " $standby"'$' sigs > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that inactive key did not sign ($n)"
+echo_i "checking that inactive key did not sign ($n)"
 ret=0
 grep " $inact"'$' sigs > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that pending key was not published ($n)"
+echo_i "checking that pending key was not published ($n)"
 ret=0
 grep " $pending"'$' keys > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that standby KSK did not sign but is delegated ($n)"
+echo_i "checking that standby KSK did not sign but is delegated ($n)"
 ret=0
 grep " $rolling"'$' sigs > /dev/null && ret=1
 grep " $rolling"'$' keys > /dev/null || ret=1
 egrep "DS[     ]*$rolling[     ]" ${pfile}.signed > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that key was revoked ($n)"
+echo_i "checking that key was revoked ($n)"
 ret=0
 grep " $prerev"'$' keys > /dev/null && ret=1
 grep " $postrev"'$' keys > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that revoked key self-signed ($n)"
+echo_i "checking that revoked key self-signed ($n)"
 ret=0
 grep "DNSKEY $postrev"'$' sigs > /dev/null || ret=1
 grep "SOA $postrev"'$' sigs > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:waiting 20 seconds for key changes to occur"
+echo_i "waiting 20 seconds for key changes to occur"
 sleep 20
 
-echo "I:re-signing zone"
+echo_i "re-signing zone"
 $SIGNER  -Sg -o $czone -f ${cfile}.new ${cfile}.signed > /dev/null 2>&1
 
-echo "I:checking that standby KSK is now active ($n)"
+echo_i "checking that standby KSK is now active ($n)"
 ret=0
 grep "DNSKEY $rolling"'$' sigs > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking update of an old-style key ($n)"
+echo_i "checking update of an old-style key ($n)"
 ret=0
 # printing metadata should not work with an old-style key
 $SETTIME -pall `cat oldstyle.key` > /dev/null 2>&1 && ret=1
@@ -141,13 +139,13 @@ $SETTIME -f `cat oldstyle.key` > /dev/null 2>&1 || ret=1
 # but now it should
 $SETTIME -pall `cat oldstyle.key` > /dev/null 2>&1 || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking warning about permissions change on key with dnssec-settime ($n)"
+echo_i "checking warning about permissions change on key with dnssec-settime ($n)"
 uname=`uname -o 2> /dev/null`
 if [ Cygwin == "$uname"  ]; then
-       echo "I: Cygwin detected, skipping"
+       echo_i "Cygwin detected, skipping"
 else
        ret=0
        # settime should print a warning about changing the permissions
@@ -157,38 +155,38 @@ else
        $SETTIME -P none `cat oldstyle.key` > settime2.test$n 2>&1 || ret=1
        grep "warning: Permissions on the file.*have changed" settime2.test$n > /dev/null 2>&1 && ret=1
        n=`expr $n + 1`
-       if [ $ret != 0 ]; then echo "I:failed"; fi
+       if [ $ret != 0 ]; then echo_i "failed"; fi
        status=`expr $status + $ret`
 fi
 
-echo "I:checking warning about delete date < inactive date with dnssec-settime ($n)"
+echo_i "checking warning about delete date < inactive date with dnssec-settime ($n)"
 ret=0
 # settime should print a warning about delete < inactive
 $SETTIME -I now+15s -D now `cat oldstyle.key` > tmp.out 2>&1 || ret=1
 grep "warning" tmp.out > /dev/null 2>&1 || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking no warning about delete date < inactive date with dnssec-settime when delete date is unset ($n)"
+echo_i "checking no warning about delete date < inactive date with dnssec-settime when delete date is unset ($n)"
 ret=0
 $SETTIME -D none `cat oldstyle.key` > tmp.out 2>&1 || ret=1
 $SETTIME -p all `cat oldstyle.key` > tmp.out 2>&1 || ret=1
 grep "warning" tmp.out > /dev/null 2>&1 && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking warning about delete date < inactive date with dnssec-keygen ($n)"
+echo_i "checking warning about delete date < inactive date with dnssec-keygen ($n)"
 ret=0
 # keygen should print a warning about delete < inactive
 $KEYGEN -q -r $RANDFILE -I now+15s -D now $czone > tmp.out 2>&1 || ret=1
 grep "warning" tmp.out > /dev/null 2>&1 || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking correct behavior setting activation without publication date ($n)"
+echo_i "checking correct behavior setting activation without publication date ($n)"
 ret=0
 key=`$KEYGEN -q -r $RANDFILE -A +1w $czone`
 pub=`$SETTIME -upP $key | awk '{print $2}'`
@@ -202,10 +200,10 @@ key=`$KEYGEN -q -r $RANDFILE -A +1w -P never $czone`
 pub=`$SETTIME -upP $key | awk '{print $2}'`
 [ $pub = "UNSET" ] || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking calculation of dates for a successor key ($n)"
+echo_i "checking calculation of dates for a successor key ($n)"
 ret=0
 oldkey=`$KEYGEN -q -r $RANDFILE $czone`
 newkey=`$KEYGEN -q -r $RANDFILE $czone`
@@ -213,8 +211,8 @@ $SETTIME -A -2d -I +2d $oldkey > settime1.test$n 2>&1 || ret=1
 $SETTIME -i 1d -S $oldkey $newkey > settime2.test$n 2>&1 || ret=1
 $SETTIME -pA $newkey | grep "1970" > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index 3b6ddb7e1478ceb2cc7ca390ea544675de9c056c..c392b51b52230aa9020b36807443d6cb7b5af707 100644 (file)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: clean.sh,v 1.14 2011/10/17 23:46:33 tbox Exp $
-
 #
 # Clean up after zone transfer tests.
 #
 
 rm -f */named.memstats
 rm -f */named.run
+rm -f */named.conf
+rm -f */named.port
 rm -f dig.out.?.ns5.test*
 rm -f dig.out.ns2.test*
 rm -f dig.out.ns3.test*
similarity index 91%
rename from bin/tests/system/views/ns1/named.conf
rename to bin/tests/system/notify/ns1/named.conf.in
index 46a0a02c03ca0beac1a04011d7027bccacccfd88..cae3cbb12eefb40d89de2d4ecb3c3215c3822def 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.17 2007/06/19 23:47:07 tbox Exp $ */
-
-controls { /* empty */ };
-
 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 95%
rename from bin/tests/system/notify/ns2/named.conf
rename to bin/tests/system/notify/ns2/named.conf.in
index bb8bc96fa527ca72b2d782aa6966b1df428de699..50f3be8dff78eb1259b6b36632a12917bce75ee6 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.23 2011/12/20 00:06:54 marka Exp $ */
-
-controls { /* empty */ };
-
 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; };
@@ -45,7 +41,7 @@ zone "example" {
 
 masters noport { 10.53.0.4; };
 
-masters x21 port 5301 { noport; };
+masters x21 port @EXTRAPORT1@ { noport; };
 
 zone x1 { type master; file "generic.db"; also-notify { 10.53.0.3; }; };
 zone x2 { type master; file "generic.db"; also-notify { 10.53.0.3; }; };
similarity index 92%
rename from bin/tests/system/notify/ns3/named.conf
rename to bin/tests/system/notify/ns3/named.conf.in
index 53169578b02548486accdf121ee357d6827b4e93..39b7df02d06d0450c1778aaba4f835b8e6be0066 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.24 2007/06/18 23:47:29 tbox Exp $ */
-
-controls { /* empty */ };
-
 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; };
@@ -42,5 +38,3 @@ zone "example" {
        masters { 10.53.0.2; };
        file "example.bk";
 };
-
-
similarity index 89%
rename from bin/tests/system/notify/ns4/named.conf
rename to bin/tests/system/notify/ns4/named.conf.in
index 76fee65fc445da4aa462c683a5c90cbceb010cbf..884c2a900e93e368e7e92540c303d1f83a5ae588 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.24 2007/06/18 23:47:29 tbox Exp $ */
-
-controls { /* empty */ };
-
 options {
        query-source address 10.53.0.4;
        notify-source 10.53.0.4;
        transfer-source 10.53.0.4;
-       port 5301;
+       port @EXTRAPORT1@;
        pid-file "named.pid";
        listen-on { 10.53.0.4; };
        listen-on-v6 { none; };
@@ -38,6 +34,6 @@ zone "." {
 
 zone "x21" {
        type slave;
-       masters { 10.53.0.2 port 5300; };
+       masters { 10.53.0.2 port @PORT@; };
        file "x21.bk";
 };
diff --git a/bin/tests/system/notify/ns4/named.port b/bin/tests/system/notify/ns4/named.port
deleted file mode 100644 (file)
index 3cda32b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-5301
diff --git a/bin/tests/system/notify/ns4/named.port.in b/bin/tests/system/notify/ns4/named.port.in
new file mode 100644 (file)
index 0000000..8e94a3c
--- /dev/null
@@ -0,0 +1 @@
+@EXTRAPORT1@
similarity index 94%
rename from bin/tests/system/notify/ns5/named.conf
rename to bin/tests/system/notify/ns5/named.conf.in
index 2ae2015cb3e91c20aaf59764731a132921a89b19..f5f08cdcb954af86d65441dc1cb94ef4dc37b2f7 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.24 2007/06/18 23:47:29 tbox Exp $ */
-
-controls { /* empty */ };
-
 key "a" {
        algorithm "hmac-md5";
        secret "aaaaaaaaaaaaaaaaaaaa";
@@ -37,7 +33,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";
        listen-on { 10.53.0.5; };
        listen-on-v6 { none; };
index f400ebe9f2311ee7b8647b5ec6dd09adc76557d2..fe2e49316d39a7f5f3496263dd8e2b7cd0248637 100644 (file)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: setup.sh,v 1.10 2007/06/19 23:47:04 tbox Exp $
+SYSTEMTESTTOP=..
+. $SYSTEMTESTTOP/conf.sh
+
+$SHELL clean.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
+copy_setports ns4/named.conf.in ns4/named.conf
+copy_setports ns5/named.conf.in ns5/named.conf
+
+copy_setports ns4/named.port.in ns4/named.port
 
 cp -f ns2/example1.db ns2/example.db
 cp -f ns2/generic.db ns2/x21.db
index db1f23a4412855c5ad7f327a58db98f6b05cb364..ebc47781a43990ccd8a956d75c7679473c52e06e 100644 (file)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: tests.sh,v 1.36 2011/10/17 01:33:27 marka Exp $
-
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
+DIGOPTS="+tcp +noadd +nosea +nostat +noquest +nocomm +nocmd -p ${PORT}"
+RNDCCMD="$RNDC -c $SYSTEMTESTTOP/common/rndc.conf -p ${CONTROLPORT} -s"
+
 status=0
 n=0
 
@@ -29,10 +30,10 @@ n=0
 for i in 1 2 3 4 5 6 7 8 9 10
 do
        ret=0
-       $DIG +tcp example @10.53.0.2 soa -p 5300 > dig.out.ns2.test$n || ret=1
+       $DIG +tcp -p ${PORT} example @10.53.0.2 soa > dig.out.ns2.test$n || ret=1
        grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
        grep "flags:.* aa[ ;]" dig.out.ns2.test$n > /dev/null || ret=1
-       $DIG +tcp example @10.53.0.3 soa -p 5300 > dig.out.ns3.test$n || ret=1
+       $DIG +tcp -p ${PORT} example @10.53.0.3 soa > dig.out.ns3.test$n || ret=1
        grep "status: NOERROR" dig.out.ns3.test$n > /dev/null || ret=1
        grep "flags:.* aa[ ;]" dig.out.ns3.test$n > /dev/null || ret=1
        [ $ret = 0 ] && break
@@ -40,115 +41,119 @@ do
 done
 
 n=`expr $n + 1`
-echo "I:checking initial status ($n)"
+echo_i "checking initial status ($n)"
 ret=0
-$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd a.example.\
-       @10.53.0.2 a -p 5300 > dig.out.ns2.test$n || ret=1
+$DIG $DIGOPTS a.example. @10.53.0.2 a > dig.out.ns2.test$n || ret=1
 grep "10.0.0.1" dig.out.ns2.test$n > /dev/null || ret=1
 
-$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd a.example.\
-       @10.53.0.3 a -p 5300 > dig.out.ns3.test$n || ret=1
+$DIG $DIGOPTS a.example. @10.53.0.3 a > dig.out.ns3.test$n || ret=1
 grep "10.0.0.1" dig.out.ns3.test$n > /dev/null || ret=1
 
 $PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns3.test$n || ret=1
 
-[ $ret = 0 ] || echo "I:failed"
+[ $ret = 0 ] || echo_i "failed"
 status=`expr $ret + $status`
 
-echo "I:reloading with example2 using HUP and waiting 45 seconds"
+echo_i "reloading with example2 using HUP and waiting up to 45 seconds"
 sleep 1 # make sure filesystem time stamp is newer for reload.
 rm -f ns2/example.db
 cp -f ns2/example2.db ns2/example.db
-kill -HUP `cat ns2/named.pid`
-sleep 45
+echo_i "reloading with example2 using HUP and waiting up to 45 seconds"
+$KILL -HUP `cat ns2/named.pid`
+try=0
+while test $try -lt 45
+do
+    sleep 1
+    grep 'notify from 10.53.0.2#[0-9][0-9]*: serial 2$' ns3/named.run > /dev/null && break
+    try=`expr $try + 1`
+done
 
 n=`expr $n + 1`
-echo "I:checking example2 loaded ($n)"
+echo_i "checking example2 loaded ($n)"
 ret=0
-$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd a.example.\
-       @10.53.0.2 a -p 5300 > dig.out.ns2.test$n || ret=1
+$DIG $DIGOPTS a.example. @10.53.0.2 a > dig.out.ns2.test$n || ret=1
 grep "10.0.0.2" dig.out.ns2.test$n > /dev/null || ret=1
 
-[ $ret = 0 ] || echo "I:failed"
+[ $ret = 0 ] || echo_i "failed"
 status=`expr $ret + $status`
 
 n=`expr $n + 1`
-echo "I:checking example2 contents have been transferred after HUP reload ($n)"
+echo_i "checking example2 contents have been transferred after HUP reload ($n)"
 ret=0
-$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd a.example.\
-       @10.53.0.2 a -p 5300 > dig.out.ns2.test$n || ret=1
+$DIG $DIGOPTS a.example. @10.53.0.2 a > dig.out.ns2.test$n || ret=1
 grep "10.0.0.2" dig.out.ns2.test$n > /dev/null || ret=1
 
-$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd a.example.\
-       @10.53.0.3 a -p 5300 > dig.out.ns3.test$n || ret=1
+$DIG $DIGOPTS a.example. @10.53.0.3 a > dig.out.ns3.test$n || ret=1
 grep "10.0.0.2" dig.out.ns3.test$n > /dev/null || ret=1
 
 $PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns3.test$n || ret=1
 
-[ $ret = 0 ] || echo "I:failed"
+[ $ret = 0 ] || echo_i "failed"
 status=`expr $ret + $status`
 
-echo "I:stopping master and restarting with example4 then waiting 45 seconds"
+echo_i "stopping master and restarting with example4 then waiting up to 45 seconds"
 $PERL $SYSTEMTESTTOP/stop.pl . ns2
 
 rm -f ns2/example.db
 cp -f ns2/example4.db ns2/example.db
 
-$PERL $SYSTEMTESTTOP/start.pl --noclean --restart . ns2
+$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . ns2
 
-sleep 45
+try=0
+while test $try -lt 45
+do
+    sleep 1
+    grep 'notify from 10.53.0.2#[0-9][0-9]*: serial 4$' ns3/named.run > /dev/null && break
+    try=`expr $try + 1`
+done
 
 n=`expr $n + 1`
-echo "I:checking example4 loaded ($n)"
+echo_i "checking example4 loaded ($n)"
 ret=0
-$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd a.example.\
-       @10.53.0.2 a -p 5300 > dig.out.ns2.test$n || ret=1
+$DIG $DIGOPTS a.example. @10.53.0.2 a > dig.out.ns2.test$n || ret=1
 grep "10.0.0.4" dig.out.ns2.test$n > /dev/null || ret=1
 
-[ $ret = 0 ] || echo "I:failed"
+[ $ret = 0 ] || echo_i "failed"
 status=`expr $ret + $status`
 
 n=`expr $n + 1`
-echo "I:checking example4 contents have been transfered after restart ($n)"
+echo_i "checking example4 contents have been transfered after restart ($n)"
 ret=0
-$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd a.example.\
-       @10.53.0.2 a -p 5300 > dig.out.ns2.test$n || ret=1
+$DIG $DIGOPTS a.example. @10.53.0.2 a > dig.out.ns2.test$n || ret=1
 grep "10.0.0.4" dig.out.ns2.test$n > /dev/null || ret=1
 
-$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd a.example.\
-       @10.53.0.3 a -p 5300 > dig.out.ns3.test$n || ret=1
+$DIG $DIGOPTS a.example. @10.53.0.3 a > dig.out.ns3.test$n || ret=1
 grep "10.0.0.4" dig.out.ns3.test$n > /dev/null || ret=1
 
 $PERL ../digcomp.pl dig.out.ns2.test$n dig.out.ns3.test$n || ret=1
 
-[ $ret = 0 ] || echo "I:failed"
+[ $ret = 0 ] || echo_i "failed"
 status=`expr $ret + $status`
 
 n=`expr $n + 1`
-echo "I:checking notify to alternate port with master inheritance"
+echo_i "checking notify to alternate port with master inheritance ($n)"
 $NSUPDATE << EOF
-server 10.53.0.2 5300
+server 10.53.0.2 ${PORT}
 zone x21
 update add added.x21 0 in txt "test string"
 send
 EOF
 for i in 1 2 3 4 5 6 7 8 9
 do
-       $DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd added.x21.\
-               @10.53.0.4 txt -p 5301 > dig.out.ns4.test$n || ret=1
+       $DIG $DIGOPTS added.x21. @10.53.0.4 txt -p $EXTRAPORT1 > dig.out.ns4.test$n || ret=1
        grep "test string" dig.out.ns4.test$n > /dev/null && break
        sleep 1
 done
 grep "test string" dig.out.ns4.test$n > /dev/null || ret=1
 
-[ $ret = 0 ] || echo "I:failed"
+[ $ret = 0 ] || echo_i "failed"
 status=`expr $ret + $status`
 
 n=`expr $n + 1`
-echo "I:checking notify to multiple views using tsig"
+echo_i "checking notify to multiple views using tsig ($n)"
 ret=0
 $NSUPDATE << EOF
-server 10.53.0.5 5300
+server 10.53.0.5 ${PORT}
 zone x21
 key a aaaaaaaaaaaaaaaaaaaa
 update add added.x21 0 in txt "test string"
@@ -157,12 +162,10 @@ EOF
 
 for i in 1 2 3 4 5 6 7 8 9
 do
-       $DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd added.x21.\
-               -y b:bbbbbbbbbbbbbbbbbbbb @10.53.0.5 \
-               txt -p 5300 > dig.out.b.ns5.test$n || ret=1
-       $DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd added.x21.\
-               -y c:cccccccccccccccccccc @10.53.0.5 \
-               txt -p 5300 > dig.out.c.ns5.test$n || ret=1
+       $DIG $DIGOPTS added.x21. -y b:bbbbbbbbbbbbbbbbbbbb @10.53.0.5 \
+               txt > dig.out.b.ns5.test$n || ret=1
+       $DIG $DIGOPTS added.x21. -y c:cccccccccccccccccccc @10.53.0.5 \
+               txt > dig.out.c.ns5.test$n || ret=1
        grep "test string" dig.out.b.ns5.test$n > /dev/null &&
        grep "test string" dig.out.c.ns5.test$n > /dev/null &&
         break
@@ -171,8 +174,8 @@ done
 grep "test string" dig.out.b.ns5.test$n > /dev/null || ret=1
 grep "test string" dig.out.c.ns5.test$n > /dev/null || ret=1
 
-[ $ret = 0 ] || echo "I:failed"
+[ $ret = 0 ] || echo_i "failed"
 status=`expr $ret + $status`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index bbcef6f6ddb6d7ec390996429853a856b02901dc..1dd1a35aa04a2efe1b3a59c46c4ef8b9012543d7 100644 (file)
@@ -16,3 +16,4 @@ rm -f ns1/example.db
 rm -f nslookup.out*
 rm -f ns*/named.memstats
 rm -f ns*/named.run
+rm -f ns*/named.conf
similarity index 96%
rename from bin/tests/system/nslookup/ns1/named.conf
rename to bin/tests/system/nslookup/ns1/named.conf.in
index fc1fb510ff1f39dcafa55ce53704f6417bea5da0..c65d1e0b4716a312ae1127ad209323751b939c02 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-controls { /* empty */ };
-
 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; };
index 092e5800c804120f16b919f39520de3a7038efec..ba3d7e44d5580886b0d86d7e7d63321878cacfda 100644 (file)
@@ -17,4 +17,8 @@
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
+$SHELL clean.sh
+
 $SHELL ../genzone.sh 1 >ns1/example.db
+
+copy_setports ns1/named.conf.in ns1/named.conf
index 5019c20c4e8f98b40cd30dc4149c122197bfe7f1..fed98583cf018016b925e2f2abb3088e16ded118 100644 (file)
@@ -21,15 +21,15 @@ status=0
 n=0
 
 n=`expr $n + 1`
-echo "Check that domain names that are too big when applying a search list entry are handled cleanly ($n)"
+echo_i "Check that domain names that are too big when applying a search list entry are handled cleanly ($n)"
 ret=0
 l=012345678901234567890123456789012345678901234567890123456789012
 t=0123456789012345678901234567890123456789012345678901234567890
 d=$l.$l.$l.$t
-$NSLOOKUP -port=5300 -domain=$d -type=soa example 10.53.0.1 > nslookup.out${n} || ret=1
+$NSLOOKUP -port=${PORT} -domain=$d -type=soa example 10.53.0.1 > nslookup.out${n} || ret=1
 grep "origin = ns1.example" nslookup.out${n} > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index 8e2be99908b280654b25163c025e41f092792952..ef341f7f380e82f74294add48e72a859b0380de6 100644 (file)
@@ -29,10 +29,13 @@ if (@ARGV > 0) {
        $server_addr = @ARGV[0];
 }
 
+my $localport = int($ENV{'PORT'});
+if (!$localport) { $localport = 5300; }
+
 my $udpsock = IO::Socket::INET->new(LocalAddr => "$server_addr",
-   LocalPort => 5300, Proto => "udp", Reuse => 1) or die "$!";
+   LocalPort => $localport, Proto => "udp", Reuse => 1) or die "$!";
 
-print "listening on $server_addr:5300.\n";
+print "listening on $server_addr:$localport.\n";
 
 my $pidf = new IO::File "ans.pid", "w" or die "cannot open pid file: $!";
 print $pidf "$$\n" or die "cannot write pid file: $!";
index 97fbf7c8caf34855a6b109f7bb94dcc3cc4ae25f..7b56f45257ca9f2e9b2099241b4f98c2d052c86f 100644 (file)
 # Clean up after zone transfer tests.
 #
 
+rm -f verylarge
 rm -f */named.memstats
 rm -f */named.run */ans.run
+rm -f */named.conf
 rm -f Kxxx.*
 rm -f dig.out.*
 rm -f jp.out.ns3.*
similarity index 92%
rename from bin/tests/system/nsupdate/ns1/named.conf
rename to bin/tests/system/nsupdate/ns1/named.conf.in
index 5029ebf5c55762fe0de593ddd88ac51f96b6de0b..fa0b744aa914e58d612a51300e707c0c519604eb 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.22 2011/07/01 02:25:47 marka Exp $ */
-
-controls { /* empty */ };
-
 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";
        session-keyfile "session.key";
        listen-on { 10.53.0.1; 127.0.0.1; };
@@ -38,7 +34,7 @@ key rndc_key {
 };
 
 controls {
-       inet 10.53.0.1 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.1 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 key altkey {
@@ -68,8 +64,8 @@ zone "other.nil" {
 };
 
 masters othermasters {
-       10.53.0.2 port 5300;
-       10.53.0.2 port 5300 key altkey;
+       10.53.0.2 port @PORT@;
+       10.53.0.2 port @PORT@ key altkey;
 };
 
 zone "update.nil" {
similarity index 94%
rename from bin/tests/system/nsupdate/ns2/named.conf
rename to bin/tests/system/nsupdate/ns2/named.conf.in
index 5e4e33ee442d6717bcb3ac0c070db10f726b2a51..87dad7f790f081c3d03012bbc2e2cdb62441db7e 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.16 2011/05/06 23:47:29 tbox Exp $ */
-
-controls { /* empty */ };
-
 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 88%
rename from bin/tests/system/nsupdate/ns3/named.conf
rename to bin/tests/system/nsupdate/ns3/named.conf.in
index dda9f4f2322edfba556628917ccd87ca011ac9ad..ef82454253cb47aa72a6782a9c0cb8041068530e 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.5 2011/02/03 12:18:11 tbox Exp $ */
-
-// NS1
-
-controls { /* empty */ };
+// NS3
 
 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; };
@@ -34,15 +30,6 @@ options {
        dnssec-validation yes;
 };
 
-/*
-zone "." {
-       type master;
-       file "root.db.signed";
-};
-*/
-
-// include "trusted.conf";
-
 zone "example" {
        type master;
        allow-update { any; };
similarity index 92%
rename from bin/tests/system/nsupdate/ns5/named.conf
rename to bin/tests/system/nsupdate/ns5/named.conf.in
index 63667e6fbe14b07f711b17504cf85ff86793cb8c..b1f885484ca4901a31f33487066a196f99f618de 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-controls { /* empty */ };
-
 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";
        session-keyfile "session.key";
        listen-on { 10.53.0.5; };
@@ -35,7 +33,7 @@ key rndc_key {
 };
 
 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; };
 };
 
 zone "local.nil" {
index b2947c49dea82443558f9e4cd3a6131fe9556e2a..cd8914fa5575e6833afcfe0ae337964660683b21 100644 (file)
@@ -23,7 +23,7 @@ then
     then
         :
     else
-        echo "I:Net::DNS versions 0.69 to 0.70 have bugs that cause this test to fail: please update." >&2
+        echo_i "Net::DNS versions 0.69 to 0.70 have bugs that cause this test to fail: please update." >&2
         exit 1
     fi
 fi
index 8cf5a24ec80268df9a2c44d0602b83ee4812d0ef..3d02c3deb2742b4412ef90d8db07acbdf045880e 100644 (file)
@@ -20,6 +20,14 @@ SYSTEMTESTTOP=..
 
 test -r $RANDFILE || $GENRANDOM 400 $RANDFILE
 
+$SHELL clean.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
+copy_setports ns5/named.conf.in ns5/named.conf
+
+copy_setports verylarge.in verylarge
+
 #
 # jnl and database files MUST be removed before we start
 #
index 792b4f7b4ad437ecb084103240b48e3d41f5349d..3df1e32e4af73d78cebea735cabd79600f8d15dc 100644 (file)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id$
-
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
+DIGOPTS="-p ${PORT}"
+RNDCCMD="$RNDC -c $SYSTEMTESTTOP/common/rndc.conf -p ${CONTROLPORT} -s"
+
 status=0
 n=0
 
@@ -35,103 +36,103 @@ while true; do
     then
         break
     else
-        echo "I:zones are not fully loaded, waiting..."
+        echo_i "zones are not fully loaded, waiting..."
         tries=`expr $tries + 1`
         sleep 1
     fi
 done
 
 ret=0
-echo "I:fetching first copy of zone before update"
-$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd example.nil.\
-       @10.53.0.1 axfr -p 5300 > dig.out.ns1 || ret=1
-[ $ret = 0 ] || { echo I:failed; status=1; }
+echo_i "fetching first copy of zone before update"
+$DIG $DIGOPTS +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd example.nil.\
+       @10.53.0.1 axfr > dig.out.ns1 || ret=1
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
 
 ret=0
-echo "I:fetching second copy of zone before update"
-$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd example.nil.\
-       @10.53.0.2 axfr -p 5300 > dig.out.ns2 || ret=1
-[ $ret = 0 ] || { echo I:failed; status=1; }
+echo_i "fetching second copy of zone before update"
+$DIG $DIGOPTS +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd example.nil.\
+       @10.53.0.2 axfr > dig.out.ns2 || ret=1
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
 
 ret=0
-echo "I:comparing pre-update copies to known good data"
+echo_i "comparing pre-update copies to known good data"
 $PERL ../digcomp.pl knowngood.ns1.before dig.out.ns1 || ret=1
 $PERL ../digcomp.pl knowngood.ns1.before dig.out.ns2 || ret=1
-[ $ret = 0 ] || { echo I:failed; status=1; }
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
 
 ret=0
-echo "I:updating zone"
+echo_i "updating zone"
 # nsupdate will print a ">" prompt to stdout as it gets each input line.
 $NSUPDATE -k ns1/ddns.key <<END > /dev/null || ret=1
-server 10.53.0.1 5300
+server 10.53.0.1 ${PORT}
 update add updated.example.nil. 600 A 10.10.10.1
 add updated.example.nil. 600 TXT Foo
 delete t.example.nil.
 
 END
-[ $ret = 0 ] || { echo I:failed; status=1; }
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
 
-echo "I:sleeping 5 seconds for server to incorporate changes"
+echo_i "sleeping 5 seconds for server to incorporate changes"
 sleep 5
 
 ret=0
-echo "I:fetching first copy of zone after update"
-$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd example.nil.\
-       @10.53.0.1 axfr -p 5300 > dig.out.ns1 || ret=1
-[ $ret = 0 ] || { echo I:failed; status=1; }
+echo_i "fetching first copy of zone after update"
+$DIG $DIGOPTS +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd example.nil.\
+       @10.53.0.1 axfr > dig.out.ns1 || ret=1
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
 
 ret=0
-echo "I:fetching second copy of zone after update"
-$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd example.nil.\
-       @10.53.0.2 axfr -p 5300 > dig.out.ns2 || ret=1
-[ $ret = 0 ] || { echo I:failed; status=1; }
+echo_i "fetching second copy of zone after update"
+$DIG $DIGOPTS +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd example.nil.\
+       @10.53.0.2 axfr > dig.out.ns2 || ret=1
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
 
 ret=0
-echo "I:comparing post-update copies to known good data"
+echo_i "comparing post-update copies to known good data"
 $PERL ../digcomp.pl knowngood.ns1.after dig.out.ns1 || ret=1
 $PERL ../digcomp.pl knowngood.ns1.after dig.out.ns2 || ret=1
-[ $ret = 0 ] || { echo I:failed; status=1; }
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
 
 ret=0
-echo "I:testing local update policy"
-pre=`$DIG +short new.other.nil. @10.53.0.1 a -p 5300` || ret=1
+echo_i "testing local update policy"
+pre=`$DIG $DIGOPTS +short new.other.nil. @10.53.0.1 a` || ret=1
 [ -z "$pre" ] || ret=1
-[ $ret = 0 ] || { echo I:failed; status=1; }
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
 
 ret=0
-echo "I:updating zone"
+echo_i "updating zone"
 # nsupdate will print a ">" prompt to stdout as it gets each input line.
-$NSUPDATE -l -p 5300 -k ns1/session.key > /dev/null <<END || ret=1
+$NSUPDATE -l -p ${PORT} -k ns1/session.key > /dev/null <<END || ret=1
 zone other.nil.
 update add new.other.nil. 600 IN A 10.10.10.1
 send
 END
-[ $ret = 0 ] || { echo I:failed; status=1; }
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
 
-echo "I:sleeping 5 seconds for server to incorporate changes"
+echo_i "sleeping 5 seconds for server to incorporate changes"
 sleep 5
 
 ret=0
-echo "I:checking result of update"
-post=`$DIG +short new.other.nil. @10.53.0.1 a -p 5300` || ret=1
+echo_i "checking result of update"
+post=`$DIG $DIGOPTS +short new.other.nil. @10.53.0.1 a` || ret=1
 [ "$post" = "10.10.10.1" ] || ret=1
-[ $ret = 0 ] || { echo I:failed; status=1; }
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
 
 ret=0
-echo "I:comparing post-update copy to known good data"
+echo_i "comparing post-update copy to known good data"
 $PERL ../digcomp.pl knowngood.ns1.after dig.out.ns1 || ret=1
-[ $ret = 0 ] || { echo I:failed; status=1; }
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
 
 ret=0
-echo "I:testing zone consistency checks"
+echo_i "testing zone consistency checks"
 # inserting an NS record without a corresponding A or AAAA record should fail
-$NSUPDATE -l -p 5300 -k ns1/session.key > nsupdate.out 2>&1 << END && ret=1
+$NSUPDATE -l -p ${PORT} -k ns1/session.key > nsupdate.out 2>&1 << END && ret=1
 update add other.nil. 600 in ns ns3.other.nil.
 send
 END
 grep REFUSED nsupdate.out > /dev/null 2>&1 || ret=1
 # ...but should work if an A record is inserted first:
-$NSUPDATE -l -p 5300 -k ns1/session.key > nsupdate.out 2>&1 << END || ret=1
+$NSUPDATE -l -p ${PORT} -k ns1/session.key > nsupdate.out 2>&1 << END || ret=1
 update add ns4.other.nil 600 in a 10.53.0.1
 send
 update add other.nil. 600 in ns ns4.other.nil.
@@ -139,7 +140,7 @@ send
 END
 grep REFUSED nsupdate.out > /dev/null 2>&1 && ret=1
 # ...or if an AAAA record does:
-$NSUPDATE -l -p 5300 -k ns1/session.key > nsupdate.out 2>&1 << END || ret=1
+$NSUPDATE -l -p ${PORT} -k ns1/session.key > nsupdate.out 2>&1 << END || ret=1
 update add ns5.other.nil 600 in aaaa 2001:db8::1
 send
 update add other.nil. 600 in ns ns5.other.nil.
@@ -147,218 +148,222 @@ send
 END
 grep REFUSED nsupdate.out > /dev/null 2>&1 && ret=1
 # ...or if the NS and A/AAAA are inserted together:
-$NSUPDATE -l -p 5300 -k ns1/session.key > nsupdate.out 2>&1 << END || ret=1
+$NSUPDATE -l -p ${PORT} -k ns1/session.key > nsupdate.out 2>&1 << END || ret=1
 update add other.nil. 600 in ns ns6.other.nil.
 update add ns6.other.nil 600 in a 10.53.0.1
 send
 END
 grep REFUSED nsupdate.out > /dev/null 2>&1 && ret=1
-[ $ret = 0 ] || { echo I:failed; status=1; }
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
 
-echo "I:sleeping 5 seconds for server to incorporate changes"
+echo_i "sleeping 5 seconds for server to incorporate changes"
 sleep 5
 
 ret=0
-echo "I:checking result of update"
-$DIG +short @10.53.0.1 -p 5300 ns other.nil > dig.out.ns1 || ret=1
+echo_i "checking result of update"
+$DIG $DIGOPTS +short @10.53.0.1 ns other.nil > dig.out.ns1 || ret=1
 grep ns3.other.nil dig.out.ns1 > /dev/null 2>&1 && ret=1
 grep ns4.other.nil dig.out.ns1 > /dev/null 2>&1 || ret=1
 grep ns5.other.nil dig.out.ns1 > /dev/null 2>&1 || ret=1
 grep ns6.other.nil dig.out.ns1 > /dev/null 2>&1 || ret=1
-[ $ret = 0 ] || { echo I:failed; status=1; }
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
 
 ret=0
-echo "I:check SIG(0) key is accepted"
+echo_i "check SIG(0) key is accepted"
 key=`$KEYGEN -q -r $RANDFILE -a NSEC3RSASHA1 -b 512 -T KEY -n ENTITY xxx`
 echo "" | $NSUPDATE -k ${key}.private > /dev/null 2>&1 || ret=1
-[ $ret = 0 ] || { echo I:failed; status=1; }
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
 
 n=`expr $n + 1`
 ret=0
-echo "I:check TYPE=0 update is rejected by nsupdate ($n)"
+echo_i "check TYPE=0 update is rejected by nsupdate ($n)"
 $NSUPDATE <<END > nsupdate.out 2>&1 && ret=1
-    server 10.53.0.1 5300
+    server 10.53.0.1 ${PORT}
     ttl 300
     update add example.nil. in type0 ""
     send
 END
 grep "unknown class/type" nsupdate.out > /dev/null 2>&1 || ret=1
-[ $ret = 0 ] || { echo I:failed; status=1; }
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
 
 n=`expr $n + 1`
 ret=0
-echo "I:check TYPE=0 prerequisite is handled ($n)"
+echo_i "check TYPE=0 prerequisite is handled ($n)"
 $NSUPDATE -k ns1/ddns.key <<END > nsupdate.out 2>&1 || ret=1
-    server 10.53.0.1 5300
+    server 10.53.0.1 ${PORT}
     prereq nxrrset example.nil. type0
     send
 END
-$DIG +tcp version.bind txt ch @10.53.0.1 -p 5300 > dig.out.ns1.$n
+$DIG $DIGOPTS +tcp version.bind txt ch @10.53.0.1 > dig.out.ns1.$n
 grep "status: NOERROR" dig.out.ns1.$n > /dev/null || ret=1
-[ $ret = 0 ] || { echo I:failed; status=1; }
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
 
 n=`expr $n + 1`
 ret=0
-echo "I:check that TYPE=0 update is handled ($n)"
+echo_i "check that TYPE=0 update is handled ($n)"
 echo "a0e4280000010000000100000000060001c00c000000fe000000000000" |
-$PERL ../packet.pl -a 10.53.0.1 -p 5300 -t tcp > /dev/null
-$DIG +tcp version.bind txt ch @10.53.0.1 -p 5300 > dig.out.ns1.$n
+$PERL ../packet.pl -a 10.53.0.1 -p ${PORT} -t tcp > /dev/null
+$DIG $DIGOPTS +tcp version.bind txt ch @10.53.0.1 > dig.out.ns1.$n
 grep "status: NOERROR" dig.out.ns1.$n > /dev/null || ret=1
-[ $ret = 0 ] || { echo I:failed; status=1; }
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
 
 n=`expr $n + 1`
 ret=0
-echo "I:check that TYPE=0 additional data is handled ($n)"
+echo_i "check that TYPE=0 additional data is handled ($n)"
 echo "a0e4280000010000000000010000060001c00c000000fe000000000000" |
-$PERL ../packet.pl -a 10.53.0.1 -p 5300 -t tcp > /dev/null
-$DIG +tcp version.bind txt ch @10.53.0.1 -p 5300 > dig.out.ns1.$n
+$PERL ../packet.pl -a 10.53.0.1 -p ${PORT} -t tcp > /dev/null
+$DIG $DIGOPTS +tcp version.bind txt ch @10.53.0.1 > dig.out.ns1.$n
 grep "status: NOERROR" dig.out.ns1.$n > /dev/null || ret=1
-[ $ret = 0 ] || { echo I:failed; status=1; }
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
 
 n=`expr $n + 1`
 ret=0
-echo "I:check that update to undefined class is handled ($n)"
+echo_i "check that update to undefined class is handled ($n)"
 echo "a0e4280000010001000000000000060101c00c000000fe000000000000" |
-$PERL ../packet.pl -a 10.53.0.1 -p 5300 -t tcp > /dev/null
-$DIG +tcp version.bind txt ch @10.53.0.1 -p 5300 > dig.out.ns1.$n
+$PERL ../packet.pl -a 10.53.0.1 -p ${PORT} -t tcp > /dev/null
+$DIG $DIGOPTS +tcp version.bind txt ch @10.53.0.1 > dig.out.ns1.$n
 grep "status: NOERROR" dig.out.ns1.$n > /dev/null || ret=1
-[ $ret = 0 ] || { echo I:failed; status=1; }
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
 
 n=`expr $n + 1`
 ret=0
-echo "I:check that address family mismatch is handled ($n)"
+echo_i "check that address family mismatch is handled ($n)"
 $NSUPDATE <<END > /dev/null 2>&1 && ret=1
 server ::1
 local 127.0.0.1
 update add 600 txt.example.nil in txt "test"
 send
 END
-[ $ret = 0 ] || { echo I:failed; status=1; }
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
 
 
 n=`expr $n + 1`
 ret=0
-echo "I:check that unixtime serial number is correctly generated ($n)"
-oldserial=`$DIG +short unixtime.nil. soa @10.53.0.1 -p 5300 | awk '{print $3}'` || ret=1
+echo_i "check that unixtime serial number is correctly generated ($n)"
+oldserial=`$DIG $DIGOPTS +short unixtime.nil. soa @10.53.0.1 | awk '{print $3}'` || ret=1
 $NSUPDATE <<END > /dev/null 2>&1 || ret=1
-    server 10.53.0.1 5300
+    server 10.53.0.1 ${PORT}
     ttl 600
     update add new.unixtime.nil in a 1.2.3.4
     send
 END
 now=`$PERL -e 'print time()."\n";'`
 sleep 1
-serial=`$DIG +short unixtime.nil. soa @10.53.0.1 -p 5300 | awk '{print $3}'` || ret=1
+serial=`$DIG $DIGOPTS +short unixtime.nil. soa @10.53.0.1 | awk '{print $3}'` || ret=1
 [ "$oldserial" -ne "$serial" ] || ret=1
 # allow up to 2 seconds difference between the serial
 # number and the unix epoch date but no more
 $PERL -e 'exit 1 if abs($ARGV[1] - $ARGV[0]) > 2;' $now $serial || ret=1
-[ $ret = 0 ] || { echo I:failed; status=1; }
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
 
+ret=0
 if $PERL -e 'use Net::DNS;' 2>/dev/null
 then
-    echo "I:running update.pl test"
-    $PERL update_test.pl -s 10.53.0.1 -p 5300 update.nil. || status=1
+    echo_i "running update.pl test"
+    {
+      $PERL update_test.pl -s 10.53.0.1 -p ${PORT} update.nil. || ret=1
+    } | cat_i
+    [ $ret -eq 1 ] && { echo_i "failed"; status=1; }
 else
-    echo "I:The second part of this test requires the Net::DNS library." >&2
+    echo_i "The second part of this test requires the Net::DNS library." >&2
 fi
 
 ret=0
-echo "I:fetching first copy of test zone"
-$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd example.nil.\
-       @10.53.0.1 axfr -p 5300 > dig.out.ns1 || ret=1
-[ $ret = 0 ] || { echo I:failed; status=1; }
+echo_i "fetching first copy of test zone"
+$DIG $DIGOPTS +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd example.nil.\
+       @10.53.0.1 axfr > dig.out.ns1 || ret=1
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
 
 ret=0
-echo "I:fetching second copy of test zone"
-$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd example.nil.\
-       @10.53.0.2 axfr -p 5300 > dig.out.ns2 || ret=1
-[ $ret = 0 ] || { echo I:failed; status=1; }
+echo_i "fetching second copy of test zone"
+$DIG $DIGOPTS +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd example.nil.\
+       @10.53.0.2 axfr > dig.out.ns2 || ret=1
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
 
 ret=0
-echo "I:comparing zones"
+echo_i "comparing zones"
 $PERL ../digcomp.pl dig.out.ns1 dig.out.ns2 || ret=1
-[ $ret = 0 ] || { echo I:failed; status=1; }
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
 
-echo "I:SIGKILL and restart server ns1"
+echo_i "SIGKILL and restart server ns1"
 cd ns1
 kill -KILL `cat named.pid`
 rm named.pid
 cd ..
 sleep 10
 if 
-       $PERL $SYSTEMTESTTOP/start.pl --noclean --restart . ns1
+       $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . ns1
 then
-       echo "I:restarted server ns1"   
+       echo_i "restarted server ns1"
 else
-       echo "I:could not restart server ns1"
+       echo_i "could not restart server ns1"
        exit 1
 fi
 sleep 10
 
 ret=0
-echo "I:fetching ns1 after hard restart"
-$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd example.nil.\
-       @10.53.0.1 axfr -p 5300 > dig.out.ns1.after || ret=1
-[ $ret = 0 ] || { echo I:failed; status=1; }
+echo_i "fetching ns1 after hard restart"
+$DIG $DIGOPTS +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd example.nil.\
+       @10.53.0.1 axfr > dig.out.ns1.after || ret=1
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
 
 ret=0
-echo "I:comparing zones"
+echo_i "comparing zones"
 $PERL ../digcomp.pl dig.out.ns1 dig.out.ns1.after || ret=1
-[ $ret = 0 ] || { echo I:failed; status=1; }
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
 
-echo "I:begin RT #482 regression test"
+echo_i "begin RT #482 regression test"
 
 ret=0
-echo "I:update master"
+echo_i "update master"
 $NSUPDATE -k ns1/ddns.key <<END > /dev/null || ret=1
-server 10.53.0.1 5300
+server 10.53.0.1 ${PORT}
 update add updated2.example.nil. 600 A 10.10.10.2
 update add updated2.example.nil. 600 TXT Bar
 update delete c.example.nil.
 send
 END
-[ $ret = 0 ] || { echo I:failed; status=1; }
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
 
 sleep 5
 
-echo "I:SIGHUP slave"
+echo_i "SIGHUP slave"
 kill -HUP `cat ns2/named.pid`
 
 sleep 5
 
 ret=0
-echo "I:update master again"
+echo_i "update master again"
 $NSUPDATE -k ns1/ddns.key <<END > /dev/null || ret=1
-server 10.53.0.1 5300
+server 10.53.0.1 ${PORT}
 update add updated3.example.nil. 600 A 10.10.10.3
 update add updated3.example.nil. 600 TXT Zap
 del d.example.nil.
 send
 END
-[ $ret = 0 ] || { echo I:failed; status=1; }
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
 
 sleep 5
 
-echo "I:SIGHUP slave again"
+echo_i "SIGHUP slave again"
 kill -HUP `cat ns2/named.pid`
 
 sleep 5
 
-echo "I:check to 'out of sync' message"
+echo_i "check to 'out of sync' message"
 if grep "out of sync" ns2/named.run
 then
-       echo "I: failed (found 'out of sync')"
+       echo_i "failed (found 'out of sync')"
        status=1
 fi
 
-echo "I:end RT #482 regression test"
+echo_i "end RT #482 regression test"
 
 n=`expr $n + 1`
 ret=0
-echo "I:start NSEC3PARAM changes via UPDATE on a unsigned zone test ($n)"
+echo_i "start NSEC3PARAM changes via UPDATE on a unsigned zone test ($n)"
 $NSUPDATE << EOF
-server 10.53.0.3 5300
+server 10.53.0.3 ${PORT}
 update add example 3600 nsec3param 1 0 0 -
 send
 EOF
@@ -367,53 +372,53 @@ sleep 1
 
 # the zone is not signed.  The nsec3param records should be removed.
 # this also proves that the server is still running.
-$DIG +tcp +noadd +nosea +nostat +noquest +nocmd +norec example.\
-       @10.53.0.3 nsec3param -p 5300 > dig.out.ns3.$n || ret=1
+$DIG $DIGOPTS +tcp +noadd +nosea +nostat +noquest +nocmd +norec example.\
+       @10.53.0.3 nsec3param > dig.out.ns3.$n || ret=1
 grep "ANSWER: 0" dig.out.ns3.$n > /dev/null || ret=1
 grep "flags:[^;]* aa[ ;]" dig.out.ns3.$n > /dev/null || ret=1
-[ $ret = 0 ] || { echo I:failed; status=1; }
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
 
 n=`expr $n + 1`
 ret=0
-echo "I:change the NSEC3PARAM ttl via update ($n)"
+echo_i "change the NSEC3PARAM ttl via update ($n)"
 $NSUPDATE << EOF
-server 10.53.0.3 5300
+server 10.53.0.3 ${PORT}
 update add nsec3param.test 3600 NSEC3PARAM 1 0 1 -
 send
 EOF
 
 sleep 1
 
-$DIG +tcp +noadd +nosea +nostat +noquest +nocmd +norec nsec3param.test.\
-        @10.53.0.3 nsec3param -p 5300 > dig.out.ns3.$n || ret=1
+$DIG $DIGOPTS +tcp +noadd +nosea +nostat +noquest +nocmd +norec nsec3param.test.\
+        @10.53.0.3 nsec3param > dig.out.ns3.$n || ret=1
 grep "ANSWER: 1" dig.out.ns3.$n > /dev/null || ret=1
 grep "3600.*NSEC3PARAM" dig.out.ns3.$n > /dev/null || ret=1
 grep "flags:[^;]* aa[ ;]" dig.out.ns3.$n > /dev/null || ret=1
-[ $ret = 0 ] || { echo I:failed; status=1; }
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
 
 n=`expr $n + 1`
 ret=0
-echo "I:add a new the NSEC3PARAM via update ($n)"
+echo_i "add a new the NSEC3PARAM via update ($n)"
 $NSUPDATE << EOF
-server 10.53.0.3 5300
+server 10.53.0.3 ${PORT}
 update add nsec3param.test 3600 NSEC3PARAM 1 0 4 -
 send
 EOF
 
 sleep 1
 
-$DIG +tcp +noadd +nosea +nostat +noquest +nocmd +norec nsec3param.test.\
-        @10.53.0.3 nsec3param -p 5300 > dig.out.ns3.$n || ret=1
+$DIG $DIGOPTS +tcp +noadd +nosea +nostat +noquest +nocmd +norec nsec3param.test.\
+        @10.53.0.3 nsec3param > dig.out.ns3.$n || ret=1
 grep "ANSWER: 2" dig.out.ns3.$n > /dev/null || ret=1
 grep "NSEC3PARAM 1 0 4 -" dig.out.ns3.$n > /dev/null || ret=1
 grep "flags:[^;]* aa[ ;]" dig.out.ns3.$n > /dev/null || ret=1
-if [ $ret != 0 ] ; then echo "I: failed"; status=`expr $ret + $status`; fi
+if [ $ret != 0 ] ; then echo_i "failed"; status=`expr $ret + $status`; fi
 
 n=`expr $n + 1`
 ret=0
-echo "I:add, delete and change the ttl of the NSEC3PARAM rrset via update ($n)"
+echo_i "add, delete and change the ttl of the NSEC3PARAM rrset via update ($n)"
 $NSUPDATE << EOF
-server 10.53.0.3 5300
+server 10.53.0.3 ${PORT}
 update delete nsec3param.test NSEC3PARAM
 update add nsec3param.test 7200 NSEC3PARAM 1 0 5 -
 send
@@ -421,8 +426,8 @@ EOF
 
 sleep 1
 
-$DIG +tcp +noadd +nosea +nostat +noquest +nocmd +norec nsec3param.test.\
-        @10.53.0.3 nsec3param -p 5300 > dig.out.ns3.$n || ret=1
+$DIG $DIGOPTS +tcp +noadd +nosea +nostat +noquest +nocmd +norec nsec3param.test.\
+        @10.53.0.3 nsec3param > dig.out.ns3.$n || ret=1
 grep "ANSWER: 1" dig.out.ns3.$n > /dev/null || ret=1
 grep "7200.*NSEC3PARAM 1 0 5 -" dig.out.ns3.$n > /dev/null || ret=1
 grep "flags:[^;]* aa[ ;]" dig.out.ns3.$n > /dev/null || ret=1
@@ -434,122 +439,122 @@ grep "add nsec3param.test.      7200    IN      NSEC3PARAM 1 0 1 -" jp.out.ns3.$n > /dev/null
 grep "add nsec3param.test.     0       IN      TYPE65534 .# 6 000180000500" jp.out.ns3.$n > /dev/null || ret=1
 grep "add nsec3param.test.     0       IN      TYPE65534 .# 6 000140000100" jp.out.ns3.$n > /dev/null || ret=1
 grep "add nsec3param.test.     0       IN      TYPE65534 .# 6 000140000400" jp.out.ns3.$n > /dev/null || ret=1
-if [ $ret != 0 ] ; then echo "I: failed"; status=`expr $ret + $status`; fi
+if [ $ret != 0 ] ; then echo_i "failed"; status=`expr $ret + $status`; fi
 
 
 
 ret=0
-echo "I:testing that rndc stop updates the master file"
+echo_i "testing that rndc stop updates the master file"
 $NSUPDATE -k ns1/ddns.key <<END > /dev/null || ret=1
-server 10.53.0.1 5300
+server 10.53.0.1 ${PORT}
 update add updated4.example.nil. 600 A 10.10.10.3
 send
 END
-$PERL $SYSTEMTESTTOP/stop.pl --use-rndc . ns1
+$PERL $SYSTEMTESTTOP/stop.pl --use-rndc --port ${CONTROLPORT} . ns1
 # Removing the journal file and restarting the server means
 # that the data served by the new server process are exactly
 # those dumped to the master file by "rndc stop".
 rm -f ns1/*jnl
-$PERL $SYSTEMTESTTOP/start.pl --noclean --restart . ns1
-$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd updated4.example.nil.\
-       @10.53.0.1 a -p 5300 > dig.out.ns1 || status=1
+$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . ns1
+$DIG $DIGOPTS +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd updated4.example.nil.\
+       @10.53.0.1 a > dig.out.ns1 || status=1
 $PERL ../digcomp.pl knowngood.ns1.afterstop dig.out.ns1 || ret=1
-[ $ret = 0 ] || { echo I:failed; status=1; }
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
 
 ret=0
-echo "I:check that 'nsupdate -l' with a missing keyfile reports the missing file"
-$NSUPDATE -l -p 5300 -k ns1/nonexistant.key 2> nsupdate.out < /dev/null
+echo_i "check that 'nsupdate -l' with a missing keyfile reports the missing file"
+$NSUPDATE -l -p ${PORT} -k ns1/nonexistant.key 2> nsupdate.out < /dev/null
 grep ns1/nonexistant.key nsupdate.out > /dev/null || ret=1
 if test $ret -ne 0
 then
-echo "I:failed"; status=1
+echo_i "failed"; status=1
 fi
 
 n=`expr $n + 1`
 ret=0
-echo "I:check that 'update-policy local' works from localhost address ($n)"
-$NSUPDATE -p 5300 -k ns5/session.key > nsupdate.out.$n 2>&1 << END || ret=1
-server 10.53.0.5 5300
+echo_i "check that 'update-policy local' works from localhost address ($n)"
+$NSUPDATE -k ns5/session.key > nsupdate.out.$n 2>&1 << END || ret=1
+server 10.53.0.5 ${PORT}
 local 127.0.0.1
 update add fromlocal.local.nil. 600 A 1.2.3.4
 send
 END
 grep REFUSED nsupdate.out.$n > /dev/null 2>&1 && ret=1
-$DIG @10.53.0.5 -p 5300 \
+$DIG $DIGOPTS @10.53.0.5 \
         +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd \
         fromlocal.local.nil. > dig.out.ns5.$n || ret=1
 grep fromlocal dig.out.ns5.$n > /dev/null 2>&1 || ret=1
 if test $ret -ne 0
 then
-echo "I:failed"; status=1
+echo_i "failed"; status=1
 fi
 
 n=`expr $n + 1`
 ret=0
-echo "I:check that 'update-policy local' fails from non-localhost address ($n)"
+echo_i "check that 'update-policy local' fails from non-localhost address ($n)"
 grep 'match on session key not from localhost' ns5/named.run > /dev/null && ret=1
-$NSUPDATE -p 5300 -k ns5/session.key > nsupdate.out.$n 2>&1 << END && ret=1
-server 10.53.0.5 5300
+$NSUPDATE -k ns5/session.key > nsupdate.out.$n 2>&1 << END && ret=1
+server 10.53.0.5 ${PORT}
 local 10.53.0.1
 update add nonlocal.local.nil. 600 A 4.3.2.1
 send
 END
 grep REFUSED nsupdate.out.$n > /dev/null 2>&1 || ret=1
 grep 'match on session key not from localhost' ns5/named.run > /dev/null || ret=1
-$DIG @10.53.0.5 -p 5300 \
+$DIG $DIGOPTS @10.53.0.5 \
         +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd \
         nonlocal.local.nil. > dig.out.ns5.$n || ret=1
 grep nonlocal dig.out.ns5.$n > /dev/null 2>&1 && ret=1
 if test $ret -ne 0
 then
-echo "I:failed"; status=1
+echo_i "failed"; status=1
 fi
 
 n=`expr $n + 1`
 ret=0
-echo "I:check that changes to the DNSKEY RRset TTL do not have side effects ($n)"
-$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd dnskey.test. \
-        @10.53.0.3 -p 5300 dnskey | \
+echo_i "check that changes to the DNSKEY RRset TTL do not have side effects ($n)"
+$DIG $DIGOPTS +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd dnskey.test. \
+        @10.53.0.3 dnskey | \
        sed -n 's/\(.*\)10.IN/update add \1600 IN/p' |
-       (echo server 10.53.0.3 5300; cat - ; echo send ) |
+       (echo server 10.53.0.3 ${PORT}; cat - ; echo send ) |
 $NSUPDATE 
 
-$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd dnskey.test. \
-       @10.53.0.3 -p 5300 any > dig.out.ns3.$n
+$DIG $DIGOPTS +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd dnskey.test. \
+       @10.53.0.3 any > dig.out.ns3.$n
 
 grep "600.*DNSKEY" dig.out.ns3.$n > /dev/null || ret=1
 grep TYPE65534 dig.out.ns3.$n > /dev/null && ret=1
 if test $ret -ne 0
 then
-echo "I:failed"; status=1
+echo_i "failed"; status=1
 fi
 
 n=`expr $n + 1`
 ret=0
-echo "I:check notify with TSIG worked ($n)"
+echo_i "check notify with TSIG worked ($n)"
 # if the alternate view received a notify--meaning, the notify was
 # validly signed by "altkey"--then the zonefile update.alt.bk will
 # will have been created.
 [ -f ns2/update.alt.bk ] || ret=1
 if [ $ret -ne 0 ]; then
-    echo "I:failed"
+    echo_i "failed"
     status=1
 fi
 
 n=`expr $n + 1`
 ret=0
-echo "I:check command list ($n)"
+echo_i "check command list ($n)"
 (
 while read cmd 
 do
     echo "$cmd" | $NSUPDATE  > /dev/null 2>&1
     if test $? -gt 1 ; then
-       echo "I: failed ($cmd)"
+       echo_i "failed ($cmd)"
        ret=1
     fi
     echo "$cmd " | $NSUPDATE  > /dev/null 2>&1
     if test $? -gt 1 ; then
-       echo "I: failed ($cmd)"
+       echo_i "failed ($cmd)"
        ret=1
     fi
 done
@@ -561,159 +566,159 @@ fi
 
 n=`expr $n + 1`
 ret=0
-echo "I:check TSIG key algorithms ($n)"
+echo_i "check TSIG key algorithms ($n)"
 for alg in md5 sha1 sha224 sha256 sha384 sha512; do
     $NSUPDATE -k ns1/${alg}.key <<END > /dev/null || ret=1
-server 10.53.0.1 5300
+server 10.53.0.1 ${PORT}
 update add ${alg}.keytests.nil. 600 A 10.10.10.3
 send
 END
 done
 sleep 2
 for alg in md5 sha1 sha224 sha256 sha384 sha512; do
-    $DIG +short @10.53.0.1 -p 5300 ${alg}.keytests.nil | grep 10.10.10.3 > /dev/null 2>&1 || ret=1
+    $DIG $DIGOPTS +short @10.53.0.1 ${alg}.keytests.nil | grep 10.10.10.3 > /dev/null 2>&1 || ret=1
 done
 if [ $ret -ne 0 ]; then
-    echo "I:failed"
+    echo_i "failed"
     status=1
 fi
 
 n=`expr $n + 1`
 ret=0
-echo "I:add a very large record. ($n)"
+echo_i "add a very large record. ($n)"
 $NSUPDATE verylarge || ret=1
-$DIG +noedns +tcp @10.53.0.1 -p 5300 txt txt.update.nil > dig.out.ns1.test$n
+$DIG $DIGOPTS +noedns +tcp @10.53.0.1 txt txt.update.nil > dig.out.ns1.test$n
 grep "ANSWER: 1," dig.out.ns1.test$n > /dev/null || ret=1
 if [ $ret -ne 0 ]; then
-    echo "I:failed"
+    echo_i "failed"
     status=1
 fi
 
 n=`expr $n + 1`
-echo "I:check adding of delegating NS records processing ($n)"
+echo_i "check adding of delegating NS records processing ($n)"
 ret=0
 $NSUPDATE -v << EOF > nsupdate.out-$n 2>&1 || ret=1
-server 10.53.0.3 5300
+server 10.53.0.3 ${PORT}
 zone delegation.test.
 update add child.delegation.test. 3600 NS foo.example.net.
 update add child.delegation.test. 3600 NS bar.example.net.
 send
 EOF
-$DIG +tcp @10.53.0.3 -p 5300 ns child.delegation.test > dig.out.ns1.test$n
+$DIG $DIGOPTS +tcp @10.53.0.3 ns child.delegation.test > dig.out.ns1.test$n
 grep "status: NOERROR" dig.out.ns1.test$n > /dev/null 2>&1 || ret=1
 grep "AUTHORITY: 2" dig.out.ns1.test$n > /dev/null 2>&1 || ret=1
-[ $ret = 0 ] || { echo I:failed; status=1; }
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
 
 n=`expr $n + 1`
-echo "I:check deleting of delegating NS records processing ($n)"
+echo_i "check deleting of delegating NS records processing ($n)"
 ret=0
 $NSUPDATE -v << EOF > nsupdate.out-$n 2>&1 || ret=1
-server 10.53.0.3 5300
+server 10.53.0.3 ${PORT}
 zone delegation.test.
 update del child.delegation.test. 3600 NS foo.example.net.
 update del child.delegation.test. 3600 NS bar.example.net.
 send
 EOF
-$DIG +tcp @10.53.0.3 -p 5300 ns child.delegation.test > dig.out.ns1.test$n
+$DIG $DIGOPTS +tcp @10.53.0.3 ns child.delegation.test > dig.out.ns1.test$n
 grep "status: NXDOMAIN" dig.out.ns1.test$n > /dev/null 2>&1 || ret=1
-[ $ret = 0 ] || { echo I:failed; status=1; }
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
 
 n=`expr $n + 1`
-echo "I:check that adding too many records is blocked ($n)"
+echo_i "check that adding too many records is blocked ($n)"
 ret=0
 $NSUPDATE -v << EOF > nsupdate.out-$n 2>&1 && ret=1
-server 10.53.0.3 5300
+server 10.53.0.3 ${PORT}
 zone too-big.test.
 update add r1.too-big.test 3600 IN TXT r1.too-big.test
 send
 EOF
 grep "update failed: SERVFAIL" nsupdate.out-$n > /dev/null || ret=1
-$DIG +tcp @10.53.0.3 -p 5300 r1.too-big.test TXT > dig.out.ns3.test$n
+$DIG $DIGOPTS +tcp @10.53.0.3 r1.too-big.test TXT > dig.out.ns3.test$n
 grep "status: NXDOMAIN" dig.out.ns3.test$n > /dev/null || ret=1
 grep "records in zone (4) exceeds max-records (3)" ns3/named.run > /dev/null || ret=1
-[ $ret = 0 ] || { echo I:failed; status=1; }
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
 
 n=`expr $n + 1`
 ret=0
-echo "I:check whether valid addresses are used for master failover ($n)"
+echo_i "check whether valid addresses are used for master failover ($n)"
 $NSUPDATE -t 1 <<END > nsupdate.out-$n 2>&1 && ret=1
-server 10.53.0.4 5300
+server 10.53.0.4 ${PORT}
 zone unreachable.
 update add unreachable. 600 A 192.0.2.1
 send
 END
-grep "; Communication with 10.53.0.4#5300 failed: timed out" nsupdate.out-$n > /dev/null 2>&1 || ret=1
+grep "; Communication with 10.53.0.4#${PORT} failed: timed out" nsupdate.out-$n > /dev/null 2>&1 || ret=1
 grep "not implemented" nsupdate.out-$n > /dev/null 2>&1 && ret=1
-[ $ret = 0 ] || { echo I:failed; status=1; }
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
 
 n=`expr $n + 1`
 ret=0
-echo "I:ensure bad owner name is fatal in non-interactive mode ($n)"
+echo_i "ensure bad owner name is fatal in non-interactive mode ($n)"
 $NSUPDATE <<END > nsupdate.out 2>&1 && ret=1
     update add emptylabel..nil. 600 A 10.10.10.1
 END
 grep "invalid owner name: empty label" nsupdate.out > /dev/null || ret=1
 grep "syntax error" nsupdate.out > /dev/null || ret=1
-[ $ret = 0 ] || { echo I:failed; status=1; }
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
 
 n=`expr $n + 1`
 ret=0
-echo "I:ensure bad owner name is not fatal in interactive mode ($n)"
+echo_i "ensure bad owner name is not fatal in interactive mode ($n)"
 $NSUPDATE -i <<END > nsupdate.out 2>&1 || ret=1
     update add emptylabel..nil. 600 A 10.10.10.1
 END
 grep "invalid owner name: empty label" nsupdate.out > /dev/null || ret=1
-[ $ret = 0 ] || { echo I:failed; status=1; }
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
 
 n=`expr $n + 1`
 ret=0
-echo "I:ensure invalid key type is fatal in non-interactive mode ($n)"
+echo_i "ensure invalid key type is fatal in non-interactive mode ($n)"
 $NSUPDATE <<END > nsupdate.out 2>&1 && ret=1
     key badkeytype:example abcd12345678
 END
 grep "unknown key type 'badkeytype'" nsupdate.out > /dev/null || ret=1
 grep "syntax error" nsupdate.out > /dev/null || ret=1
-[ $ret = 0 ] || { echo I:failed; status=1; }
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
 
 n=`expr $n + 1`
 ret=0
-echo "I:ensure invalid key type is not fatal in interactive mode ($n)"
+echo_i "ensure invalid key type is not fatal in interactive mode ($n)"
 $NSUPDATE -i <<END > nsupdate.out 2>&1 || ret=1
     key badkeytype:example abcd12345678
 END
 grep "unknown key type 'badkeytype'" nsupdate.out > /dev/null || ret=1
-[ $ret = 0 ] || { echo I:failed; status=1; }
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
 
 n=`expr $n + 1`
 ret=0
-echo "I:ensure unresolvable server name is fatal in non-interactive mode ($n)"
+echo_i "ensure unresolvable server name is fatal in non-interactive mode ($n)"
 $NSUPDATE <<END > nsupdate.out 2>&1 && ret=1
     server unresolvable..
 END
 grep "couldn't get address for 'unresolvable..': not found" nsupdate.out > /dev/null || ret=1
 grep "syntax error" nsupdate.out > /dev/null || ret=1
-[ $ret = 0 ] || { echo I:failed; status=1; }
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
 
 n=`expr $n + 1`
 ret=0
-echo "I:ensure unresolvable server name is not fatal in interactive mode ($n)"
+echo_i "ensure unresolvable server name is not fatal in interactive mode ($n)"
 $NSUPDATE -i <<END > nsupdate.out 2>&1 || ret=1
     server unresolvable..
 END
 grep "couldn't get address for 'unresolvable..': not found" nsupdate.out > /dev/null || ret=1
-[ $ret = 0 ] || { echo I:failed; status=1; }
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
 
 n=`expr $n + 1`
 ret=0
-echo "I:check that TKEY in a update is rejected ($n)"
+echo_i "check that TKEY in a update is rejected ($n)"
 $NSUPDATE -d <<END > nsupdate.out-$n 2>&1 && ret=1
-server 10.53.0.3 5300
+server 10.53.0.3 ${PORT}
 update add tkey.example 0 in tkey invalid.algorithm. 1516055980 1516140801 1 0 16 gRof8D2BFKvl/vrr9Lmnjw== 16 gRof8D2BFKvl/vrr9Lmnjw==
 send
 END
 grep "UPDATE, status: NOERROR" nsupdate.out-$n > /dev/null 2>&1 || ret=1
 grep "UPDATE, status: FORMERR" nsupdate.out-$n > /dev/null 2>&1 || ret=1
-[ $ret = 0 ] || { echo I:failed; status=1; }
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
 
 #
 #  Add client library tests here
@@ -722,76 +727,76 @@ if test -x ${SAMPLEUPDATE}
 then
     n=`expr $n + 1`
     ret=0
-    echo "I:check that dns_client_update handles prerequisite NXDOMAIN failure ($n)"
-    $SAMPLEUPDATE -P 5300 -a 10.53.0.1 -a 10.53.0.2 -p "nxdomain exists.sample" \
+    echo_i "check that dns_client_update handles prerequisite NXDOMAIN failure ($n)"
+    $SAMPLEUPDATE -P ${PORT} -a 10.53.0.1 -a 10.53.0.2 -p "nxdomain exists.sample" \
        add "nxdomain-exists.sample 0 in a 1.2.3.4" > update.out.test$n 2>&1
-    $SAMPLEUPDATE -P 5300 -a 10.53.0.2 -p "nxdomain exists.sample" \
+    $SAMPLEUPDATE -P ${PORT} -a 10.53.0.2 -p "nxdomain exists.sample" \
        add "check-nxdomain-exists.sample 0 in a 1.2.3.4" > update.out.check$n 2>&1
-    $DIG +tcp @10.53.0.1 -p 5300 a nxdomain-exists.sample > dig.out.ns1.test$n
-    $DIG +tcp @10.53.0.2 -p 5300 a nxdomain-exists.sample > dig.out.ns2.test$n
-    $DIG +tcp @10.53.0.2 -p 5300 a check-nxdomain-exists.sample > check.out.ns2.test$n
+    $DIG $DIGOPTS +tcp @10.53.0.1 a nxdomain-exists.sample > dig.out.ns1.test$n
+    $DIG $DIGOPTS +tcp @10.53.0.2 a nxdomain-exists.sample > dig.out.ns2.test$n
+    $DIG $DIGOPTS +tcp @10.53.0.2 a check-nxdomain-exists.sample > check.out.ns2.test$n
     grep "update failed: YXDOMAIN" update.out.test$n > /dev/null || ret=1
     grep "update succeeded" update.out.check$n > /dev/null || ret=1
     grep "status: NXDOMAIN" dig.out.ns1.test$n > /dev/null || ret=1
     grep "status: NXDOMAIN" dig.out.ns2.test$n > /dev/null || ret=1
     grep "status: NOERROR" check.out.ns2.test$n > /dev/null || ret=1
-    [ $ret = 0 ] || { echo I:failed; status=1; }
+    [ $ret = 0 ] || { echo_i "failed"; status=1; }
 
     n=`expr $n + 1`
     ret=0
-    echo "I:check that dns_client_update handles prerequisite YXDOMAIN failure ($n)"
-    $SAMPLEUPDATE -P 5300 -a 10.53.0.1 -a 10.53.0.2 -p "yxdomain nxdomain.sample" \
+    echo_i "check that dns_client_update handles prerequisite YXDOMAIN failure ($n)"
+    $SAMPLEUPDATE -P ${PORT} -a 10.53.0.1 -a 10.53.0.2 -p "yxdomain nxdomain.sample" \
        add "yxdomain-nxdomain.sample 0 in a 1.2.3.4" > update.out.test$n 2>&1
-    $SAMPLEUPDATE -P 5300 -a 10.53.0.2 -p "yxdomain nxdomain.sample" \
+    $SAMPLEUPDATE -P ${PORT} -a 10.53.0.2 -p "yxdomain nxdomain.sample" \
        add "check-yxdomain-nxdomain.sample 0 in a 1.2.3.4" > update.out.check$n 2>&1
-    $DIG +tcp @10.53.0.1 -p 5300 a nxdomain-exists.sample > dig.out.ns1.test$n
-    $DIG +tcp @10.53.0.2 -p 5300 a nxdomain-exists.sample > dig.out.ns2.test$n
-    $DIG +tcp @10.53.0.2 -p 5300 a check-nxdomain-exists.sample > check.out.ns2.test$n
+    $DIG $DIGOPTS +tcp @10.53.0.1 a nxdomain-exists.sample > dig.out.ns1.test$n
+    $DIG $DIGOPTS +tcp @10.53.0.2 a nxdomain-exists.sample > dig.out.ns2.test$n
+    $DIG $DIGOPTS +tcp @10.53.0.2 a check-nxdomain-exists.sample > check.out.ns2.test$n
     grep "update failed: NXDOMAIN" update.out.test$n > /dev/null || ret=1
     grep "update succeeded" update.out.check$n > /dev/null || ret=1
     grep "status: NXDOMAIN" dig.out.ns1.test$n > /dev/null || ret=1
     grep "status: NXDOMAIN" dig.out.ns2.test$n > /dev/null || ret=1
     grep "status: NOERROR" check.out.ns2.test$n > /dev/null || ret=1
-    [ $ret = 0 ] || { echo I:failed; status=1; }
+    [ $ret = 0 ] || { echo_i "failed"; status=1; }
 
     n=`expr $n + 1`
     ret=0
-    echo "I:check that dns_client_update handles prerequisite NXRRSET failure ($n)"
-    $SAMPLEUPDATE -P 5300 -a 10.53.0.1 -a 10.53.0.2 -p "nxrrset exists.sample TXT This RRset exists." \
+    echo_i "check that dns_client_update handles prerequisite NXRRSET failure ($n)"
+    $SAMPLEUPDATE -P ${PORT} -a 10.53.0.1 -a 10.53.0.2 -p "nxrrset exists.sample TXT This RRset exists." \
        add "nxrrset-exists.sample 0 in a 1.2.3.4" > update.out.test$n 2>&1
-    $SAMPLEUPDATE -P 5300 -a 10.53.0.2 -p "nxrrset exists.sample TXT This RRset exists." \
+    $SAMPLEUPDATE -P ${PORT} -a 10.53.0.2 -p "nxrrset exists.sample TXT This RRset exists." \
        add "check-nxrrset-exists.sample 0 in a 1.2.3.4" > update.out.check$n 2>&1
-    $DIG +tcp @10.53.0.1 -p 5300 a nxrrset-exists.sample > dig.out.ns1.test$n
-    $DIG +tcp @10.53.0.2 -p 5300 a nxrrset-exists.sample > dig.out.ns2.test$n
-    $DIG +tcp @10.53.0.2 -p 5300 a check-nxrrset-exists.sample > check.out.ns2.test$n
+    $DIG $DIGOPTS +tcp @10.53.0.1 a nxrrset-exists.sample > dig.out.ns1.test$n
+    $DIG $DIGOPTS +tcp @10.53.0.2 a nxrrset-exists.sample > dig.out.ns2.test$n
+    $DIG $DIGOPTS +tcp @10.53.0.2 a check-nxrrset-exists.sample > check.out.ns2.test$n
     grep "update failed: YXRRSET" update.out.test$n > /dev/null || ret=1
     grep "update succeeded" update.out.check$n > /dev/null || ret=1
     grep "status: NXDOMAIN" dig.out.ns1.test$n > /dev/null || ret=1
     grep "status: NXDOMAIN" dig.out.ns2.test$n > /dev/null || ret=1
     grep "status: NOERROR" check.out.ns2.test$n > /dev/null || ret=1
-    [ $ret = 0 ] || { echo I:failed; status=1; }
+    [ $ret = 0 ] || { echo_i "failed"; status=1; }
 
     n=`expr $n + 1`
     ret=0
-    echo "I:check that dns_client_update handles prerequisite YXRRSET failure ($n)"
-    $SAMPLEUPDATE -s -P 5300 -a 10.53.0.1 -a 10.53.0.2 -p "yxrrset no-txt.sample TXT" \
+    echo_i "check that dns_client_update handles prerequisite YXRRSET failure ($n)"
+    $SAMPLEUPDATE -s -P ${PORT} -a 10.53.0.1 -a 10.53.0.2 -p "yxrrset no-txt.sample TXT" \
        add "yxrrset-nxrrset.sample 0 in a 1.2.3.4" > update.out.test$n 2>&1
-    $SAMPLEUPDATE -P 5300 -a 10.53.0.2 -p "yxrrset no-txt.sample TXT" \
+    $SAMPLEUPDATE -P ${PORT} -a 10.53.0.2 -p "yxrrset no-txt.sample TXT" \
        add "check-yxrrset-nxrrset.sample 0 in a 1.2.3.4" > update.out.check$n 2>&1
-    $DIG +tcp @10.53.0.1 -p 5300 a yxrrset-nxrrset.sample > dig.out.ns1.test$n
-    $DIG +tcp @10.53.0.2 -p 5300 a yxrrset-nxrrset.sample > dig.out.ns2.test$n
-    $DIG +tcp @10.53.0.2 -p 5300 a check-yxrrset-nxrrset.sample > check.out.ns2.test$n
+    $DIG $DIGOPTS +tcp @10.53.0.1 a yxrrset-nxrrset.sample > dig.out.ns1.test$n
+    $DIG $DIGOPTS +tcp @10.53.0.2 a yxrrset-nxrrset.sample > dig.out.ns2.test$n
+    $DIG $DIGOPTS +tcp @10.53.0.2 a check-yxrrset-nxrrset.sample > check.out.ns2.test$n
     grep "update failed: NXRRSET" update.out.test$n > /dev/null || ret=1
     grep "update succeeded" update.out.check$n > /dev/null || ret=1
     grep "status: NXDOMAIN" dig.out.ns1.test$n > /dev/null || ret=1
     grep "status: NXDOMAIN" dig.out.ns2.test$n > /dev/null || ret=1
     grep "status: NOERROR" check.out.ns2.test$n > /dev/null || ret=1
     grep "2nd update failed: NXRRSET" update.out.test$n > /dev/null || ret=1
-    [ $ret = 0 ] || { echo I:failed; status=1; }
+    [ $ret = 0 ] || { echo_i "failed"; status=1; }
 fi
 #
 # End client library tests here
 #
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index 539984162c725f5c14d4a4200e4e20dfd841a19f..e54a338867ab6d9469d5b74d41eaef7a37e4da82 100644 (file)
@@ -37,8 +37,6 @@
 #
 #    perl -MCPAN -e "install Net::DNS"
 #
-# $Id: update_test.pl,v 1.10 2007/06/19 23:47:04 tbox Exp $
-#
 
 use Getopt::Std;
 use Net::DNS;
@@ -65,7 +63,7 @@ my $failures = 0;
 sub assert {
     my ($cond, $explanation) = @_;
     if (!$cond) {
-       print "I:Test Failed: $explanation ***\n";
+       print "Test Failed: $explanation ***\n";
        $failures++
     }
 }
@@ -86,13 +84,13 @@ sub test {
        my $rcode = $reply->header->rcode;
         assert($rcode eq $expected, "expected $expected, got $rcode");
     } else {
-       print "I:Update failed: ", $res->errorstring, "\n";
+       print "Update failed: ", $res->errorstring, "\n";
     }
 }
 
 sub section {
     my ($msg) = @_;
-    print "I:$msg\n";
+    print "$msg\n";
 }
 
 section("Delete any leftovers from previous tests");
@@ -419,8 +417,8 @@ test("NOERROR", ["update", rr_add("u.$zone 300 NS ns.u.$zone")]);
 test("NOERROR", ["update", rr_del("u.$zone NS ns.u.$zone")]);
 
 if ($failures) {
-    print "I:$failures tests failed.\n";
+    print "$failures tests failed.\n";
 } else {
-    print "I:All tests successful.\n";
+    print "All tests successful.\n";
 }
 exit $failures;
similarity index 99%
rename from bin/tests/system/nsupdate/verylarge
rename to bin/tests/system/nsupdate/verylarge.in
index 39beadf3e40224a2afbbfcc801b5f9e7dd882eaa..12a86b5bd91ba770719b811e9418f2ae78272e30 100644 (file)
@@ -25,6 +25,6 @@
 ;
 ; 65535 bytes = total
 
-server 10.53.0.1 5300
+server 10.53.0.1 @PORT@
 update add txt.update.nil. 600 TXT 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 0123456 01
 send
index cdb88019b61d8ee3db2e0ed296fad28afaf0b411..a0a7baf200b78129b9db70fd7ba25417eda83dc7 100644 (file)
@@ -25,3 +25,4 @@ rm -rf ns1/root.db
 rm -rf ns2/example.db
 rm -rf ns2/example.com.db
 rm -rf nsupdate.out.test
+rm -f ns*/named.conf
similarity index 91%
rename from bin/tests/system/pending/ns1/named.conf
rename to bin/tests/system/pending/ns1/named.conf.in
index b23843f597a791e6bb5fb41755e9fe0a6f54c120..7eb04e5adc8d6003c3f3baec6308ea520694fd0e 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.2 2009/11/17 23:55:18 marka Exp $ */
-
-controls { /* empty */ };
-
 include "trusted.conf";
 
 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; };
@@ -35,4 +31,3 @@ zone "." {
        type master;
        file "root.db.signed";
 };
-
similarity index 93%
rename from bin/tests/system/pending/ns2/named.conf
rename to bin/tests/system/pending/ns2/named.conf.in
index 92bb19e564d76ff18b6110aed243f91c286c7eea..e352bc372967ad681c045698031bde9612c7b8e1 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.6 2010/01/07 23:48:53 tbox Exp $ */
-
 // NS2
 
-controls { /* empty */ };
-
 include "trusted.conf";
 
 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 92%
rename from bin/tests/system/pending/ns3/named.conf
rename to bin/tests/system/pending/ns3/named.conf.in
index 659746a4b74f9fcec53d398dccede76430843c93..1b8d3d6aa4c682138e2de202528a2ebca861c89d 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.3 2009/11/18 23:48:07 tbox Exp $ */
-
 // NS2
 
-controls { /* empty */ };
-
 include "trusted.conf";
 
 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; };
similarity index 91%
rename from bin/tests/system/pending/ns4/named.conf
rename to bin/tests/system/pending/ns4/named.conf.in
index 8c941496e234b7f7105140213efba8c994f884b7..c6e5155f6bbacbfcf4104b1488b3cee247dabb91 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.2 2009/11/17 23:55:18 marka Exp $ */
-
-controls { /* empty */ };
-
 include "trusted.conf";
 
 options {
        query-source address 10.53.0.4;
        notify-source 10.53.0.4;
        transfer-source 10.53.0.4;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.4; };
        listen-on-v6 { none; };
index 02cc783efa7ca69df254fbae269df92027f1a073..88a051e61d95ff167b4470aaef194c0c5d77688a 100644 (file)
@@ -19,4 +19,9 @@ SYSTEMTESTTOP=..
 
 test -r $RANDFILE || $GENRANDOM 400 $RANDFILE
 
+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
+copy_setports ns4/named.conf.in ns4/named.conf
+
 cd ns1 && $SHELL -e sign.sh
index 7f3418898f2031878be6697b26c45fd7a9cf5b11..74c87cba00634575b1d6b68e07a8715faa848bb5 100644 (file)
@@ -14,8 +14,6 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: tests.sh,v 1.7 2010/01/18 19:19:31 each Exp $
-
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
@@ -23,7 +21,7 @@ SYSTEMTESTTOP=..
 replace_data()
 {
        if [ $# -ne 4 ]; then
-               echo I:unexpected input for replace_data
+               echo_i "unexpected input for replace_data"
                return 1
        fi
 
@@ -33,15 +31,15 @@ replace_data()
        _newdata=$4
 
        _ret=0
-       $NSUPDATE -d <<END>> nsupdate.out.test 2>&1 || _ret=1
-server 10.53.0.2 5300
+       $NSUPDATE -d <<END >> nsupdate.out.test 2>&1 || _ret=1
+server 10.53.0.2 ${PORT}
 update delete ${_dname} 30 ${_rr} ${_olddata}
 update add ${_dname} 30 ${_rr} ${_newdata}
 send
 END
 
        if [ $_ret != 0 ]; then
-               echo I:failed to update the test data
+               echo_i "failed to update the test data"
                return 1
        fi
 
@@ -51,154 +49,154 @@ END
 status=0
 n=0
 
-DIGOPTS="+short +tcp -p 5300"
+DIGOPTS="+short +tcp -p ${PORT}"
 DIGOPTS_CD="$DIGOPTS +cd"
 
-echo I:Priming cache.
+echo_i "Priming cache."
 ret=0
 expect="10 mail.example."
 ans=`$DIG $DIGOPTS_CD @10.53.0.4 hostile MX` || ret=1
 test "$ans" = "$expect" || ret=1
-test $ret = 0 || echo I:failed, got "'""$ans""'", expected "'""$expect""'"
+test $ret = 0 || echo_i "failed, got '$ans', expected '$expect'"
 status=`expr $status + $ret`
 
-echo I:Checking that bogus additional is not returned with +CD.
+echo_i "Checking that bogus additional is not returned with +CD."
 ret=0
 expect="10.0.0.2"
 ans=`$DIG $DIGOPTS_CD @10.53.0.4 mail.example A` || ret=1
 test "$ans" = "$expect" || ret=1
-test $ret = 0 || echo I:failed, got "'""$ans""'", expected "'""$expect""'"
+test $ret = 0 || echo_i "failed, got '$ans', expected '$expect'"
 status=`expr $status + $ret`
 
 #
 # Prime cache with pending additional records.  These should not be promoted
 # to answer.
 #
-echo "I:Priming cache (pending additional A and AAAA)"
+echo_i "Priming cache (pending additional A and AAAA)"
 ret=0
 expect="10 mail.example.com."
 ans=`$DIG $DIGOPTS @10.53.0.4 example.com MX` || ret=1
 test "$ans" = "$expect" || ret=1
-test $ret = 0 || echo I:failed, got "'""$ans""'", expected "'""$expect""'"
+test $ret = 0 || echo_i "failed, got '$ans', expected '$expect'"
 status=`expr $status + $ret`
 
-echo "I:Replacing pending A"
+echo_i "Replacing pending A"
 ret=0
 replace_data mail.example.com. A 192.0.2.2 192.0.2.3 || ret=1
 status=`expr $status + $ret`
 
-echo "I:Replacing pending AAAA"
+echo_i "Replacing pending AAAA"
 ret=0
 replace_data mail.example.com. AAAA 2001:db8::2 2001:db8::3 || ret=1
 status=`expr $status + $ret`
 
-echo "I:Checking updated data to be returned (without CD)"
+echo_i "Checking updated data to be returned (without CD)"
 ret=0
 expect="192.0.2.3"
 ans=`$DIG $DIGOPTS @10.53.0.4 mail.example.com A` || ret=1
 test "$ans" = "$expect" || ret=1
-test $ret = 0 || echo I:failed, got "'""$ans""'", expected "'""$expect""'"
+test $ret = 0 || echo_i "failed, got '$ans', expected '$expect'"
 status=`expr $status + $ret`
 
-echo "I:Checking updated data to be returned (with CD)" 
+echo_i "Checking updated data to be returned (with CD)"
 ret=0
 expect="2001:db8::3"
 ans=`$DIG $DIGOPTS_CD @10.53.0.4 mail.example.com AAAA` || ret=1
 test "$ans" = "$expect" || ret=1
-test $ret = 0 || echo I:failed, got "'""$ans""'", expected "'""$expect""'"
+test $ret = 0 || echo_i "failed, got '$ans', expected '$expect'"
 status=`expr $status + $ret`
 
 #
 # Prime cache with a pending answer record.  It can be returned (without
 # validation) with +CD.
 #
-echo "I:Priming cache (pending answer)"
+echo_i "Priming cache (pending answer)"
 ret=0
 expect="192.0.2.2"
 ans=`$DIG $DIGOPTS_CD @10.53.0.4 pending-ok.example.com A` || ret=1
 test "$ans" = "$expect" || ret=1
-test $ret = 0 || echo I:failed, got "'""$ans""'", expected "'""$expect""'"
+test $ret = 0 || echo_i "failed, got '$ans', expected '$expect'"
 status=`expr $status + $ret`
 
-echo I:Replacing pending data
+echo_i "Replacing pending data"
 ret=0
 replace_data pending-ok.example.com. A 192.0.2.2 192.0.2.3 || ret=1
 status=`expr $status + $ret`
 
-echo I:Confirming cached pending data to be returned with CD
+echo_i "Confirming cached pending data to be returned with CD"
 ret=0
 expect="192.0.2.2"
 ans=`$DIG $DIGOPTS_CD @10.53.0.4 pending-ok.example.com A` || ret=1
 test "$ans" = "$expect" || ret=1
-test $ret = 0 || echo I:failed, got "'""$ans""'", expected "'""$expect""'"
+test $ret = 0 || echo_i "failed, got '$ans', expected '$expect'"
 status=`expr $status + $ret`
 
 #
 # Prime cache with a pending answer record.  It should not be returned
 # to no-DNSSEC clients.
 #
-echo "I:Priming cache (pending answer)"
+echo_i "Priming cache (pending answer)"
 ret=0
 expect="192.0.2.102"
 ans=`$DIG $DIGOPTS_CD @10.53.0.4 pending-ng.example.com A` || ret=1
 test "$ans" = "$expect" || ret=1
-test $ret = 0 || echo I:failed, got "'""$ans""'", expected "'""$expect""'"
+test $ret = 0 || echo_i "failed, got '$ans', expected '$expect'"
 status=`expr $status + $ret`
 
-echo I:Replacing pending data
+echo_i "Replacing pending data"
 ret=0
 replace_data pending-ng.example.com. A 192.0.2.102 192.0.2.103 || ret=1
 status=`expr $status + $ret`
 
-echo I:Confirming updated data returned, not the cached one, without CD
+echo_i "Confirming updated data returned, not the cached one, without CD"
 ret=0
 expect="192.0.2.103"
 ans=`$DIG $DIGOPTS @10.53.0.4 pending-ng.example.com A` || ret=1
 test "$ans" = "$expect" || ret=1
-test $ret = 0 || echo I:failed, got "'""$ans""'", expected "'""$expect""'"
+test $ret = 0 || echo_i "failed, got '$ans', expected '$expect'"
 status=`expr $status + $ret`
 
 #
 # Try to fool the resolver with an out-of-bailiwick CNAME
 #
-echo I:Trying to Prime out-of-bailiwick pending answer with CD
+echo_i "Trying to Prime out-of-bailiwick pending answer with CD"
 ret=0
 expect="10.10.10.10"
 ans=`$DIG $DIGOPTS_CD @10.53.0.4 bad.example. A` || ret=1
 ans=`echo $ans | awk '{print $NF}'`
 test "$ans" = "$expect" || ret=1
-test $ret = 0 || echo I:failed, got "'""$ans""'", expected "'""$expect""'"
+test $ret = 0 || echo_i "failed, got '$ans', expected '$expect'"
 status=`expr $status + $ret`
 
-echo I:Confirming the out-of-bailiwick answer is not cached or reused with CD
+echo_i "Confirming the out-of-bailiwick answer is not cached or reused with CD"
 ret=0
 expect="10.10.10.10"
 ans=`$DIG $DIGOPTS_CD @10.53.0.4 nice.good. A` || ret=1
 ans=`echo $ans | awk '{print $NF}'`
 test "$ans" = "$expect" || ret=1
-test $ret = 0 || echo I:failed, got "'""$ans""'", expected "'""$expect""'"
+test $ret = 0 || echo_i "failed, got '$ans', expected '$expect'"
 status=`expr $status + $ret`
 
 #
 # Make sure the resolver doesn't cache bogus NXDOMAIN
 #
-echo I:Trying to Prime bogus NXDOMAIN
+echo_i "Trying to Prime bogus NXDOMAIN"
 ret=0
 expect="SERVFAIL"
-ans=`$DIG +tcp -p 5300 @10.53.0.4 removed.example.com. A` || ret=1
+ans=`$DIG +tcp -p ${PORT} @10.53.0.4 removed.example.com. A` || ret=1
 ans=`echo $ans | sed 's/^.*status: \([A-Z][A-Z]*\).*$/\1/'`
 test "$ans" = "$expect" || ret=1
-test $ret = 0 || echo I:failed, got "'""$ans""'", expected "'""$expect""'"
+test $ret = 0 || echo_i "failed, got '$ans', expected '$expect'"
 status=`expr $status + $ret`
 
-echo I:Confirming the bogus NXDOMAIN was not cached
+echo_i "Confirming the bogus NXDOMAIN was not cached"
 ret=0
 expect="SERVFAIL"
-ans=`$DIG +tcp -p 5300 @10.53.0.4 removed.example.com. A` || ret=1
+ans=`$DIG +tcp -p ${PORT} @10.53.0.4 removed.example.com. A` || ret=1
 ans=`echo $ans | sed 's/^.*status: \([A-Z][A-Z]*\).*$/\1/'`
 test "$ans" = "$expect" || ret=1
-test $ret = 0 || echo I:failed, got "'""$ans""'", expected "'""$expect""'"
+test $ret = 0 || echo_i "failed, got '$ans', expected '$expect'"
 status=`expr $status + $ret`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index f231fac55ceec71829839dbab68c764c62914fbf..a02b4ed65b82a0b4ba157ffe6a812c5c06b92587 100644 (file)
@@ -27,8 +27,11 @@ my $no_more_waiting = 0;
 my @delayed_response;
 my $timeout;
 
+my $localport = int($ENV{'PORT'});
+if (!$localport) { $localport = 5300; }
+
 my $udpsock = IO::Socket::INET->new(LocalAddr => "$localaddr",
-   LocalPort => 5300, Proto => "udp", Reuse => 1) or die "$!";
+   LocalPort => $localport, Proto => "udp", Reuse => 1) or die "$!";
 
 my $pidf = new IO::File "ans.pid", "w" or die "cannot open pid file: $!";
 print $pidf "$$\n" or die "cannot write pid file: $!";
index 99c2e5bb34396cd386f45e6b7fe6d80df1acc4af..a7495cbed66c5bbe3fac6a751daa3e2ec5430baa 100644 (file)
@@ -32,7 +32,8 @@ $SIG{TERM} = \&rmpid;
 my $count = 0;
 
 my $localaddr = "10.53.0.7";
-my $localport = 5300;
+my $localport = int($ENV{'PORT'});
+if (!$localport) { $localport = 5300; }
 my $verbose = 0;
 
 sub reply_handler {
index 6539e7eadd3c8b0d954cbe03dd8c8b4eaa6c01a9..05176bbd00890cabce48315b4d931df71f6d0a7f 100644 (file)
@@ -19,4 +19,4 @@ rm -f ans?/ans.run
 rm -f ans2/ans.limit
 rm -f ns?/named.memstats
 rm -f ns?/named.run
-rm -f ns3/named.conf
+rm -f ns*/named.conf
similarity index 96%
rename from bin/tests/system/reclimit/ns1/named.conf
rename to bin/tests/system/reclimit/ns1/named.conf.in
index 5e1c947d10278739328a0673a9c085fb1a9a9af0..ae5b9f6a88cf1f29f0da45010d8b4ea9b62f0407 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-controls { /* empty */ };
-
 options {
        directory ".";
        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 91%
rename from bin/tests/system/reclimit/ns3/named1.conf
rename to bin/tests/system/reclimit/ns3/named1.conf.in
index f62742d1232abdcb5ee28c83952391583190c53e..36bbd4d24e1b82170d556781340b01f0e3bcd60f 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-controls { /* empty */ };
-
 options {
        directory ".";
        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; };
@@ -34,7 +32,7 @@ key rndc_key {
 };
 
 controls {
-       inet 10.53.0.3 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.3 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 zone "." { type hint; file "hints.db"; };
similarity index 91%
rename from bin/tests/system/reclimit/ns3/named2.conf
rename to bin/tests/system/reclimit/ns3/named2.conf.in
index 0ea4dcc42030cf20c5fad35cef3f6c9163a4ad30..5704ed918b7c811eb54972f860431c96a455c5a1 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-controls { /* empty */ };
-
 options {
        directory ".";
        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; };
@@ -34,7 +32,7 @@ key rndc_key {
 };
 
 controls {
-       inet 10.53.0.3 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.3 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 zone "." { type hint; file "hints.db"; };
similarity index 91%
rename from bin/tests/system/reclimit/ns3/named3.conf
rename to bin/tests/system/reclimit/ns3/named3.conf.in
index 2267699424a8fc9723391f697106ff87244ca4f8..64fcf357bc7da70fbaf762dc444565e07d731769 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-controls { /* empty */ };
-
 options {
        directory ".";
        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; };
@@ -34,7 +32,7 @@ key rndc_key {
 };
 
 controls {
-       inet 10.53.0.3 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.3 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 zone "." { type hint; file "hints.db"; };
similarity index 92%
rename from bin/tests/system/reclimit/ns3/named4.conf
rename to bin/tests/system/reclimit/ns3/named4.conf.in
index f82e1b2353d52961e2184ae506bc8809f40f69a5..8591cab836b570f7b2930b8e5ed83b414a038f36 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-controls { /* empty */ };
-
 options {
        directory ".";
        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; };
@@ -35,7 +33,7 @@ key rndc_key {
 };
 
 controls {
-       inet 10.53.0.3 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.3 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 zone "." { type hint; file "hints.db"; };
index a5ac506492da792ceb085543bd2f3fd49afc91da..be7657d6d26a33544053b512594f11354dd95204 100644 (file)
@@ -23,11 +23,11 @@ then
     then
         :
     else
-        echo "I:Net::DNS versions up to 0.78 have a bug that causes this test to fail: please update." >&2
+        echo_i "Net::DNS versions up to 0.78 have a bug that causes this test to fail: please update." >&2
         exit 1
     fi
 else
-    echo "I:This test requires the Net::DNS library." >&2
+    echo_i "This test requires the Net::DNS library." >&2
     exit 1
 fi
 
@@ -35,6 +35,6 @@ if $PERL -e 'use Net::DNS::Nameserver;' 2>/dev/null
 then
     :
 else
-    echo "I:This test requires the Net::DNS::Nameserver library." >&2
+    echo_i "This test requires the Net::DNS::Nameserver library." >&2
     exit 1
 fi
index f4adda21239ed6fe7d8667cc821f63885324d048..42280a2d59f07462e1150c438c1d7e108d7b73d3 100644 (file)
@@ -17,4 +17,6 @@
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
-cp -f ns3/named1.conf ns3/named.conf
+$SHELL clean.sh
+copy_setports ns1/named.conf.in ns1/named.conf
+copy_setports ns3/named1.conf.in ns3/named.conf
index 35fe725de8cd88a9987af1dfea4c16627fcd8826..bc8f36e3f4ca5d8044f00f8d8a9f25de4d2d429d 100644 (file)
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
-DIGOPTS="-p 5300"
+DIGOPTS="-p ${PORT}"
 
 status=0
 n=0
 
 ns3_reset() {
-       cp $1 ns3/named.conf
-       $RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 reconfig 2>&1 | sed 's/^/I:ns3 /'
-       $RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 flush | sed 's/^/I: ns3 /'
+       copy_setports $1 ns3/named.conf
+       $RNDC -c ../common/rndc.conf -s 10.53.0.3 -p ${CONTROLPORT} reconfig 2>&1 | sed 's/^/I:ns3 /'
+       $RNDC -c ../common/rndc.conf -s 10.53.0.3 -p ${CONTROLPORT} flush | sed 's/^/I:ns3 /'
 }
 
 ns3_sends_aaaa_queries() {
@@ -53,15 +53,15 @@ check_query_count() {
        fi
 
        if [ $count -ne $expected_count ]; then
-               echo "I: count ($count) != $expected_count"
+               echo_i "count ($count) != $expected_count"
                ret=1
        fi
 }
 
-echo "I: set max-recursion-depth=12"
+echo_i "set max-recursion-depth=12"
 
 n=`expr $n + 1`
-echo "I:  attempt excessive-depth lookup ($n)"
+echo_i "attempt excessive-depth lookup ($n)"
 ret=0
 echo "1000" > ans2/ans.limit
 $DIG $DIGOPTS @10.53.0.2 reset > /dev/null || ret=1
@@ -69,57 +69,57 @@ $DIG $DIGOPTS @10.53.0.3 indirect1.example.org > dig.out.1.test$n || ret=1
 grep "status: SERVFAIL" dig.out.1.test$n > /dev/null || ret=1
 $DIG $DIGOPTS +short @10.53.0.2 count txt > dig.out.2.test$n || ret=1
 check_query_count dig.out.2.test$n 26 14
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:  attempt permissible lookup ($n)"
+echo_i "attempt permissible lookup ($n)"
 ret=0
 echo "12" > ans2/ans.limit
-ns3_reset ns3/named1.conf
+ns3_reset ns3/named1.conf.in
 $DIG $DIGOPTS @10.53.0.2 reset > /dev/null || ret=1
 $DIG $DIGOPTS @10.53.0.3 indirect2.example.org > dig.out.1.test$n || ret=1
 grep "status: NOERROR" dig.out.1.test$n > /dev/null || ret=1
 $DIG $DIGOPTS +short @10.53.0.2 count txt > dig.out.2.test$n || ret=1
 check_query_count dig.out.2.test$n 49 26
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: set max-recursion-depth=5"
+echo_i "set max-recursion-depth=5"
 
 n=`expr $n + 1`
-echo "I:  attempt excessive-depth lookup ($n)"
+echo_i "attempt excessive-depth lookup ($n)"
 ret=0
 echo "12" > ans2/ans.limit
-ns3_reset ns3/named2.conf
+ns3_reset ns3/named2.conf.in
 $DIG $DIGOPTS @10.53.0.2 reset > /dev/null || ret=1
 $DIG $DIGOPTS @10.53.0.3 indirect3.example.org > dig.out.1.test$n || ret=1
 grep "status: SERVFAIL" dig.out.1.test$n > /dev/null || ret=1
 $DIG $DIGOPTS +short @10.53.0.2 count txt > dig.out.2.test$n || ret=1
 check_query_count dig.out.2.test$n 12 7
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:  attempt permissible lookup ($n)"
+echo_i "attempt permissible lookup ($n)"
 ret=0
 echo "5" > ans2/ans.limit
-ns3_reset ns3/named2.conf
+ns3_reset ns3/named2.conf.in
 $DIG $DIGOPTS @10.53.0.2 reset > /dev/null || ret=1
 $DIG $DIGOPTS @10.53.0.3 indirect4.example.org > dig.out.1.test$n || ret=1
 grep "status: NOERROR" dig.out.1.test$n > /dev/null || ret=1
 $DIG $DIGOPTS +short @10.53.0.2 count txt > dig.out.2.test$n || ret=1
 check_query_count dig.out.2.test$n 21 12
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: set max-recursion-depth=100, max-recursion-queries=50"
+echo_i "set max-recursion-depth=100, max-recursion-queries=50"
 
 n=`expr $n + 1`
-echo "I:  attempt excessive-queries lookup ($n)"
+echo_i "attempt excessive-queries lookup ($n)"
 ret=0
 echo "13" > ans2/ans.limit
-ns3_reset ns3/named3.conf
+ns3_reset ns3/named3.conf.in
 $DIG $DIGOPTS @10.53.0.2 reset > /dev/null || ret=1
 $DIG $DIGOPTS @10.53.0.3 indirect5.example.org > dig.out.1.test$n || ret=1
 if ns3_sends_aaaa_queries; then
@@ -128,30 +128,30 @@ fi
 $DIG $DIGOPTS +short @10.53.0.2 count txt > dig.out.2.test$n || ret=1
 eval count=`cat dig.out.2.test$n`
 [ $count -le 50 ] || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:  attempt permissible lookup ($n)"
+echo_i "attempt permissible lookup ($n)"
 ret=0
 echo "12" > ans2/ans.limit
-ns3_reset ns3/named3.conf
+ns3_reset ns3/named3.conf.in
 $DIG $DIGOPTS @10.53.0.2 reset > /dev/null || ret=1
 $DIG $DIGOPTS @10.53.0.3 indirect6.example.org > dig.out.1.test$n || ret=1
 grep "status: NOERROR" dig.out.1.test$n > /dev/null || ret=1
 $DIG $DIGOPTS +short @10.53.0.2 count txt > dig.out.2.test$n || ret=1
 eval count=`cat dig.out.2.test$n`
 [ $count -le 50 ] || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: set max-recursion-depth=100, max-recursion-queries=40"
+echo_i "set max-recursion-depth=100, max-recursion-queries=40"
 
 n=`expr $n + 1`
-echo "I:  attempt excessive-queries lookup ($n)"
+echo_i "attempt excessive-queries lookup ($n)"
 ret=0
 echo "10" > ans2/ans.limit
-ns3_reset ns3/named4.conf
+ns3_reset ns3/named4.conf.in
 $DIG $DIGOPTS @10.53.0.2 reset > /dev/null || ret=1
 $DIG $DIGOPTS @10.53.0.3 indirect7.example.org > dig.out.1.test$n || ret=1
 if ns3_sends_aaaa_queries; then
@@ -160,27 +160,27 @@ fi
 $DIG $DIGOPTS +short @10.53.0.2 count txt > dig.out.2.test$n || ret=1
 eval count=`cat dig.out.2.test$n`
 [ $count -le 40 ] || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:  attempt permissible lookup ($n)"
+echo_i "attempt permissible lookup ($n)"
 ret=0
 echo "9" > ans2/ans.limit
-ns3_reset ns3/named4.conf
+ns3_reset ns3/named4.conf.in
 $DIG $DIGOPTS @10.53.0.2 reset > /dev/null || ret=1
 $DIG $DIGOPTS @10.53.0.3 indirect8.example.org > dig.out.1.test$n || ret=1
 grep "status: NOERROR" dig.out.1.test$n > /dev/null || ret=1
 $DIG $DIGOPTS +short @10.53.0.2 count txt > dig.out.2.test$n || ret=1
 eval count=`cat dig.out.2.test$n`
 [ $count -le 40 ] || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: attempting NS explosion ($n)"
+echo_i "attempting NS explosion ($n)"
 ret=0
-ns3_reset ns3/named4.conf
+ns3_reset ns3/named4.conf.in
 $DIG $DIGOPTS @10.53.0.2 reset > /dev/null || ret=1
 $DIG $DIGOPTS +short @10.53.0.3 ns1.1.example.net > dig.out.1.test$n || ret=1
 $DIG $DIGOPTS +short @10.53.0.2 count txt > dig.out.2.test$n || ret=1
@@ -189,8 +189,8 @@ eval count=`cat dig.out.2.test$n`
 $DIG $DIGOPTS +short @10.53.0.7 count txt > dig.out.3.test$n || ret=1
 eval count=`cat dig.out.3.test$n`
 [ $count -lt 50 ] || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index a5c229b453952bb9467742e1d15bc53234245134..2bc5c5d482374df867d8fe0f7a11e6c544f681e3 100644 (file)
@@ -19,6 +19,7 @@ rm -f ns1/signed.db*
 rm -f ns1/nsec3.db*
 rm -f ns1/dsset-signed.
 rm -f ns1/dsset-nsec3.
+rm -f */named.conf
 rm -f */named.memstats
 rm -f */named.run
 rm -f */named.stats
similarity index 93%
rename from bin/tests/system/redirect/ns1/named.conf
rename to bin/tests/system/redirect/ns1/named.conf.in
index aae51a93466869bab7b7dc0b090ae8901d1883bf..31803140bf4938869b65edf4afe4e4aee48eef25 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.3 2011/03/01 23:48:06 tbox Exp $ */
-
 // NS1
 
-controls { /* empty */ };
-
 acl rfc1918 { 10/8; 192.168/16; 172.16/12; };
 
 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 91%
rename from bin/tests/system/redirect/ns2/named.conf
rename to bin/tests/system/redirect/ns2/named.conf.in
index 0e2fed17e3a23dadac1623e7e06fb6dc20ce79f6..10d8af6cfbdde518a28d3b064474ff68d6db58b0 100644 (file)
@@ -14,8 +14,6 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.3 2011/03/01 23:48:07 tbox Exp $ */
-
 // NS2
 
 controls { /* empty */ };
@@ -26,7 +24,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; };
@@ -43,7 +41,7 @@ key rndc_key {
 };
 
 controls {
-       inet 10.53.0.2 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.2 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 zone "." {
index 9fecc9ad811a0e0eca06b5f33ac02a584cecb9fc..d6731e53d71d975f416fcc949789078a4ea922c2 100644 (file)
@@ -21,6 +21,11 @@ $SHELL clean.sh
 
 test -r $RANDFILE || $GENRANDOM 400 $RANDFILE
 
+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
+copy_setports ns4/named.conf.in ns4/named.conf
+
 cp ns2/redirect.db.in ns2/redirect.db
 cp ns2/example.db.in ns2/example.db
 cd ns1 && $SHELL sign.sh
index ea904194caa01e41894fc223b03173abd21e0df3..ac91c1f935ce22560cbd674a63fa9ddf2491cb67 100644 (file)
@@ -14,8 +14,6 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: tests.sh,v 1.3 2011/03/01 23:48:06 tbox Exp $
-
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
@@ -24,161 +22,162 @@ n=1
 
 rm -f dig.out.*
 
-DIGOPTS="+tcp +noadd +nosea +nostat +nocmd -p 5300"
+DIGOPTS="+tcp +noadd +nosea +nostat +nocmd -p ${PORT}"
+RNDCCMD="$RNDC -c $SYSTEMTESTTOP/common/rndc.conf -p ${CONTROLPORT} -s"
 
 for conf in conf/good*.conf
 do
-        echo "I:checking that $conf is accepted ($n)"
+        echo_i "checking that $conf is accepted ($n)"
         ret=0
         $CHECKCONF "$conf" || ret=1
         n=`expr $n + 1`
-        if [ $ret != 0 ]; then echo "I:failed"; fi
+        if [ $ret != 0 ]; then echo_i "failed"; fi
         status=`expr $status + $ret`
 done
 
 for conf in conf/bad*.conf
 do
-        echo "I:checking that $conf is rejected ($n)"
+        echo_i "checking that $conf is rejected ($n)"
         ret=0
         $CHECKCONF "$conf" >/dev/null && ret=1
        n=`expr $n + 1`
-        if [ $ret != 0 ]; then echo "I:failed"; fi
+        if [ $ret != 0 ]; then echo_i "failed"; fi
         status=`expr $status + $ret`
 done
 
-echo "I:checking A redirect works for nonexist ($n)"
+echo_i "checking A redirect works for nonexist ($n)"
 ret=0
 $DIG $DIGOPTS nonexist. @10.53.0.2 -b 10.53.0.2 a > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "100.100.100.1" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking AAAA redirect works for nonexist ($n)"
+echo_i "checking AAAA redirect works for nonexist ($n)"
 ret=0
 $DIG $DIGOPTS nonexist. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001:ffff:ffff::6464:6401" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking ANY redirect works for nonexist ($n)"
+echo_i "checking ANY redirect works for nonexist ($n)"
 ret=0
 $DIG $DIGOPTS nonexist. @10.53.0.2 -b 10.53.0.2 any > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "100.100.100.1" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001:ffff:ffff::6464:6401" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking A redirect doesn't work for acl miss ($n)"
+echo_i "checking A redirect doesn't work for acl miss ($n)"
 ret=0
 $DIG $DIGOPTS nonexist. @10.53.0.2 -b 10.53.0.4 a > dig.out.ns2.test$n || ret=1
 grep "status: NXDOMAIN" dig.out.ns2.test$n > /dev/null || ret=1
 grep "100.100.100.1" dig.out.ns2.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking AAAA redirect doesn't work for acl miss ($n)"
+echo_i "checking AAAA redirect doesn't work for acl miss ($n)"
 ret=0
 $DIG $DIGOPTS nonexist. @10.53.0.2 -b 10.53.0.4 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NXDOMAIN" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001:ffff:ffff::6464:6401" dig.out.ns2.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking ANY redirect doesn't work for acl miss ($n)"
+echo_i "checking ANY redirect doesn't work for acl miss ($n)"
 ret=0
 $DIG $DIGOPTS nonexist. @10.53.0.2 -b 10.53.0.4 any > dig.out.ns2.test$n || ret=1
 grep "status: NXDOMAIN" dig.out.ns2.test$n > /dev/null || ret=1
 grep "100.100.100.1" dig.out.ns2.test$n > /dev/null && ret=1
 grep "2001:ffff:ffff::6464:6401" dig.out.ns2.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking A redirect works for signed nonexist, DO=0 ($n)"
+echo_i "checking A redirect works for signed nonexist, DO=0 ($n)"
 ret=0
 $DIG $DIGOPTS nonexist.signed. @10.53.0.2 -b 10.53.0.2 a > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "100.100.100.1" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking AAAA redirect works for signed nonexist, DO=0 ($n)"
+echo_i "checking AAAA redirect works for signed nonexist, DO=0 ($n)"
 ret=0
 $DIG $DIGOPTS nonexist.signed. @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001:ffff:ffff::6464:6401" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking ANY redirect works for signed nonexist, DO=0 ($n)"
+echo_i "checking ANY redirect works for signed nonexist, DO=0 ($n)"
 ret=0
 $DIG $DIGOPTS nonexist.signed. @10.53.0.2 -b 10.53.0.2 any > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 grep "100.100.100.1" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001:ffff:ffff::6464:6401" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking A redirect fails for signed nonexist, DO=1 ($n)"
+echo_i "checking A redirect fails for signed nonexist, DO=1 ($n)"
 ret=0
 $DIG $DIGOPTS nonexist.signed. +dnssec @10.53.0.2 -b 10.53.0.2 a > dig.out.ns2.test$n || ret=1
 grep "status: NXDOMAIN" dig.out.ns2.test$n > /dev/null || ret=1
 grep "100.100.100.1" dig.out.ns2.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking AAAA redirect fails for signed nonexist, DO=1 ($n)"
+echo_i "checking AAAA redirect fails for signed nonexist, DO=1 ($n)"
 ret=0
 $DIG $DIGOPTS nonexist.signed. +dnssec @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NXDOMAIN" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001:ffff:ffff::6464:6401" dig.out.ns2.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking ANY redirect fails for signed nonexist, DO=1 ($n)"
+echo_i "checking ANY redirect fails for signed nonexist, DO=1 ($n)"
 ret=0
 $DIG $DIGOPTS nonexist.signed. +dnssec @10.53.0.2 -b 10.53.0.2 any > dig.out.ns2.test$n || ret=1
 grep "status: NXDOMAIN" dig.out.ns2.test$n > /dev/null || ret=1
 grep "100.100.100.1" dig.out.ns2.test$n > /dev/null && ret=1
 grep "2001:ffff:ffff::6464:6401" dig.out.ns2.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking A redirect fails for nsec3 signed nonexist, DO=1 ($n)"
+echo_i "checking A redirect fails for nsec3 signed nonexist, DO=1 ($n)"
 ret=0
 $DIG $DIGOPTS nonexist.nsec3. +dnssec @10.53.0.2 -b 10.53.0.2 a > dig.out.ns2.test$n || ret=1
 grep "status: NXDOMAIN" dig.out.ns2.test$n > /dev/null || ret=1
 grep "100.100.100.1" dig.out.ns2.test$n > /dev/null && ret=1
 grep "IN.NSEC3" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking AAAA redirect fails for nsec3 signed nonexist, DO=1 ($n)"
+echo_i "checking AAAA redirect fails for nsec3 signed nonexist, DO=1 ($n)"
 ret=0
 $DIG $DIGOPTS nonexist.nsec3. +dnssec @10.53.0.2 -b 10.53.0.2 aaaa > dig.out.ns2.test$n || ret=1
 grep "status: NXDOMAIN" dig.out.ns2.test$n > /dev/null || ret=1
 grep "2001:ffff:ffff::6464:6401" dig.out.ns2.test$n > /dev/null && ret=1
 grep "IN.NSEC3" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking ANY redirect fails for nsec3 signed nonexist, DO=1 ($n)"
+echo_i "checking ANY redirect fails for nsec3 signed nonexist, DO=1 ($n)"
 ret=0
 $DIG $DIGOPTS nonexist.nsec3. +dnssec @10.53.0.2 -b 10.53.0.2 any > dig.out.ns2.test$n || ret=1
 grep "status: NXDOMAIN" dig.out.ns2.test$n > /dev/null || ret=1
@@ -186,142 +185,142 @@ grep "100.100.100.1" dig.out.ns2.test$n > /dev/null && ret=1
 grep "2001:ffff:ffff::6464:6401" dig.out.ns2.test$n > /dev/null && ret=1
 grep "IN.NSEC3" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking A redirect works for nonexist authoritative ($n)"
+echo_i "checking A redirect works for nonexist authoritative ($n)"
 ret=0
 $DIG $DIGOPTS nonexist. @10.53.0.1 -b 10.53.0.1 a > dig.out.ns1.test$n || ret=1
 grep "status: NOERROR" dig.out.ns1.test$n > /dev/null || ret=1
 grep "100.100.100.2" dig.out.ns1.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking AAAA redirect works for nonexist authoritative ($n)"
+echo_i "checking AAAA redirect works for nonexist authoritative ($n)"
 ret=0
 $DIG $DIGOPTS nonexist. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns1.test$n || ret=1
 grep "status: NOERROR" dig.out.ns1.test$n > /dev/null || ret=1
 grep "2001:ffff:ffff::6464:6402" dig.out.ns1.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking ANY redirect works for nonexist authoritative ($n)"
+echo_i "checking ANY redirect works for nonexist authoritative ($n)"
 ret=0
 $DIG $DIGOPTS nonexist. @10.53.0.1 -b 10.53.0.1 any > dig.out.ns1.test$n || ret=1
 grep "status: NOERROR" dig.out.ns1.test$n > /dev/null || ret=1
 grep "100.100.100.2" dig.out.ns1.test$n > /dev/null || ret=1
 grep "2001:ffff:ffff::6464:6402" dig.out.ns1.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking A redirect doesn't work for acl miss authoritative ($n)"
+echo_i "checking A redirect doesn't work for acl miss authoritative ($n)"
 ret=0
 $DIG $DIGOPTS nonexist. @10.53.0.1 -b 10.53.0.4 a > dig.out.ns1.test$n || ret=1
 grep "status: NXDOMAIN" dig.out.ns1.test$n > /dev/null || ret=1
 grep "100.100.100.2" dig.out.ns1.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking AAAA redirect doesn't work for acl miss authoritative ($n)"
+echo_i "checking AAAA redirect doesn't work for acl miss authoritative ($n)"
 ret=0
 $DIG $DIGOPTS nonexist. @10.53.0.1 -b 10.53.0.4 aaaa > dig.out.ns1.test$n || ret=1
 grep "status: NXDOMAIN" dig.out.ns1.test$n > /dev/null || ret=1
 grep "2001:ffff:ffff::6464:6402" dig.out.ns1.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking ANY redirect doesn't work for acl miss authoritative ($n)"
+echo_i "checking ANY redirect doesn't work for acl miss authoritative ($n)"
 ret=0
 $DIG $DIGOPTS nonexist. @10.53.0.1 -b 10.53.0.4 any > dig.out.ns1.test$n || ret=1
 grep "status: NXDOMAIN" dig.out.ns1.test$n > /dev/null || ret=1
 grep "100.100.100.2" dig.out.ns1.test$n > /dev/null && ret=1
 grep "2001:ffff:ffff::6464:6402" dig.out.ns1.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking A redirect works for signed nonexist, DO=0 authoritative ($n)"
+echo_i "checking A redirect works for signed nonexist, DO=0 authoritative ($n)"
 ret=0
 $DIG $DIGOPTS nonexist.signed. @10.53.0.1 -b 10.53.0.1 a > dig.out.ns1.test$n || ret=1
 grep "status: NOERROR" dig.out.ns1.test$n > /dev/null || ret=1
 grep "100.100.100.2" dig.out.ns1.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking AAAA redirect works for signed nonexist, DO=0 authoritative ($n)"
+echo_i "checking AAAA redirect works for signed nonexist, DO=0 authoritative ($n)"
 ret=0
 $DIG $DIGOPTS nonexist.signed. @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns1.test$n || ret=1
 grep "status: NOERROR" dig.out.ns1.test$n > /dev/null || ret=1
 grep "2001:ffff:ffff::6464:6402" dig.out.ns1.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking ANY redirect works for signed nonexist, DO=0 authoritative ($n)"
+echo_i "checking ANY redirect works for signed nonexist, DO=0 authoritative ($n)"
 ret=0
 $DIG $DIGOPTS nonexist.signed. @10.53.0.1 -b 10.53.0.1 any > dig.out.ns1.test$n || ret=1
 grep "status: NOERROR" dig.out.ns1.test$n > /dev/null || ret=1
 grep "100.100.100.2" dig.out.ns1.test$n > /dev/null || ret=1
 grep "2001:ffff:ffff::6464:6402" dig.out.ns1.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking A redirect fails for signed nonexist, DO=1 authoritative ($n)"
+echo_i "checking A redirect fails for signed nonexist, DO=1 authoritative ($n)"
 ret=0
 $DIG $DIGOPTS nonexist.signed. +dnssec @10.53.0.1 -b 10.53.0.1 a > dig.out.ns1.test$n || ret=1
 grep "status: NXDOMAIN" dig.out.ns1.test$n > /dev/null || ret=1
 grep "100.100.100.2" dig.out.ns1.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking AAAA redirect fails for signed nonexist, DO=1 authoritative ($n)"
+echo_i "checking AAAA redirect fails for signed nonexist, DO=1 authoritative ($n)"
 ret=0
 $DIG $DIGOPTS nonexist.signed. +dnssec @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns1.test$n || ret=1
 grep "status: NXDOMAIN" dig.out.ns1.test$n > /dev/null || ret=1
 grep "2001:ffff:ffff::6464:6402" dig.out.ns1.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking ANY redirect fails for signed nonexist, DO=1 authoritative ($n)"
+echo_i "checking ANY redirect fails for signed nonexist, DO=1 authoritative ($n)"
 ret=0
 $DIG $DIGOPTS nonexist.signed. +dnssec @10.53.0.1 -b 10.53.0.1 any > dig.out.ns1.test$n || ret=1
 grep "status: NXDOMAIN" dig.out.ns1.test$n > /dev/null || ret=1
 grep "100.100.100.2" dig.out.ns1.test$n > /dev/null && ret=1
 grep "2001:ffff:ffff::6464:6402" dig.out.ns1.test$n > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking A redirect fails for nsec3 signed nonexist, DO=1 authoritative ($n)"
+echo_i "checking A redirect fails for nsec3 signed nonexist, DO=1 authoritative ($n)"
 ret=0
 $DIG $DIGOPTS nonexist.nsec3. +dnssec @10.53.0.1 -b 10.53.0.1 a > dig.out.ns1.test$n || ret=1
 grep "status: NXDOMAIN" dig.out.ns1.test$n > /dev/null || ret=1
 grep "100.100.100.2" dig.out.ns1.test$n > /dev/null && ret=1
 grep "IN.NSEC3" dig.out.ns1.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking AAAA redirect fails for nsec3 signed nonexist, DO=1 authoritative ($n)"
+echo_i "checking AAAA redirect fails for nsec3 signed nonexist, DO=1 authoritative ($n)"
 ret=0
 $DIG $DIGOPTS nonexist.nsec3. +dnssec @10.53.0.1 -b 10.53.0.1 aaaa > dig.out.ns1.test$n || ret=1
 grep "status: NXDOMAIN" dig.out.ns1.test$n > /dev/null || ret=1
 grep "2001:ffff:ffff::6464:6402" dig.out.ns1.test$n > /dev/null && ret=1
 grep "IN.NSEC3" dig.out.ns1.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking ANY redirect fails for nsec3 signed nonexist, DO=1 authoritative ($n)"
+echo_i "checking ANY redirect fails for nsec3 signed nonexist, DO=1 authoritative ($n)"
 ret=0
 $DIG $DIGOPTS nonexist.nsec3. +dnssec @10.53.0.1 -b 10.53.0.1 any > dig.out.ns1.test$n || ret=1
 grep "status: NXDOMAIN" dig.out.ns1.test$n > /dev/null || ret=1
@@ -329,24 +328,24 @@ grep "100.100.100.2" dig.out.ns1.test$n > /dev/null && ret=1
 grep "2001:ffff:ffff::6464:6402" dig.out.ns1.test$n > /dev/null && ret=1
 grep "IN.NSEC3" dig.out.ns1.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking redirect works (with noerror) when qtype is not found ($n)"
+echo_i "checking redirect works (with noerror) when qtype is not found ($n)"
 ret=0
 $DIG $DIGOPTS nonexist. @10.53.0.2 -b 10.53.0.2 txt > dig.out.ns2.test$n || ret=1
 grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that redirect zones reload correctly"
+echo_i "checking that redirect zones reload correctly"
 ret=0
 sleep 1 # ensure file mtime will have changed
 sed -e 's/0 0 0 0 0/1 0 0 0 0/' < ns2/example.db.in > ns2/example.db
 sed -e 's/0 0 0 0 0/1 0 0 0 0/' -e 's/\.1$/.2/' < ns2/redirect.db.in > ns2/redirect.db
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload > rndc.out || ret=1
-sed 's/^/I:ns2 /' rndc.out
+$RNDCCMD 10.53.0.2 reload > rndc.out || ret=1
+sed 's/^/ns2 /' rndc.out | cat_i
 for i in 1 2 3 4 5 6 7 8 9; do
     tmp=0
     $DIG $DIGOPTS +short @10.53.0.2 soa example.nil > dig.out.ns1.test$n || tmp=1
@@ -360,8 +359,8 @@ for i in 1 2 3 4 5 6 7 8 9; do
 done
 [ $tmp -eq 1 ] && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index 9944ccabebc494db2f418c2eabeeb21c4a15d9a1..778a9227c3bc23cc23cb6ff51de15b7c7c720441 100644 (file)
@@ -15,8 +15,6 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: ans.pl,v 1.15 2010/05/19 09:33:50 tbox Exp $
-
 #
 # Ad hoc name server
 #
@@ -26,8 +24,11 @@ use IO::Socket;
 use Net::DNS;
 use Net::DNS::Packet;
 
+my $localport = int($ENV{'PORT'});
+if (!$localport) { $localport = 5300; }
+
 my $sock = IO::Socket::INET->new(LocalAddr => "10.53.0.2",
-   LocalPort => 5300, Proto => "udp") or die "$!";
+   LocalPort => $localport, Proto => "udp") or die "$!";
 
 my $pidf = new IO::File "ans.pid", "w" or die "cannot open pid file: $!";
 print $pidf "$$\n" or die "cannot write pid file: $!";
index f1fd59f40e22329b9add2740dbb912bc76c19915..d2663f2680e76129ec8d071c47401b2e42fbda94 100644 (file)
@@ -15,8 +15,6 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: ans.pl,v 1.12 2009/11/04 02:15:30 marka Exp $
-
 #
 # Ad hoc name server
 #
@@ -26,8 +24,11 @@ use IO::Socket;
 use Net::DNS;
 use Net::DNS::Packet;
 
+my $localport = int($ENV{'PORT'});
+if (!$localport) { $localport = 5300; }
+
 my $sock = IO::Socket::INET->new(LocalAddr => "10.53.0.3",
-   LocalPort => 5300, Proto => "udp") or die "$!";
+   LocalPort => $localport, Proto => "udp") or die "$!";
 
 my $pidf = new IO::File "ans.pid", "w" or die "cannot open pid file: $!";
 print $pidf "$$\n" or die "cannot write pid file: $!";
index 7afa4a0c63585970fd3991838f298e4be46befb1..3a1a969c4d400bbc4685e7da7dd6abc9eeae19f4 100644 (file)
@@ -28,12 +28,16 @@ local $SIG{PIPE} = 'IGNORE';
 local $| = 1;
 
 my $server_addr = "10.53.0.8";
+
+my $localport = int($ENV{'PORT'});
+if (!$localport) { $localport = 5300; }
+
 my $udpsock = IO::Socket::INET->new(LocalAddr => "$server_addr",
-   LocalPort => 5300, Proto => "udp", Reuse => 1) or die "$!";
+   LocalPort => $localport, Proto => "udp", Reuse => 1) or die "$!";
 my $tcpsock = IO::Socket::INET->new(LocalAddr => "$server_addr",
-   LocalPort => 5300, Proto => "tcp", Listen => 5, Reuse => 1) or die "$!";
+   LocalPort => $localport, Proto => "tcp", Listen => 5, Reuse => 1) or die "$!";
 
-print "listening on $server_addr:5300.\n";
+print "listening on $server_addr:$localport.\n";
 
 my $pidf = new IO::File "ans.pid", "w" or die "cannot open pid file: $!";
 print $pidf "$$\n" or die "cannot write pid file: $!";
index c68b389e3c1c1bc6f4b2613f8d283ac24999f8e9..aff6c5767a8437cba226cbd727bf8a2d26a574e5 100644 (file)
@@ -17,6 +17,7 @@
 #
 # Clean up after resolver tests.
 #
+rm -f */named.conf
 rm -f */named.memstats
 rm -f */named.run
 rm -f */ans.run
@@ -29,6 +30,6 @@ rm -f ns6/K*
 rm -f ns6/example.net.db.signed ns6/example.net.db
 rm -f ns6/dsset-example.net. ns6/example.net.db.signed.jnl
 rm -f ns6/to-be-removed.tld.db ns6/to-be-removed.tld.db.jnl
-rm -f ns7/server.db ns7/server.db.jnl ns7/named.conf
+rm -f ns7/server.db ns7/server.db.jnl
 rm -f sample.out.*.test*
 rm -f .digrc
similarity index 95%
rename from bin/tests/system/resolver/ns1/named.conf
rename to bin/tests/system/resolver/ns1/named.conf.in
index 6602009490638f275a55bd3a6d7bde0002de6b1f..eb76671acbac075b3c6e2e97551b39f0d1661d92 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.15 2009/05/29 23:47:49 tbox Exp $ */
-
-controls { /* empty */ };
+// NS1
 
 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 92%
rename from bin/tests/system/resolver/ns4/named.conf
rename to bin/tests/system/resolver/ns4/named.conf.in
index 3f82bca87f2ebd99ad85bd4a980e8e5754a4c30d..291b02c4f025b1289f8502f846e772ac817b44df 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id$ */
-
 // NS4
 
-controls { /* empty */ };
-
 options {
        query-source address 10.53.0.4;
        notify-source 10.53.0.4;
        transfer-source 10.53.0.4;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.4; };
        listen-on-v6 { none; };
@@ -65,5 +61,5 @@ key rndc_key {
 };
 
 controls {
-       inet 10.53.0.4 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.4 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
similarity index 91%
rename from bin/tests/system/resolver/ns5/named.conf
rename to bin/tests/system/resolver/ns5/named.conf.in
index 0c8aa5e4c3b745a0fb6f7399009759251ff61b08..484721ac6fdf99ec27aeaed2fffef1751ead3c67 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.4 2011/03/13 23:47:36 tbox Exp $ */
-
-// NS4
-
-controls { /* empty */ };
+// NS5
 
 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";
        listen-on { 10.53.0.5; };
        listen-on-v6 { none; };
similarity index 96%
rename from bin/tests/system/resolver/ns6/named.conf
rename to bin/tests/system/resolver/ns6/named.conf.in
index 43e3efef63c9771c97e854f0b4155334582175cf..7e8fb4cbc6e6a252733c01abbe4c345473d3823a 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id$ */
-
-// NS4
-
-controls { /* empty */ };
+// NS6
 
 options {
        query-source address 10.53.0.6;
        notify-source 10.53.0.6;
        transfer-source 10.53.0.6;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.6; };
        listen-on-v6 { none; };
similarity index 92%
rename from bin/tests/system/resolver/ns7/named1.conf
rename to bin/tests/system/resolver/ns7/named1.conf.in
index 058b918b4b8e43a0556657171a507ff321226e02..6c030e6f94e7214b9e3b5f9430715355c611fa0b 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-// NS4
-
-controls { /* empty */ };
+// NS7
 
 options {
        query-source address 10.53.0.7;
        notify-source 10.53.0.7;
        transfer-source 10.53.0.7;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.7; };
        listen-on-v6 { none; };
@@ -41,7 +39,7 @@ key rndc_key {
 };
 
 controls {
-       inet 10.53.0.7 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.7 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 zone "." {
similarity index 92%
rename from bin/tests/system/resolver/ns7/named2.conf
rename to bin/tests/system/resolver/ns7/named2.conf.in
index 3ec06a754706662ec8f5174c0bdfdef3626f5445..262b33013c50c115ccd4ad65b17b18cb5cbfe6ff 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-// NS4
-
-controls { /* empty */ };
+// NS7
 
 options {
        query-source address 10.53.0.7 port 5300;
        notify-source 10.53.0.7;
        transfer-source 10.53.0.7;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.7; };
        listen-on-v6 { none; };
@@ -41,7 +39,7 @@ key rndc_key {
 };
 
 controls {
-       inet 10.53.0.7 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.7 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 zone "." {
index 2020ed6d57f8a853554fdabc60be3423c3496fc4..dcf7eeb7f95c3292d6fbe1baa834a946074fb41c 100644 (file)
@@ -24,11 +24,11 @@ then
     then
        :
     else
-       echo "I:Net::DNS version 0.76 and 0.77 have a bug that causes this test to fail: please update." >&2
+       echo_i "Net::DNS version 0.76 and 0.77 have a bug that causes this test to fail: please update." >&2
        exit 1
     fi
 else
-    echo "I:This test requires the Net::DNS library." >&2
+    echo_i "This test requires the Net::DNS library." >&2
     exit 1
 fi
 
index 4b3a2c83b94ff526834a75e4b2a09f6d9d20289b..27c036b72716043ceabfef8e74859471588d657d 100644 (file)
@@ -22,5 +22,11 @@ test -r $RANDFILE || $GENRANDOM 400 $RANDFILE
 cp ns4/tld1.db ns4/tld.db
 cp ns6/to-be-removed.tld.db.in ns6/to-be-removed.tld.db
 cp ns7/server.db.in ns7/server.db
-cp ns7/named1.conf ns7/named.conf
+
+copy_setports ns1/named.conf.in ns1/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/named1.conf.in ns7/named.conf
+
 (cd ns6 && $SHELL keygen.sh)
index 4e55b99bbd7497639891e1765fa6f529d4ca26d5..f36276f1ee7a91d25bc3f5abf58b685cb1bce9a6 100755 (executable)
 
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
+echo .
+
+DIGOPTS="-p ${PORT}"
+SAMPLEOPTS="-p ${PORT}"
+RNDCCMD="$RNDC -c $SYSTEMTESTTOP/common/rndc.conf -p ${CONTROLPORT} -s"
 
 status=0
 n=0
 
 n=`expr $n + 1`
-echo "I:checking non-cachable NXDOMAIN response handling ($n)"
+echo_i "checking non-cachable NXDOMAIN response handling ($n)"
 ret=0
-$DIG +tcp nxdomain.example.net @10.53.0.1 a -p 5300 > dig.out.ns1.test${n} || ret=1
+$DIG $DIGOPTS +tcp nxdomain.example.net @10.53.0.1 a > dig.out.ns1.test${n} || ret=1
 grep "status: NXDOMAIN" dig.out.ns1.test${n} > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 if [ -x ${SAMPLE} ] ; then
    n=`expr $n + 1`
-   echo "I:checking non-cachable NXDOMAIN response handling using dns_client ($n)"
+   echo_i "checking non-cachable NXDOMAIN response handling using dns_client ($n)"
    ret=0
-   ${SAMPLE} -p 5300 -t a 10.53.0.1 nxdomain.example.net 2> sample.out.ns1.test${n} || ret=1
+   ${SAMPLE} $SAMPLEOPTS -t a 10.53.0.1 nxdomain.example.net 2> sample.out.ns1.test${n} || ret=1
    grep "resolution failed: ncache nxdomain" sample.out.ns1.test${n} > /dev/null || ret=1
-   if [ $ret != 0 ]; then echo "I:failed"; fi
+   if [ $ret != 0 ]; then echo_i "failed"; fi
    status=`expr $status + $ret`
 fi
 
 n=`expr $n + 1`
-echo "I:checking non-cachable NODATA response handling ($n)"
+echo_i "checking non-cachable NODATA response handling ($n)"
 ret=0
-$DIG +tcp nodata.example.net @10.53.0.1 a -p 5300 > dig.out.ns1.test${n} || ret=1
+$DIG $DIGOPTS +tcp nodata.example.net @10.53.0.1 a > dig.out.ns1.test${n} || ret=1
 grep "status: NOERROR" dig.out.ns1.test${n} > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 if [ -x ${SAMPLE} ] ; then
     n=`expr $n + 1`
-    echo "I:checking non-cachable NODATA response handling using dns_client ($n)"
+    echo_i "checking non-cachable NODATA response handling using dns_client ($n)"
     ret=0
-    ${SAMPLE} -p 5300 -t a 10.53.0.1 nodata.example.net 2> sample.out.ns1.test${n} || ret=1
+    ${SAMPLE} $SAMPLEOPTS -t a 10.53.0.1 nodata.example.net 2> sample.out.ns1.test${n} || ret=1
     grep "resolution failed: ncache nxrrset" sample.out.ns1.test${n} > /dev/null || ret=1
-    if [ $ret != 0 ]; then echo "I:failed"; fi
+    if [ $ret != 0 ]; then echo_i "failed"; fi
     status=`expr $status + $ret`
 fi
 
 n=`expr $n + 1`
-echo "I:checking handling of bogus referrals ($n)"
+echo_i "checking handling of bogus referrals ($n)"
 # If the server has the "INSIST(!external)" bug, this query will kill it.
-$DIG +tcp www.example.com. a @10.53.0.1 -p 5300 >/dev/null || { echo I:failed; status=`expr $status + 1`; }
+$DIG $DIGOPTS +tcp www.example.com. a @10.53.0.1 >/dev/null || { echo_i "failed"; status=`expr $status + 1`; }
 
 if [ -x ${SAMPLE} ] ; then
     n=`expr $n + 1`
-    echo "I:checking handling of bogus referrals using dns_client ($n)"
+    echo_i "checking handling of bogus referrals using dns_client ($n)"
     ret=0
-    ${SAMPLE} -p 5300 -t a 10.53.0.1 www.example.com 2> sample.out.ns1.test${n} || ret=1
+    ${SAMPLE} $SAMPLEOPTS -t a 10.53.0.1 www.example.com 2> sample.out.ns1.test${n} || ret=1
     grep -E "resolution failed: (SERVFAIL|failure)" sample.out.ns1.test${n} > /dev/null || ret=1
-    if [ $ret != 0 ]; then echo "I:failed"; fi
+    if [ $ret != 0 ]; then echo_i "failed"; fi
     status=`expr $status + $ret`
 fi
 
 n=`expr $n + 1`
-echo "I:check handling of cname + other data / 1 ($n)"
-$DIG +tcp cname1.example.com. a @10.53.0.1 -p 5300 >/dev/null || { echo I:failed; status=`expr $status + 1`; }
+echo_i "check handling of cname + other data / 1 ($n)"
+$DIG $DIGOPTS +tcp cname1.example.com. a @10.53.0.1 >/dev/null || { echo_i "failed"; status=`expr $status + 1`; }
 
 n=`expr $n + 1`
-echo "I:check handling of cname + other data / 2 ($n)"
-$DIG +tcp cname2.example.com. a @10.53.0.1 -p 5300 >/dev/null || { echo I:failed; status=`expr $status + 1`; }
+echo_i "check handling of cname + other data / 2 ($n)"
+$DIG $DIGOPTS +tcp cname2.example.com. a @10.53.0.1 >/dev/null || { echo_i "failed"; status=`expr $status + 1`; }
 
 n=`expr $n + 1`
-echo "I:check that server is still running ($n)"
-$DIG +tcp www.example.com. a @10.53.0.1 -p 5300 >/dev/null || { echo I:failed; status=`expr $status + 1`; }
+echo_i "check that server is still running ($n)"
+$DIG $DIGOPTS +tcp www.example.com. a @10.53.0.1 >/dev/null || { echo_i "failed"; status=`expr $status + 1`; }
 
 n=`expr $n + 1`
-echo "I:checking answer IPv4 address filtering (deny) ($n)"
+echo_i "checking answer IPv4 address filtering (deny) ($n)"
 ret=0
-$DIG +tcp www.example.net @10.53.0.1 a -p 5300 > dig.out.ns1.test${n} || ret=1
+$DIG $DIGOPTS +tcp www.example.net @10.53.0.1 a > dig.out.ns1.test${n} || ret=1
 grep "status: SERVFAIL" dig.out.ns1.test${n} > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking answer IPv6 address filtering (deny) ($n)"
+echo_i "checking answer IPv6 address filtering (deny) ($n)"
 ret=0
-$DIG +tcp www.example.net @10.53.0.1 aaaa -p 5300 > dig.out.ns1.test${n} || ret=1
+$DIG $DIGOPTS +tcp www.example.net @10.53.0.1 aaaa > dig.out.ns1.test${n} || ret=1
 grep "status: SERVFAIL" dig.out.ns1.test${n} > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking answer IPv4 address filtering (accept) ($n)"
+echo_i "checking answer IPv4 address filtering (accept) ($n)"
 ret=0
-$DIG +tcp www.example.org @10.53.0.1 a -p 5300 > dig.out.ns1.test${n} || ret=1
+$DIG $DIGOPTS +tcp www.example.org @10.53.0.1 a > dig.out.ns1.test${n} || ret=1
 grep "status: NOERROR" dig.out.ns1.test${n} > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 
 if [ -x ${SAMPLE} ] ; then
     n=`expr $n + 1`
-    echo "I:checking answer IPv4 address filtering using dns_client (accept) ($n)"
+    echo_i "checking answer IPv4 address filtering using dns_client (accept) ($n)"
     ret=0
-    ${SAMPLE} -p 5300 -t a 10.53.0.1 www.example.org > sample.out.ns1.test${n} || ret=1
+    ${SAMPLE} $SAMPLEOPTS -t a 10.53.0.1 www.example.org > sample.out.ns1.test${n} || ret=1
     grep "www.example.org..*.192.0.2.1" sample.out.ns1.test${n} > /dev/null || ret=1
-    if [ $ret != 0 ]; then echo "I:failed"; fi
+    if [ $ret != 0 ]; then echo_i "failed"; fi
     status=`expr $status + $ret`
 fi
 
 n=`expr $n + 1`
-echo "I:checking answer IPv6 address filtering (accept) ($n)"
+echo_i "checking answer IPv6 address filtering (accept) ($n)"
 ret=0
-$DIG +tcp www.example.org @10.53.0.1 aaaa -p 5300 > dig.out.ns1.test${n} || ret=1
+$DIG $DIGOPTS +tcp www.example.org @10.53.0.1 aaaa > dig.out.ns1.test${n} || ret=1
 grep "status: NOERROR" dig.out.ns1.test${n} > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 if [ -x ${SAMPLE} ] ; then
     n=`expr $n + 1`
-    echo "I:checking answer IPv6 address filtering using dns_client (accept) ($n)"
+    echo_i "checking answer IPv6 address filtering using dns_client (accept) ($n)"
     ret=0
-    ${SAMPLE} -p 5300 -t aaaa 10.53.0.1 www.example.org > sample.out.ns1.test${n} || ret=1
+    ${SAMPLE} $SAMPLEOPTS -t aaaa 10.53.0.1 www.example.org > sample.out.ns1.test${n} || ret=1
     grep "www.example.org..*.2001:db8:beef::1" sample.out.ns1.test${n} > /dev/null || ret=1
-    if [ $ret != 0 ]; then echo "I:failed"; fi
+    if [ $ret != 0 ]; then echo_i "failed"; fi
     status=`expr $status + $ret`
 fi
 
 n=`expr $n + 1`
-echo "I:checking CNAME target filtering (deny) ($n)"
+echo_i "checking CNAME target filtering (deny) ($n)"
 ret=0
-$DIG +tcp badcname.example.net @10.53.0.1 a -p 5300 > dig.out.ns1.test${n} || ret=1
+$DIG $DIGOPTS +tcp badcname.example.net @10.53.0.1 a > dig.out.ns1.test${n} || ret=1
 grep "status: SERVFAIL" dig.out.ns1.test${n} > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking CNAME target filtering (accept) ($n)"
+echo_i "checking CNAME target filtering (accept) ($n)"
 ret=0
-$DIG +tcp goodcname.example.net @10.53.0.1 a -p 5300 > dig.out.ns1.test${n} || ret=1
+$DIG $DIGOPTS +tcp goodcname.example.net @10.53.0.1 a > dig.out.ns1.test${n} || ret=1
 grep "status: NOERROR" dig.out.ns1.test${n} > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 if [ -x ${SAMPLE} ] ; then
     n=`expr $n + 1`
-    echo "I:checking CNAME target filtering using dns_client (accept) ($n)"
+    echo_i "checking CNAME target filtering using dns_client (accept) ($n)"
     ret=0
-    ${SAMPLE} -p 5300 -t a 10.53.0.1 goodcname.example.net > sample.out.ns1.test${n} || ret=1
+    ${SAMPLE} $SAMPLEOPTS -t a 10.53.0.1 goodcname.example.net > sample.out.ns1.test${n} || ret=1
     grep "goodcname.example.net..*.goodcname.example.org." sample.out.ns1.test${n} > /dev/null || ret=1
     grep "goodcname.example.org..*.192.0.2.1" sample.out.ns1.test${n} > /dev/null || ret=1
-    if [ $ret != 0 ]; then echo "I:failed"; fi
+    if [ $ret != 0 ]; then echo_i "failed"; fi
     status=`expr $status + $ret`
 fi
 
 n=`expr $n + 1`
-echo "I:checking CNAME target filtering (accept due to subdomain) ($n)"
+echo_i "checking CNAME target filtering (accept due to subdomain) ($n)"
 ret=0
-$DIG +tcp cname.sub.example.org @10.53.0.1 a -p 5300 > dig.out.ns1.test${n} || ret=1
+$DIG $DIGOPTS +tcp cname.sub.example.org @10.53.0.1 a > dig.out.ns1.test${n} || ret=1
 grep "status: NOERROR" dig.out.ns1.test${n} > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 if [ -x ${SAMPLE} ] ; then
     n=`expr $n + 1`
-    echo "I:checking CNAME target filtering using dns_client (accept due to subdomain) ($n)"
+    echo_i "checking CNAME target filtering using dns_client (accept due to subdomain) ($n)"
     ret=0
-    ${SAMPLE} -p 5300 -t a 10.53.0.1 cname.sub.example.org > sample.out.ns1.test${n} || ret=1
+    ${SAMPLE} $SAMPLEOPTS -t a 10.53.0.1 cname.sub.example.org > sample.out.ns1.test${n} || ret=1
     grep "cname.sub.example.org..*.ok.sub.example.org." sample.out.ns1.test${n} > /dev/null || ret=1
     grep "ok.sub.example.org..*.192.0.2.1" sample.out.ns1.test${n} > /dev/null || ret=1
-    if [ $ret != 0 ]; then echo "I:failed"; fi
+    if [ $ret != 0 ]; then echo_i "failed"; fi
     status=`expr $status + $ret`
 fi
 
 n=`expr $n + 1`
-echo "I:checking DNAME target filtering (deny) ($n)"
+echo_i "checking DNAME target filtering (deny) ($n)"
 ret=0
-$DIG +tcp foo.baddname.example.net @10.53.0.1 a -p 5300 > dig.out.ns1.test${n} || ret=1
+$DIG $DIGOPTS +tcp foo.baddname.example.net @10.53.0.1 a > dig.out.ns1.test${n} || ret=1
 grep "status: SERVFAIL" dig.out.ns1.test${n} > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking DNAME target filtering (accept) ($n)"
+echo_i "checking DNAME target filtering (accept) ($n)"
 ret=0
-$DIG +tcp foo.gooddname.example.net @10.53.0.1 a -p 5300 > dig.out.ns1.test${n} || ret=1
+$DIG $DIGOPTS +tcp foo.gooddname.example.net @10.53.0.1 a > dig.out.ns1.test${n} || ret=1
 grep "status: NOERROR" dig.out.ns1.test${n} > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 if [ -x ${SAMPLE} ] ; then
     n=`expr $n + 1`
-    echo "I:checking DNAME target filtering using dns_client (accept) ($n)"
+    echo_i "checking DNAME target filtering using dns_client (accept) ($n)"
     ret=0
-    ${SAMPLE} -p 5300 -t a 10.53.0.1 foo.gooddname.example.net > sample.out.ns1.test${n} || ret=1
+    ${SAMPLE} $SAMPLEOPTS -t a 10.53.0.1 foo.gooddname.example.net > sample.out.ns1.test${n} || ret=1
     grep "foo.gooddname.example.net..*.gooddname.example.org" sample.out.ns1.test${n} > /dev/null || ret=1
     grep "foo.gooddname.example.org..*.192.0.2.1" sample.out.ns1.test${n} > /dev/null || ret=1
-    if [ $ret != 0 ]; then echo "I:failed"; fi
+    if [ $ret != 0 ]; then echo_i "failed"; fi
     status=`expr $status + $ret`
 fi
 
 n=`expr $n + 1`
-echo "I:checking DNAME target filtering (accept due to subdomain) ($n)"
+echo_i "checking DNAME target filtering (accept due to subdomain) ($n)"
 ret=0
-$DIG +tcp www.dname.sub.example.org @10.53.0.1 a -p 5300 > dig.out.ns1.test${n} || ret=1
+$DIG $DIGOPTS +tcp www.dname.sub.example.org @10.53.0.1 a > dig.out.ns1.test${n} || ret=1
 grep "status: NOERROR" dig.out.ns1.test${n} > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 if [ -x ${SAMPLE} ] ; then
     n=`expr $n + 1`
-    echo "I:checking DNAME target filtering using dns_client (accept due to subdomain) ($n)"
+    echo_i "checking DNAME target filtering using dns_client (accept due to subdomain) ($n)"
     ret=0
-    ${SAMPLE} -p 5300 -t a 10.53.0.1 www.dname.sub.example.org > sample.out.ns1.test${n} || ret=1
+    ${SAMPLE} $SAMPLEOPTS -t a 10.53.0.1 www.dname.sub.example.org > sample.out.ns1.test${n} || ret=1
     grep "www.dname.sub.example.org..*.ok.sub.example.org." sample.out.ns1.test${n} > /dev/null || ret=1
     grep "www.ok.sub.example.org..*.192.0.2.1" sample.out.ns1.test${n} > /dev/null || ret=1
-    if [ $ret != 0 ]; then echo "I:failed"; fi
+    if [ $ret != 0 ]; then echo_i "failed"; fi
     status=`expr $status + $ret`
 fi
 
 n=`expr $n + 1`
-echo "I: RT21594 regression test check setup ($n)"
+echo_i "RT21594 regression test check setup ($n)"
 ret=0
 # Check that "aa" is not being set by the authoritative server.
-$DIG +tcp . @10.53.0.4 soa -p 5300 > dig.ns4.out.${n} || ret=1
+$DIG $DIGOPTS +tcp . @10.53.0.4 soa > dig.ns4.out.${n} || ret=1
 grep 'flags: qr rd;' dig.ns4.out.${n} > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: RT21594 regression test positive answers ($n)"
+echo_i "RT21594 regression test positive answers ($n)"
 ret=0
 # Check that resolver accepts the non-authoritative positive answers.
-$DIG +tcp . @10.53.0.5 soa -p 5300 > dig.ns5.out.${n} || ret=1
+$DIG $DIGOPTS +tcp . @10.53.0.5 soa > dig.ns5.out.${n} || ret=1
 grep "status: NOERROR" dig.ns5.out.${n} > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: RT21594 regression test NODATA answers ($n)"
+echo_i "RT21594 regression test NODATA answers ($n)"
 ret=0
 # Check that resolver accepts the non-authoritative nodata answers.
-$DIG +tcp . @10.53.0.5 txt -p 5300 > dig.ns5.out.${n} || ret=1
+$DIG $DIGOPTS +tcp . @10.53.0.5 txt > dig.ns5.out.${n} || ret=1
 grep "status: NOERROR" dig.ns5.out.${n} > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: RT21594 regression test NXDOMAIN answers ($n)"
+echo_i "RT21594 regression test NXDOMAIN answers ($n)"
 ret=0
 # Check that resolver accepts the non-authoritative positive answers.
-$DIG +tcp noexistant @10.53.0.5 txt -p 5300 > dig.ns5.out.${n} || ret=1
+$DIG $DIGOPTS +tcp noexistant @10.53.0.5 txt > dig.ns5.out.${n} || ret=1
 grep "status: NXDOMAIN" dig.ns5.out.${n} > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:check that replacement of additional data by a negative cache no data entry clears the additional RRSIGs ($n)"
+echo_i "check that replacement of additional data by a negative cache no data entry clears the additional RRSIGs ($n)"
 ret=0
-$DIG +tcp mx example.net @10.53.0.7 -p 5300 > dig.ns7.out.${n} || ret=1
+$DIG $DIGOPTS +tcp mx example.net @10.53.0.7 > dig.ns7.out.${n} || ret=1
 grep "status: NOERROR" dig.ns7.out.${n} > /dev/null || ret=1
-if [ $ret = 1 ]; then echo "I:mx priming failed"; fi
+if [ $ret = 1 ]; then echo_i "mx priming failed"; fi
 $NSUPDATE << EOF
-server 10.53.0.6 5300
+server 10.53.0.6 ${PORT}
 zone example.net
 update delete mail.example.net A
 update add mail.example.net 0 AAAA ::1
 send
 EOF
-$DIG +tcp a mail.example.net @10.53.0.7 -p 5300 > dig.ns7.out.${n} || ret=2
+$DIG $DIGOPTS +tcp a mail.example.net @10.53.0.7 > dig.ns7.out.${n} || ret=2
 grep "status: NOERROR" dig.ns7.out.${n} > /dev/null || ret=2
 grep "ANSWER: 0" dig.ns7.out.${n} > /dev/null || ret=2
-if [ $ret = 2 ]; then echo "I:ncache priming failed"; fi
-$DIG +tcp mx example.net @10.53.0.7 -p 5300 > dig.ns7.out.${n} || ret=3
+if [ $ret = 2 ]; then echo_i "ncache priming failed"; fi
+$DIG $DIGOPTS +tcp mx example.net @10.53.0.7 > dig.ns7.out.${n} || ret=3
 grep "status: NOERROR" dig.ns7.out.${n} > /dev/null || ret=3
-$DIG +tcp rrsig mail.example.net +norec @10.53.0.7 -p 5300 > dig.ns7.out.${n}  || ret=4
+$DIG $DIGOPTS +tcp rrsig mail.example.net +norec @10.53.0.7 > dig.ns7.out.${n}  || ret=4
 grep "status: NOERROR" dig.ns7.out.${n} > /dev/null || ret=4
 grep "ANSWER: 0" dig.ns7.out.${n} > /dev/null || ret=4
-if [ $ret != 0 ]; then echo "I:failed"; ret=1; fi
+if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
 status=`expr $status + $ret`
 
-if [ $ret != 0 ]; then echo "I:failed"; ret=1; fi
+if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that update a nameservers address has immediate effects ($n)"
+echo_i "checking that update a nameservers address has immediate effects ($n)"
 ret=0
-$DIG +tcp TXT foo.moves @10.53.0.7 -p 5300 > dig.ns7.foo.${n} || ret=1
-grep "From NS 5" dig.ns7.foo.${n} > /dev/null || ret=1 
+$DIG $DIGOPTS +tcp TXT foo.moves @10.53.0.7 > dig.ns7.foo.${n} || ret=1
+grep "From NS 5" dig.ns7.foo.${n} > /dev/null || ret=1
 $NSUPDATE << EOF
-server 10.53.0.7 5300
+server 10.53.0.7 ${PORT}
 zone server
 update delete ns.server A
 update add ns.server 300 A 10.53.0.4
 send
 EOF
 sleep 1
-$DIG +tcp TXT bar.moves @10.53.0.7 -p 5300 > dig.ns7.bar.${n} || ret=1
+$DIG $DIGOPTS +tcp TXT bar.moves @10.53.0.7 > dig.ns7.bar.${n} || ret=1
 grep "From NS 4" dig.ns7.bar.${n} > /dev/null || ret=1
 
-if [ $ret != 0 ]; then echo "I:failed"; status=1; fi
+if [ $ret != 0 ]; then echo_i "failed"; status=1; fi
 
 n=`expr $n + 1`
-echo "I:checking that update a nameservers glue has immediate effects ($n)"
+echo_i "checking that update a nameservers glue has immediate effects ($n)"
 ret=0
-$DIG +tcp TXT foo.child.server @10.53.0.7 -p 5300 > dig.ns7.foo.${n} || ret=1
-grep "From NS 5" dig.ns7.foo.${n} > /dev/null || ret=1 
+$DIG $DIGOPTS +tcp TXT foo.child.server @10.53.0.7 > dig.ns7.foo.${n} || ret=1
+grep "From NS 5" dig.ns7.foo.${n} > /dev/null || ret=1
 $NSUPDATE << EOF
-server 10.53.0.7 5300
+server 10.53.0.7 ${PORT}
 zone server
 update delete ns.child.server A
 update add ns.child.server 300 A 10.53.0.4
 send
 EOF
 sleep 1
-$DIG +tcp TXT bar.child.server @10.53.0.7 -p 5300 > dig.ns7.bar.${n} || ret=1
+$DIG $DIGOPTS +tcp TXT bar.child.server @10.53.0.7 > dig.ns7.bar.${n} || ret=1
 grep "From NS 4" dig.ns7.bar.${n} > /dev/null || ret=1
 
-if [ $ret != 0 ]; then echo "I:failed"; status=1; fi
+if [ $ret != 0 ]; then echo_i "failed"; status=1; fi
 
 n=`expr $n + 1`
-echo "I:checking empty RFC 1918 reverse zones ($n)"
+echo_i "checking empty RFC 1918 reverse zones ($n)"
 ret=0
 # Check that "aa" is being set by the resolver for RFC 1918 zones
 # except the one that has been deliberately disabled
-$DIG @10.53.0.7 -p 5300 -x 10.1.1.1 > dig.ns4.out.1.${n} || ret=1
+$DIG $DIGOPTS @10.53.0.7 -x 10.1.1.1 > dig.ns4.out.1.${n} || ret=1
 grep 'flags: qr aa rd ra;' dig.ns4.out.1.${n} > /dev/null || ret=1
-$DIG @10.53.0.7 -p 5300 -x 192.168.1.1 > dig.ns4.out.2.${n} || ret=1
+$DIG $DIGOPTS @10.53.0.7 -x 192.168.1.1 > dig.ns4.out.2.${n} || ret=1
 grep 'flags: qr aa rd ra;' dig.ns4.out.2.${n} > /dev/null || ret=1
-$DIG @10.53.0.7 -p 5300 -x 172.16.1.1  > dig.ns4.out.3.${n} || ret=1
+$DIG $DIGOPTS @10.53.0.7 -x 172.16.1.1  > dig.ns4.out.3.${n} || ret=1
 grep 'flags: qr aa rd ra;' dig.ns4.out.3.${n} > /dev/null || ret=1
-$DIG @10.53.0.7 -p 5300 -x 172.17.1.1 > dig.ns4.out.4.${n} || ret=1
+$DIG $DIGOPTS @10.53.0.7 -x 172.17.1.1 > dig.ns4.out.4.${n} || ret=1
 grep 'flags: qr aa rd ra;' dig.ns4.out.4.${n} > /dev/null || ret=1
-$DIG @10.53.0.7 -p 5300 -x 172.18.1.1 > dig.ns4.out.5.${n} || ret=1
+$DIG $DIGOPTS @10.53.0.7 -x 172.18.1.1 > dig.ns4.out.5.${n} || ret=1
 grep 'flags: qr aa rd ra;' dig.ns4.out.5.${n} > /dev/null || ret=1
-$DIG @10.53.0.7 -p 5300 -x 172.19.1.1 > dig.ns4.out.6.${n} || ret=1
+$DIG $DIGOPTS @10.53.0.7 -x 172.19.1.1 > dig.ns4.out.6.${n} || ret=1
 grep 'flags: qr aa rd ra;' dig.ns4.out.6.${n} > /dev/null || ret=1
-$DIG @10.53.0.7 -p 5300 -x 172.21.1.1 > dig.ns4.out.7.${n} || ret=1
+$DIG $DIGOPTS @10.53.0.7 -x 172.21.1.1 > dig.ns4.out.7.${n} || ret=1
 grep 'flags: qr aa rd ra;' dig.ns4.out.7.${n} > /dev/null || ret=1
-$DIG @10.53.0.7 -p 5300 -x 172.22.1.1 > dig.ns4.out.8.${n} || ret=1
+$DIG $DIGOPTS @10.53.0.7 -x 172.22.1.1 > dig.ns4.out.8.${n} || ret=1
 grep 'flags: qr aa rd ra;' dig.ns4.out.8.${n} > /dev/null || ret=1
-$DIG @10.53.0.7 -p 5300 -x 172.23.1.1 > dig.ns4.out.9.${n} || ret=1
+$DIG $DIGOPTS @10.53.0.7 -x 172.23.1.1 > dig.ns4.out.9.${n} || ret=1
 grep 'flags: qr aa rd ra;' dig.ns4.out.9.${n} > /dev/null || ret=1
-$DIG @10.53.0.7 -p 5300 -x 172.24.1.1 > dig.ns4.out.11.${n} || ret=1
+$DIG $DIGOPTS @10.53.0.7 -x 172.24.1.1 > dig.ns4.out.11.${n} || ret=1
 grep 'flags: qr aa rd ra;' dig.ns4.out.11.${n} > /dev/null || ret=1
-$DIG @10.53.0.7 -p 5300 -x 172.25.1.1 > dig.ns4.out.12.${n} || ret=1
+$DIG $DIGOPTS @10.53.0.7 -x 172.25.1.1 > dig.ns4.out.12.${n} || ret=1
 grep 'flags: qr aa rd ra;' dig.ns4.out.12.${n} > /dev/null || ret=1
-$DIG @10.53.0.7 -p 5300 -x 172.26.1.1 > dig.ns4.out.13.${n} || ret=1
+$DIG $DIGOPTS @10.53.0.7 -x 172.26.1.1 > dig.ns4.out.13.${n} || ret=1
 grep 'flags: qr aa rd ra;' dig.ns4.out.13.${n} > /dev/null || ret=1
-$DIG @10.53.0.7 -p 5300 -x 172.27.1.1 > dig.ns4.out.14.${n} || ret=1
+$DIG $DIGOPTS @10.53.0.7 -x 172.27.1.1 > dig.ns4.out.14.${n} || ret=1
 grep 'flags: qr aa rd ra;' dig.ns4.out.14.${n} > /dev/null || ret=1
-$DIG @10.53.0.7 -p 5300 -x 172.28.1.1 > dig.ns4.out.15.${n} || ret=1
+$DIG $DIGOPTS @10.53.0.7 -x 172.28.1.1 > dig.ns4.out.15.${n} || ret=1
 grep 'flags: qr aa rd ra;' dig.ns4.out.15.${n} > /dev/null || ret=1
-$DIG @10.53.0.7 -p 5300 -x 172.29.1.1 > dig.ns4.out.16.${n} || ret=1
+$DIG $DIGOPTS @10.53.0.7 -x 172.29.1.1 > dig.ns4.out.16.${n} || ret=1
 grep 'flags: qr aa rd ra;' dig.ns4.out.16.${n} > /dev/null || ret=1
-$DIG @10.53.0.7 -p 5300 -x 172.30.1.1 > dig.ns4.out.17.${n} || ret=1
+$DIG $DIGOPTS @10.53.0.7 -x 172.30.1.1 > dig.ns4.out.17.${n} || ret=1
 grep 'flags: qr aa rd ra;' dig.ns4.out.17.${n} > /dev/null || ret=1
-$DIG @10.53.0.7 -p 5300 -x 172.31.1.1 > dig.ns4.out.18.${n} || ret=1
+$DIG $DIGOPTS @10.53.0.7 -x 172.31.1.1 > dig.ns4.out.18.${n} || ret=1
 grep 'flags: qr aa rd ra;' dig.ns4.out.18.${n} > /dev/null || ret=1
 # but this one should NOT be authoritative
-$DIG @10.53.0.7 -p 5300 -x 172.20.1.1 > dig.ns4.out.19.${n} || ret=1
+$DIG $DIGOPTS @10.53.0.7 -x 172.20.1.1 > dig.ns4.out.19.${n} || ret=1
 grep 'flags: qr rd ra;' dig.ns4.out.19.${n} > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; status=1; fi
+if [ $ret != 0 ]; then echo_i "failed"; status=1; fi
 
 n=`expr $n + 1`
-echo "I:checking that removal of a delegation is honoured ($n)"
+echo_i "checking that removal of a delegation is honoured ($n)"
 ret=0
-$DIG -p 5300 @10.53.0.5 www.to-be-removed.tld A > dig.ns5.prime.${n}
-grep "status: NOERROR" dig.ns5.prime.${n} > /dev/null || { ret=1; echo "I: priming failed"; }
+$DIG $DIGOPTS @10.53.0.5 www.to-be-removed.tld A > dig.ns5.prime.${n}
+grep "status: NOERROR" dig.ns5.prime.${n} > /dev/null || { ret=1; echo_i "priming failed"; }
 cp ns4/tld2.db ns4/tld.db
-($RNDC -c ../common/rndc.conf -s 10.53.0.4 -p 9953 reload tld 2>&1 ) | 
-sed -e '/reload queued/d' -e 's/^/I:ns4 /'
+($RNDCCMD 10.53.0.4 reload tld 2>&1 ) |
+sed -e '/reload queued/d' -e 's/^/ns4 /' | cat_i
 old=
 for i in 0 1 2 3 4 5 6 7 8 9
 do
        foo=0
-       $DIG -p 5300 @10.53.0.5 ns$i.to-be-removed.tld A > /dev/null
-       $DIG -p 5300 @10.53.0.5 www.to-be-removed.tld A > dig.ns5.out.${n}
+       $DIG $DIGOPTS @10.53.0.5 ns$i.to-be-removed.tld A > /dev/null
+       $DIG $DIGOPTS @10.53.0.5 www.to-be-removed.tld A > dig.ns5.out.${n}
        grep "status: NXDOMAIN" dig.ns5.out.${n} > /dev/null || foo=1
        [ $foo = 0 ] && break
        $NSUPDATE << EOF
-server 10.53.0.6 5300
+server 10.53.0.6 ${PORT}
 zone to-be-removed.tld
 update add to-be-removed.tld 100 NS ns${i}.to-be-removed.tld
 update delete to-be-removed.tld NS ns${old}.to-be-removed.tld
@@ -399,153 +404,153 @@ EOF
        old=$i
        sleep 1
 done
-[ $ret = 0 ] && ret=$foo; 
-if [ $ret != 0 ]; then echo "I:failed"; status=1; fi
+[ $ret = 0 ] && ret=$foo;
+if [ $ret != 0 ]; then echo_i "failed"; status=1; fi
 
 n=`expr $n + 1`
-echo "I:check for improved error message with SOA mismatch ($n)"
+echo_i "check for improved error message with SOA mismatch ($n)"
 ret=0
-$DIG @10.53.0.1 -p 5300 www.sub.broken aaaa > dig.out.ns1.test${n} || ret=1
+$DIG $DIGOPTS @10.53.0.1 www.sub.broken aaaa > dig.out.ns1.test${n} || ret=1
 grep "not subdomain of zone" ns1/named.run > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-cp ns7/named2.conf ns7/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.7 -p 9953 reconfig 2>&1 | sed 's/^/I:ns7 /'
+copy_setports ns7/named2.conf.in ns7/named.conf
+$RNDCCMD 10.53.0.7 reconfig 2>&1 | sed 's/^/ns7 /' | cat_i
 
 n=`expr $n + 1`
-echo "I:check resolution on the listening port ($n)"
+echo_i "check resolution on the listening port ($n)"
 ret=0
-$DIG +tcp +tries=2 +time=5 mx example.net @10.53.0.7 -p 5300 > dig.ns7.out.${n} || ret=2
+$DIG $DIGOPTS +tcp +tries=2 +time=5 mx example.net @10.53.0.7 > dig.ns7.out.${n} || ret=2
 grep "status: NOERROR" dig.ns7.out.${n} > /dev/null || ret=1
 grep "ANSWER: 1" dig.ns7.out.${n} > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; ret=1; fi
+if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:check that '-t aaaa' in .digrc does not have unexpected side effects ($n)"
+echo_i "check that '-t aaaa' in .digrc does not have unexpected side effects ($n)"
 ret=0
 echo "-t aaaa" > .digrc
-env HOME=`pwd` $DIG @10.53.0.4 -p 5300 . > dig.out.1.${n} || ret=1
-env HOME=`pwd` $DIG @10.53.0.4 -p 5300 . A > dig.out.2.${n} || ret=1
-env HOME=`pwd` $DIG @10.53.0.4 -p 5300 -x 127.0.0.1 > dig.out.3.${n} || ret=1
+env HOME=`pwd` $DIG $DIGOPTS @10.53.0.4 . > dig.out.1.${n} || ret=1
+env HOME=`pwd` $DIG $DIGOPTS @10.53.0.4 . A > dig.out.2.${n} || ret=1
+env HOME=`pwd` $DIG $DIGOPTS @10.53.0.4 -x 127.0.0.1 > dig.out.3.${n} || ret=1
 grep ';\..*IN.*AAAA$' dig.out.1.${n} > /dev/null || ret=1
 grep ';\..*IN.*A$' dig.out.2.${n} > /dev/null || ret=1
 grep 'extra type option' dig.out.2.${n} > /dev/null && ret=1
 grep ';1\.0\.0\.127\.in-addr\.arpa\..*IN.*PTR$' dig.out.3.${n} > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:check that CNAME nameserver is logged correctly (${n})"
+echo_i "check that CNAME nameserver is logged correctly (${n})"
 ret=0
-$DIG soa all-cnames @10.53.0.5 -p 5300 > dig.out.ns5.test${n} || ret=1
+$DIG $DIGOPTS soa all-cnames @10.53.0.5 > dig.out.ns5.test${n} || ret=1
 grep "status: SERVFAIL" dig.out.ns5.test${n} > /dev/null || ret=1
 grep "skipping nameserver 'cname.tld' because it is a CNAME, while resolving 'all-cnames/SOA'" ns5/named.run > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:check that SOA query returns data for delegation-only apex (${n})"
+echo_i "check that SOA query returns data for delegation-only apex (${n})"
 ret=0
-$DIG soa delegation-only @10.53.0.5 -p 5300 > dig.out.ns5.test${n} || ret=1
+$DIG $DIGOPTS soa delegation-only @10.53.0.5 > dig.out.ns5.test${n} || ret=1
 grep "status: NOERROR" dig.out.ns5.test${n} > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns5.test${n} > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 n=`expr $n + 1`
 
 n=`expr $n + 1`
-echo "I:check that NS query returns data for delegation-only apex (${n})"
+echo_i "check that NS query returns data for delegation-only apex (${n})"
 ret=0
-$DIG ns delegation-only @10.53.0.5 -p 5300 > dig.out.ns5.test${n} || ret=1
+$DIG $DIGOPTS ns delegation-only @10.53.0.5 > dig.out.ns5.test${n} || ret=1
 grep "status: NOERROR" dig.out.ns5.test${n} > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns5.test${n} > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:check that A query returns data for delegation-only A apex (${n})"
+echo_i "check that A query returns data for delegation-only A apex (${n})"
 ret=0
-$DIG a delegation-only @10.53.0.5 -p 5300 > dig.out.ns5.test${n} || ret=1
+$DIG $DIGOPTS a delegation-only @10.53.0.5 > dig.out.ns5.test${n} || ret=1
 grep "status: NOERROR" dig.out.ns5.test${n} > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns5.test${n} > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:check that CDS query returns data for delegation-only apex (${n})"
+echo_i "check that CDS query returns data for delegation-only apex (${n})"
 ret=0
-$DIG cds delegation-only @10.53.0.5 -p 5300 > dig.out.ns5.test${n} || ret=1
+$DIG $DIGOPTS cds delegation-only @10.53.0.5 > dig.out.ns5.test${n} || ret=1
 grep "status: NOERROR" dig.out.ns5.test${n} > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns5.test${n} > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:check that AAAA query returns data for delegation-only AAAA apex (${n})"
+echo_i "check that AAAA query returns data for delegation-only AAAA apex (${n})"
 ret=0
-$DIG a delegation-only @10.53.0.5 -p 5300 > dig.out.ns5.test${n} || ret=1
+$DIG $DIGOPTS a delegation-only @10.53.0.5 > dig.out.ns5.test${n} || ret=1
 grep "status: NOERROR" dig.out.ns5.test${n} > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns5.test${n} > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 n=`expr $n + 1`
 
-echo "I:check that DNSKEY query returns data for delegation-only apex (${n})"
+echo_i "check that DNSKEY query returns data for delegation-only apex (${n})"
 ret=0
-$DIG dnskey delegation-only @10.53.0.5 -p 5300 > dig.out.ns5.test${n} || ret=1
+$DIG $DIGOPTS dnskey delegation-only @10.53.0.5 > dig.out.ns5.test${n} || ret=1
 grep "status: NOERROR" dig.out.ns5.test${n} > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns5.test${n} > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:check that CDNSKEY query returns data for delegation-only apex (${n})"
+echo_i "check that CDNSKEY query returns data for delegation-only apex (${n})"
 ret=0
-$DIG cdnskey delegation-only @10.53.0.5 -p 5300 > dig.out.ns5.test${n} || ret=1
+$DIG $DIGOPTS cdnskey delegation-only @10.53.0.5 > dig.out.ns5.test${n} || ret=1
 grep "status: NOERROR" dig.out.ns5.test${n} > /dev/null || ret=1
 grep "ANSWER: 1," dig.out.ns5.test${n} > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:check that NXDOMAIN is returned for delegation-only non-apex A data (${n})"
+echo_i "check that NXDOMAIN is returned for delegation-only non-apex A data (${n})"
 ret=0
-$DIG a a.delegation-only @10.53.0.5 -p 5300 > dig.out.ns5.test${n} || ret=1
+$DIG $DIGOPTS a a.delegation-only @10.53.0.5 > dig.out.ns5.test${n} || ret=1
 grep "status: NXDOMAIN" dig.out.ns5.test${n} > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:check that NXDOMAIN is returned for delegation-only non-apex CDS data (${n})"
+echo_i "check that NXDOMAIN is returned for delegation-only non-apex CDS data (${n})"
 ret=0
-$DIG cds cds.delegation-only @10.53.0.5 -p 5300 > dig.out.ns5.test${n} || ret=1
+$DIG $DIGOPTS cds cds.delegation-only @10.53.0.5 > dig.out.ns5.test${n} || ret=1
 grep "status: NXDOMAIN" dig.out.ns5.test${n} > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:check that NXDOMAIN is returned for delegation-only non-apex AAAA data (${n})"
+echo_i "check that NXDOMAIN is returned for delegation-only non-apex AAAA data (${n})"
 ret=0
-$DIG aaaa aaaa.delegation-only @10.53.0.5 -p 5300 > dig.out.ns5.test${n} || ret=1
+$DIG $DIGOPTS aaaa aaaa.delegation-only @10.53.0.5 > dig.out.ns5.test${n} || ret=1
 grep "status: NXDOMAIN" dig.out.ns5.test${n} > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 n=`expr $n + 1`
 
-echo "I:check that NXDOMAIN is returned for delegation-only non-apex CDNSKEY data (${n})"
+echo_i "check that NXDOMAIN is returned for delegation-only non-apex CDNSKEY data (${n})"
 ret=0
-$DIG cdnskey cdnskey.delegation-only @10.53.0.5 -p 5300 > dig.out.ns5.test${n} || ret=1
+$DIG $DIGOPTS cdnskey cdnskey.delegation-only @10.53.0.5 > dig.out.ns5.test${n} || ret=1
 grep "status: NXDOMAIN" dig.out.ns5.test${n} > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:check zero ttl not returned for learnt non zero ttl records (${n})"
+echo_i "check zero ttl not returned for learnt non zero ttl records (${n})"
 ret=0
 # use prefetch disabled server
-$DIG @10.53.0.7 -p 5300 non-zero.example.net txt > dig.out.1.${n} || ret=1
+$DIG $DIGOPTS @10.53.0.7 non-zero.example.net txt > dig.out.1.${n} || ret=1
 ttl1=`awk '/"A" "short" "ttl"/ { print $2 - 2 }' dig.out.1.${n}`
 # sleep so we are in expire range
 sleep ${ttl1:-0}
@@ -554,7 +559,7 @@ zerotonine="0 1 2 3 4 5 6 7 8 9"
 zerotonine="$zerotonine $zerotonine $zerotonine"
 for i in $zerotonine $zerotonine $zerotonine $zerotonine
 do
-       $DIG @10.53.0.7 -p 5300 non-zero.example.net txt > dig.out.2.${n} || ret=1
+       $DIG $DIGOPTS @10.53.0.7 non-zero.example.net txt > dig.out.2.${n} || ret=1
        ttl2=`awk '/"A" "short" "ttl"/ { print $2 }' dig.out.2.${n}`
        test ${ttl2:-1} -eq 0 && break
        test ${ttl2:-1} -ge ${ttl1:-0} && break
@@ -562,53 +567,53 @@ do
 done
 test ${ttl2:-1} -eq 0 && ret=1
 test ${ttl2:-1} -ge ${ttl1:-0} || break
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:check zero ttl is returned for learnt zero ttl records (${n})"
+echo_i "check zero ttl is returned for learnt zero ttl records (${n})"
 ret=0
-$DIG @10.53.0.7 -p 5300 zero.example.net txt > dig.out.1.${n} || ret=1
+$DIG $DIGOPTS @10.53.0.7 zero.example.net txt > dig.out.1.${n} || ret=1
 ttl=`awk '/"A" "zero" "ttl"/ { print $2 }' dig.out.1.${n}`
 test ${ttl:-1} -eq 0 || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:check that 'ad' in not returned in truncated answer with empty answer and authority sections to request with +ad (${n})"
+echo_i "check that 'ad' in not returned in truncated answer with empty answer and authority sections to request with +ad (${n})"
 ret=0
-$DIG @10.53.0.6 -p 5300 dnskey ds.example.net +bufsize=512 +ad +nodnssec +ignore +norec > dig.out.$n
+$DIG $DIGOPTS @10.53.0.6 dnskey ds.example.net +bufsize=512 +ad +nodnssec +ignore +norec > dig.out.$n
 grep "flags: qr aa tc; QUERY: 1, ANSWER: 0, AUTHORITY: 0" dig.out.$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:check that 'ad' in not returned in truncated answer with empty answer and authority sections to request with +dnssec (${n})"
+echo_i "check that 'ad' in not returned in truncated answer with empty answer and authority sections to request with +dnssec (${n})"
 ret=0
-$DIG @10.53.0.6 -p 5300 dnskey ds.example.net +bufsize=512 +noad +dnssec +ignore +norec > dig.out.$n
+$DIG $DIGOPTS @10.53.0.6 dnskey ds.example.net +bufsize=512 +noad +dnssec +ignore +norec > dig.out.$n
 grep "flags: qr aa tc; QUERY: 1, ANSWER: 0, AUTHORITY: 0" dig.out.$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: check that the resolver accepts a reply with empty question section with TC=1 and retries over TCP ($n)"
+echo_i "check that the resolver accepts a reply with empty question section with TC=1 and retries over TCP ($n)"
 ret=0
-$DIG @10.53.0.5 -p 5300 truncated.no-questions. a > dig.ns5.out.${n} || ret=1
+$DIG $DIGOPTS @10.53.0.5 truncated.no-questions. a > dig.ns5.out.${n} || ret=1
 grep "status: NOERROR" dig.ns5.out.${n} > /dev/null || ret=1
 grep "ANSWER: 1," dig.ns5.out.${n} > /dev/null || ret=1
 grep "1.2.3.4" dig.ns5.out.${n} > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: check that the resolver rejects a reply with empty question section with TC=0 ($n)"
+echo_i "check that the resolver rejects a reply with empty question section with TC=0 ($n)"
 ret=0
-$DIG @10.53.0.5 -p 5300 not-truncated.no-questions. a > dig.ns5.out.${n} || ret=1
+$DIG $DIGOPTS @10.53.0.5 not-truncated.no-questions. a > dig.ns5.out.${n} || ret=1
 grep "status: NOERROR" dig.ns5.out.${n} > /dev/null && ret=1
 grep "ANSWER: 1," dig.ns5.out.${n} > /dev/null && ret=1
 grep "1.2.3.4" dig.ns5.out.${n} > /dev/null && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
similarity index 89%
rename from bin/tests/system/rndc/ns2/named.conf
rename to bin/tests/system/rndc/ns2/named.conf.in
index 12d6f1475f2c74852979f2ce988a39ef50715a38..5694c6b171aa8d9a26bc1c9d1df45b10a53aa047 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.4 2011/06/10 01:32:37 each Exp $ */
-
-controls { /* empty */ };
-
 options {
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
         session-keyfile "session.key";
        listen-on { 10.53.0.2; };
@@ -38,7 +34,7 @@ key secondkey {
 };
 
 controls {
-       inet 10.53.0.2 port 9953 allow { any; } keys { rndc_key; secondkey; };
+       inet 10.53.0.2 port @CONTROLPORT@ allow { any; } keys { rndc_key; secondkey; };
 };
 
 
similarity index 90%
rename from bin/tests/system/rndc/ns3/named.conf
rename to bin/tests/system/rndc/ns3/named.conf.in
index 0b2db3bea096a94f6d04c10b63fc3fec38df844c..48a4f4c8d8fce965240bd4f4afe759b70ce2eb4c 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id$ */
-
-controls { /* empty */ };
-
 options {
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.3; };
        listen-on-v6 { none; };
@@ -37,7 +33,7 @@ key secondkey {
 };
 
 controls {
-       inet 10.53.0.3 port 9953 allow { any; } keys { rndc_key; secondkey; };
+       inet 10.53.0.3 port @CONTROLPORT@ allow { any; } keys { rndc_key; secondkey; };
 };
 
 
index 0137026354003bd391736af60433ba7fc8b451b2..a2e5dee8dde0701a720a7db85535e1d408c68fff 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-controls { /* empty */ };
-
 options {
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.4; };
        listen-on-v6 { none; };
index e0283871b3aeb4483c7b7fe3e1ad223c58f6ffac..8663e763bc8622946bd32a7114241a82230e2329 100644 (file)
@@ -22,3 +22,7 @@ $SHELL clean.sh
 $SHELL ../genzone.sh 2 >ns2/nil.db
 $SHELL ../genzone.sh 2 >ns2/other.db
 $SHELL ../genzone.sh 2 >ns2/static.db
+
+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
index 530ab88533eb0f51e167514746781750831b79ce..130458b4a1aadd3d5bdb06bffc9fe643f3dcba26 100644 (file)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: tests.sh,v 1.4 2011/06/10 01:32:37 each Exp $
-
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
 DIGOPTS="+tcp +noadd +nosea +nostat +noquest +nocomm +nocmd"
-DIGCMD="$DIG $DIGOPTS @10.53.0.2 -p 5300"
-RNDCCMD="$RNDC -s 10.53.0.2 -p 9953 -c ../common/rndc.conf"
+DIGCMD="$DIG $DIGOPTS @10.53.0.2 -p ${PORT}"
+RNDCCMD="$RNDC -p ${CONTROLPORT} -c ../common/rndc.conf -s"
 
 status=0
 n=0
 
 n=`expr $n + 1`
-echo "I:preparing ($n)"
+echo_i "preparing ($n)"
 ret=0
-$NSUPDATE -p 5300 -k ns2/session.key > /dev/null 2>&1 <<END || ret=1
+$NSUPDATE -p ${PORT} -k ns2/session.key > /dev/null 2>&1 <<END || ret=1
 server 10.53.0.2
 zone nil.
 update add text1.nil. 600 IN TXT "addition 1"
@@ -39,19 +37,19 @@ update add text1.other. 600 IN TXT "addition 1"
 send
 END
 [ -s ns2/nil.db.jnl ] || {
-       echo "I: 'test -s ns2/nil.db.jnl' failed when it shouldn't have"; ret=1;
+       echo_i "'test -s ns2/nil.db.jnl' failed when it shouldn't have"; ret=1;
 }
 [ -s ns2/other.db.jnl ] || {
-       echo "I: 'test -s ns2/other.db.jnl' failed when it shouldn't have"; ret=1;
+       echo_i "'test -s ns2/other.db.jnl' failed when it shouldn't have"; ret=1;
 }
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:rndc freeze"
-$RNDCCMD freeze | sed 's/^/I:ns2 /'
+echo_i "rndc freeze"
+$RNDCCMD 10.53.0.2 freeze | sed 's/^/ns2 /' | cat_i | cat_i
 
 n=`expr $n + 1`
-echo "I:checking zone was dumped ($n)"
+echo_i "checking zone was dumped ($n)"
 ret=0
 for i in 1 2 3 4 5 6 7 8 9 10
 do
@@ -59,22 +57,22 @@ do
        sleep 1
 done
 grep "addition 1" ns2/nil.db > /dev/null 2>&1 || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking journal file is still present ($n)"
+echo_i "checking journal file is still present ($n)"
 ret=0
 [ -s ns2/nil.db.jnl ] || {
-       echo "I: 'test -s ns2/nil.db.jnl' failed when it shouldn't have"; ret=1;
+       echo_i "'test -s ns2/nil.db.jnl' failed when it shouldn't have"; ret=1;
 }
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking zone not writable ($n)"
+echo_i "checking zone not writable ($n)"
 ret=0
-$NSUPDATE -p 5300 -k ns2/session.key > /dev/null 2>&1 <<END && ret=1
+$NSUPDATE -p ${PORT} -k ns2/session.key > /dev/null 2>&1 <<END && ret=1
 server 10.53.0.2
 zone nil.
 update add text2.nil. 600 IN TXT "addition 2"
@@ -83,16 +81,16 @@ END
 
 $DIGCMD text2.nil. TXT > dig.out.1.test$n
 grep 'addition 2' dig.out.1.test$n >/dev/null && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:rndc thaw"
-$RNDCCMD thaw | sed 's/^/I:ns2 /'
+echo_i "rndc thaw"
+$RNDCCMD 10.53.0.2 thaw | sed 's/^/ns2 /' | cat_i
 
 n=`expr $n + 1`
-echo "I:checking zone now writable ($n)"
+echo_i "checking zone now writable ($n)"
 ret=0
-$NSUPDATE -p 5300 -k ns2/session.key > nsupdate.out.1.test$n 2>&1 <<END || ret=1
+$NSUPDATE -p ${PORT} -k ns2/session.key > nsupdate.out.1.test$n 2>&1 <<END || ret=1
 server 10.53.0.2
 zone nil.
 update add text3.nil. 600 IN TXT "addition 3"
@@ -100,15 +98,15 @@ send
 END
 $DIGCMD text3.nil. TXT > dig.out.1.test$n
 grep 'addition 3' dig.out.1.test$n >/dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:rndc sync"
+echo_i "rndc sync"
 ret=0
-$RNDCCMD sync nil | sed 's/^/I:ns2 /'
+$RNDCCMD 10.53.0.2 sync nil | sed 's/^/ns2 /' | cat_i
 
 n=`expr $n + 1`
-echo "I:checking zone was dumped ($n)"
+echo_i "checking zone was dumped ($n)"
 ret=0
 for i in 1 2 3 4 5 6 7 8 9 10
 do
@@ -116,22 +114,22 @@ do
        sleep 1
 done
 grep "addition 3" ns2/nil.db > /dev/null 2>&1 || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking journal file is still present ($n)"
+echo_i "checking journal file is still present ($n)"
 ret=0
 [ -s ns2/nil.db.jnl ] || {
-       echo "I: 'test -s ns2/nil.db.jnl' failed when it shouldn't have"; ret=1;
+       echo_i "'test -s ns2/nil.db.jnl' failed when it shouldn't have"; ret=1;
 }
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking zone is still writable ($n)"
+echo_i "checking zone is still writable ($n)"
 ret=0
-$NSUPDATE -p 5300 -k ns2/session.key > nsupdate.out.1.test$n 2>&1 <<END || ret=1
+$NSUPDATE -p ${PORT} -k ns2/session.key > nsupdate.out.1.test$n 2>&1 <<END || ret=1
 server 10.53.0.2
 zone nil.
 update add text4.nil. 600 IN TXT "addition 4"
@@ -140,15 +138,15 @@ END
 
 $DIGCMD text4.nil. TXT > dig.out.1.test$n
 grep 'addition 4' dig.out.1.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:rndc sync -clean"
+echo_i "rndc sync -clean"
 ret=0
-$RNDCCMD sync -clean nil | sed 's/^/I:ns2 /'
+$RNDCCMD 10.53.0.2 sync -clean nil | sed 's/^/ns2 /' | cat_i
 
 n=`expr $n + 1`
-echo "I:checking zone was dumped ($n)"
+echo_i "checking zone was dumped ($n)"
 ret=0
 for i in 1 2 3 4 5 6 7 8 9 10
 do
@@ -156,22 +154,22 @@ do
        sleep 1
 done
 grep "addition 4" ns2/nil.db > /dev/null 2>&1 || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking journal file is deleted ($n)"
+echo_i "checking journal file is deleted ($n)"
 ret=0
 [ -s ns2/nil.db.jnl ] && {
-       echo "I: 'test -s ns2/nil.db.jnl' failed when it shouldn't have"; ret=1;
+       echo_i "'test -s ns2/nil.db.jnl' failed when it shouldn't have"; ret=1;
 }
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking zone is still writable ($n)"
+echo_i "checking zone is still writable ($n)"
 ret=0
-$NSUPDATE -p 5300 -k ns2/session.key > /dev/null 2>&1 <<END || ret=1
+$NSUPDATE -p ${PORT} -k ns2/session.key > /dev/null 2>&1 <<END || ret=1
 server 10.53.0.2
 zone nil.
 update add text5.nil. 600 IN TXT "addition 5"
@@ -180,55 +178,55 @@ END
 
 $DIGCMD text4.nil. TXT > dig.out.1.test$n
 grep 'addition 4' dig.out.1.test$n >/dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking other journal files not removed ($n)"
+echo_i "checking other journal files not removed ($n)"
 ret=0
 [ -s ns2/other.db.jnl ] || {
-       echo "I: 'test -s ns2/other.db.jnl' failed when it shouldn't have"; ret=1;
+       echo_i "'test -s ns2/other.db.jnl' failed when it shouldn't have"; ret=1;
 }
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:cleaning all zones"
-$RNDCCMD sync -clean | sed 's/^/I:ns2 /'
+echo_i "cleaning all zones"
+$RNDCCMD 10.53.0.2 sync -clean | sed 's/^/ns2 /' | cat_i
 
 n=`expr $n + 1`
-echo "I:checking all journals removed ($n)"
+echo_i "checking all journals removed ($n)"
 ret=0
 [ -s ns2/nil.db.jnl ] && {
-       echo "I: 'test -s ns2/nil.db.jnl' succeeded when it shouldn't have"; ret=1;
+       echo_i "'test -s ns2/nil.db.jnl' succeeded when it shouldn't have"; ret=1;
 }
 [ -s ns2/other.db.jnl ] && {
-       echo "I: 'test -s ns2/other.db.jnl' succeeded when it shouldn't have"; ret=1;
+       echo_i "'test -s ns2/other.db.jnl' succeeded when it shouldn't have"; ret=1;
 }
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that freezing static zones is not allowed ($n)"
+echo_i "checking that freezing static zones is not allowed ($n)"
 ret=0
-$RNDCCMD freeze static > rndc.out.1.test$n 2>&1
+$RNDCCMD 10.53.0.2 freeze static > rndc.out.1.test$n 2>&1
 grep 'not dynamic' rndc.out.1.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that journal is removed when serial is changed before thaw ($n)"
+echo_i "checking that journal is removed when serial is changed before thaw ($n)"
 ret=0
 sleep 1
-$NSUPDATE -p 5300 -k ns2/session.key > nsupdate.out.1.test$n 2>&1 <<END || ret=1
+$NSUPDATE -p ${PORT} -k ns2/session.key > nsupdate.out.1.test$n 2>&1 <<END || ret=1
 server 10.53.0.2
 zone other.
 update add text6.other. 600 IN TXT "addition 6"
 send
 END
 [ -s ns2/other.db.jnl ] || {
-       echo "I: 'test -s ns2/other.db.jnl' failed when it shouldn't have"; ret=1;
+       echo_i "'test -s ns2/other.db.jnl' failed when it shouldn't have"; ret=1;
 }
-$RNDCCMD freeze other 2>&1 | sed 's/^/I:ns2 /'
+$RNDCCMD 10.53.0.2 freeze other 2>&1 | sed 's/^/ns2 /' | cat_i
 for i in 1 2 3 4 5 6 7 8 9 10
 do
        grep "addition 6" ns2/other.db > /dev/null && break
@@ -239,12 +237,12 @@ newserial=`expr $serial + 1`
 sed s/$serial/$newserial/ ns2/other.db > ns2/other.db.new
 echo 'frozen TXT "frozen addition"' >> ns2/other.db.new
 mv -f ns2/other.db.new ns2/other.db
-$RNDCCMD thaw 2>&1 | sed 's/^/I:ns2 /'
+$RNDCCMD 10.53.0.2 thaw 2>&1 | sed 's/^/ns2 /' | cat_i
 sleep 1
 [ -f ns2/other.db.jnl ] && {
-       echo "I: 'test -f ns2/other.db.jnl' succeeded when it shouldn't have"; ret=1;
+       echo_i "'test -f ns2/other.db.jnl' succeeded when it shouldn't have"; ret=1;
 }
-$NSUPDATE -p 5300 -k ns2/session.key > nsupdate.out.2.test$n 2>&1 <<END || ret=1
+$NSUPDATE -p ${PORT} -k ns2/session.key > nsupdate.out.2.test$n 2>&1 <<END || ret=1
 server 10.53.0.2
 zone other.
 update add text7.other. 600 IN TXT "addition 7"
@@ -256,22 +254,22 @@ $DIGCMD text7.other. TXT > dig.out.2.test$n
 grep 'addition 7' dig.out.2.test$n >/dev/null || ret=1
 $DIGCMD frozen.other. TXT > dig.out.3.test$n
 grep 'frozen addition' dig.out.3.test$n >/dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking that journal is kept when ixfr-from-differences is in use ($n)"
+echo_i "checking that journal is kept when ixfr-from-differences is in use ($n)"
 ret=0
-$NSUPDATE -p 5300 -k ns2/session.key > nsupdate.out.1.test$n 2>&1 <<END || ret=1
+$NSUPDATE -p ${PORT} -k ns2/session.key > nsupdate.out.1.test$n 2>&1 <<END || ret=1
 server 10.53.0.2
 zone nil.
 update add text6.nil. 600 IN TXT "addition 6"
 send
 END
 [ -s ns2/nil.db.jnl ] || {
-       echo "I: 'test -s ns2/nil.db.jnl' failed when it shouldn't have"; ret=1;
+       echo_i "'test -s ns2/nil.db.jnl' failed when it shouldn't have"; ret=1;
 }
-$RNDCCMD freeze nil 2>&1 | sed 's/^/I:ns2 /'
+$RNDCCMD 10.53.0.2 freeze nil 2>&1 | sed 's/^/ns2 /' | cat_i
 for i in 1 2 3 4 5 6 7 8 9 10
 do
        grep "addition 6" ns2/nil.db > /dev/null && break
@@ -282,12 +280,12 @@ newserial=`expr $serial + 1`
 sed s/$serial/$newserial/ ns2/nil.db > ns2/nil.db.new
 echo 'frozen TXT "frozen addition"' >> ns2/nil.db.new
 mv -f ns2/nil.db.new ns2/nil.db
-$RNDCCMD thaw 2>&1 | sed 's/^/I:ns2 /'
+$RNDCCMD 10.53.0.2 thaw 2>&1 | sed 's/^/ns2 /' | cat_i
 sleep 1
 [ -s ns2/nil.db.jnl ] || {
-       echo "I: 'test -s ns2/nil.db.jnl' failed when it shouldn't have"; ret=1;
+       echo_i "'test -s ns2/nil.db.jnl' failed when it shouldn't have"; ret=1;
 }
-$NSUPDATE -p 5300 -k ns2/session.key > nsupdate.out.2.test$n 2>&1 <<END || ret=1
+$NSUPDATE -p ${PORT} -k ns2/session.key > nsupdate.out.2.test$n 2>&1 <<END || ret=1
 server 10.53.0.2
 zone nil.
 update add text7.nil. 600 IN TXT "addition 7"
@@ -299,20 +297,20 @@ $DIGCMD text7.nil. TXT > dig.out.2.test$n
 grep 'addition 7' dig.out.2.test$n > /dev/null || ret=1
 $DIGCMD frozen.nil. TXT > dig.out.3.test$n
 grep 'frozen addition' dig.out.3.test$n >/dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:test using second key ($n)"
+echo_i "test using second key ($n)"
 ret=0
-$RNDC -s 10.53.0.2 -p 9953 -c ns2/secondkey.conf status > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+$RNDC -s 10.53.0.2 -p ${CONTROLPORT} -c ns2/secondkey.conf status > /dev/null || ret=1
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:test 'rndc dumpdb' on a empty cache ($n)"
+echo_i "test 'rndc dumpdb' on a empty cache ($n)"
 ret=0
-$RNDC -s 10.53.0.3 -p 9953 -c ../common/rndc.conf dumpdb > /dev/null || ret=1
+$RNDCCMD 10.53.0.3 dumpdb > /dev/null || ret=1
 for i in 1 2 3 4 5 6 7 8 9
 do
        tmp=0
@@ -321,80 +319,80 @@ do
        sleep 1
 done
 [ $tmp -eq 1 ] && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:testing rndc with null command ($n)"
+echo_i "testing rndc with null command ($n)"
 ret=0
-$RNDC -s 10.53.0.3 -p 9953 -c ../common/rndc.conf null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+$RNDCCMD 10.53.0.3 null || ret=1
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:testing rndc with unknown control channel command ($n)"
+echo_i "testing rndc with unknown control channel command ($n)"
 ret=0
-$RNDC -s 10.53.0.3 -p 9953 -c ../common/rndc.conf obviouslynotacommand >/dev/null 2>&1 && ret=1
+$RNDCCMD 10.53.0.3 obviouslynotacommand >/dev/null 2>&1 && ret=1
 # rndc: 'obviouslynotacommand' failed: unknown command
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:testing rndc with querylog command ($n)"
+echo_i "testing rndc with querylog command ($n)"
 ret=0
 # first enable it with querylog on option
-$RNDC -s 10.53.0.3 -p 9953 -c ../common/rndc.conf querylog on >/dev/null 2>&1 || ret=1
+$RNDCCMD 10.53.0.3 querylog on >/dev/null 2>&1 || ret=1
 grep "query logging is now on" ns3/named.run > /dev/null || ret=1
 # query for builtin and check if query was logged
-$DIG @10.53.0.3 -p 5300 -c ch -t txt foo12345.bind > /dev/null || ret=1
+$DIG $DIGOPTS @10.53.0.3 -c ch -t txt foo12345.bind > /dev/null || ret=1
 # toggle query logging and check again
-$RNDC -s 10.53.0.3 -p 9953 -c ../common/rndc.conf querylog >/dev/null 2>&1 || ret=1
+$RNDCCMD 10.53.0.3 querylog >/dev/null 2>&1 || ret=1
 grep "query logging is now off" ns3/named.run > /dev/null || ret=1
 # query for another builtin zone and check if query was logged
-$DIG @10.53.0.3 -p 5300 -c ch -t txt foo9876.bind > /dev/null || ret=1
+$DIG $DIGOPTS @10.53.0.3 -c ch -t txt foo9876.bind > /dev/null || ret=1
 grep "query: foo9876.bind CH TXT" ns3/named.run > /dev/null && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:testing rndc with a token containing a space ($n)"
+echo_i "testing rndc with a token containing a space ($n)"
 ret=0
-$RNDC -s 10.53.0.4 -p 9953 -c ../common/rndc.conf flush '"view with a space"' 2>&1 > rndc.out.1.test$n || ret=1
+$RNDCCMD 10.53.0.4 flush '"view with a space"' 2>&1 > rndc.out.1.test$n || ret=1
 grep "not found" rndc.out.1.test$n > /dev/null && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:test 'rndc reconfig' with a broken config ($n)"
+echo_i "test 'rndc reconfig' with a broken config ($n)"
 ret=0
-$RNDC -s 10.53.0.3 -p 9953 -c ../common/rndc.conf reconfig > /dev/null || ret=1
+$RNDCCMD 10.53.0.3 reconfig > /dev/null || ret=1
 sleep 1
 mv ns3/named.conf ns3/named.conf.save
 echo "error error error" >> ns3/named.conf
-$RNDC -s 10.53.0.3 -p 9953 -c ../common/rndc.conf reconfig > rndc.out.1.test$n 2>&1 && ret=1
+$RNDCCMD 10.53.0.3 reconfig > rndc.out.1.test$n 2>&1 && ret=1
 grep "rndc: 'reconfig' failed: unexpected token" rndc.out.1.test$n > /dev/null || ret=1
 mv ns3/named.conf.save ns3/named.conf
 sleep 1
-$RNDC -s 10.53.0.3 -p 9953 -c ../common/rndc.conf reconfig > /dev/null || ret=1
+$RNDCCMD 10.53.0.3 reconfig > /dev/null || ret=1
 sleep 1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:verify that the full command is logged ($n)"
+echo_i "verify that the full command is logged ($n)"
 ret=0
-$RNDCCMD null with extra arguments > /dev/null 2>&1
+$RNDCCMD 10.53.0.2 null with extra arguments > /dev/null 2>&1
 grep "received control channel command 'null with extra arguments'" ns2/named.run > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:check 'rndc \"\"' is handled ($n)"
+echo_i "check 'rndc \"\"' is handled ($n)"
 ret=0
-$RNDCCMD "" > rndc.out.1.test$n 2>&1 && ret=1
+$RNDCCMD 10.53.0.2 "" > rndc.out.1.test$n 2>&1 && ret=1
 grep "rndc: '' failed: failure" rndc.out.1.test$n > /dev/null
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index 3a83ff2ff612ab2e2162f3039a249fb3f587406d..1d573f909ef0d88fe54465c5db9268ecad8ac2a8 100644 (file)
@@ -19,3 +19,5 @@ rm -f ns*/*.key ns*/*.private ns2/tld2s.db ns2/bl.tld2.db
 rm -f ns3/bl*.db ns*/*switch ns5/requests ns5/example.db ns5/bl.db ns5/*.perf
 rm -f */named.memstats */named.run */named.stats */session.key
 rm -f */*.jnl */*.core */*.pid
+rm -f ns*/named.conf
+rm -f tmp
similarity index 95%
rename from bin/tests/system/rpz/ns1/named.conf
rename to bin/tests/system/rpz/ns1/named.conf.in
index 9e627739ea24674218cb91c0252345c449c69f6e..edf799ec7536a59a6da62ff461c9e6c7cf6ae19b 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id$ */
-
-
-controls { /* empty */ };
-
 options {
        query-source address 10.53.0.1;
        notify-source 10.53.0.1;
        transfer-source 10.53.0.1;
-       port 5300;
+       port @PORT@;
        session-keyfile "session.key";
        pid-file "named.pid";
        listen-on { 10.53.0.1; };
similarity index 93%
rename from bin/tests/system/rpz/ns2/named.conf
rename to bin/tests/system/rpz/ns2/named.conf.in
index 65013bc333fc3cee279575cbf0f08f4f51a9a9ce..1ee9a9c67a3f0a219c234ef5eb4cab5d0508b6b6 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id$ */
-
-
-
-controls { /* empty */ };
-
 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";
        session-keyfile "session.key";
        listen-on { 10.53.0.2; };
@@ -37,7 +31,7 @@ key rndc_key {
        algorithm hmac-sha256;
 };
 controls {
-       inet 10.53.0.2 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.2 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 include "../trusted.conf";
similarity index 97%
rename from bin/tests/system/rpz/ns3/named.conf
rename to bin/tests/system/rpz/ns3/named.conf.in
index 4553b9706730b1f14a4f0995ec1bff620c66cb01..9b5b2a63b82d9bc874a6068ab8696f9e0c4847aa 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id$ */
-
-
-
 /*
  * Main rpz test DNS server.
  */
@@ -26,7 +22,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";
        statistics-file "named.stats";
        session-keyfile "session.key";
@@ -55,7 +51,7 @@ key rndc_key {
        algorithm hmac-md5;
 };
 controls {
-       inet 10.53.0.3 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.3 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 
similarity index 96%
rename from bin/tests/system/rpz/ns4/named.conf
rename to bin/tests/system/rpz/ns4/named.conf.in
index 174e7466f764c4f874ae81dab46bdbe0a10c423c..4a8285a732f2c43e46ea0bf9b06704bf60396d0b 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id$ */
-
-
-controls { /* empty */ };
-
 options {
        query-source address 10.53.0.4;
        notify-source 10.53.0.4;
        transfer-source 10.53.0.4;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        session-keyfile "session.key";
        listen-on { 10.53.0.4; };
similarity index 94%
rename from bin/tests/system/rpz/ns5/named.conf
rename to bin/tests/system/rpz/ns5/named.conf.in
index 82b6fdedf485d826c45d40cee8ea2880a17cface..dcfd9622990e4592f19f19d0dcf3858320d69c68 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id$ */
-
-
-
 /*
  * Test rpz performance.
  */
@@ -26,7 +22,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";
        session-keyfile "session.key";
@@ -43,10 +39,9 @@ key rndc_key {
        algorithm hmac-md5;
 };
 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; };
 };
 
-
 include "../trusted.conf";
 zone "."               {type hint; file "hints"; };
 
similarity index 93%
rename from bin/tests/system/rpz/ns6/named.conf
rename to bin/tests/system/rpz/ns6/named.conf.in
index 5c9530b82dabe97a43751e9413d893d0c0adce45..b15e0424d9a82edc1e89019fe9ab48d1b6b2c132 100644 (file)
@@ -18,7 +18,7 @@ options {
        query-source address 10.53.0.6;
        notify-source 10.53.0.6;
        transfer-source 10.53.0.6;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        statistics-file "named.stats";
        session-keyfile "session.key";
@@ -35,7 +35,7 @@ key rndc_key {
 };
 
 controls {
-       inet 10.53.0.6 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.6 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 include "../trusted.conf";
index 65a468a1853f0cf41987153296eba4dab1a6646c..74a44f1c2386a4b519f692e13392c775c145eda2 100644 (file)
@@ -23,6 +23,13 @@ QPERF=`$SHELL qperf.sh`
 
 $SHELL clean.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
+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
+
 # set up test policy zones.  bl-2 is used to check competing zones.
 #      bl-{given,disabled,passthru,no-data,nxdomain,cname,wildcard,garden}
 #      are used to check policy overrides in named.conf.
index 95c1c0b149f4d1d6593ce4a416fa2852c6d6c2b8..ead4c5c4dc703a3e67ec70a71dfd3d62e13d677a 100644 (file)
@@ -19,7 +19,7 @@
 ; Separate update requests for distinct TLDs with blank lines or 'send'
 ; End the file with a blank line or 'send'
 
-server 10.53.0.3 5300
+server 10.53.0.3 @PORT@
 
 ; QNAME tests
 
index ff231fa980cae51668ac46e8d2e986b0bdadb083..44ac6ab65d137ddf8f4e5a060ff5a8a889fc1217 100644 (file)
@@ -22,7 +22,7 @@
 
 ; IP tests
 
-server 10.53.0.3 5300
+server 10.53.0.3 @PORT@
 
 ; NODATA a3-1.tld2
 ;      1
index 75cb8c95993a7a7af4add4b3c7f15e3811ace3e3..dce3fd2ebf11da4db9a871c7e11778855f261d39 100644 (file)
@@ -21,7 +21,7 @@
 
 ; NSDNAME tests
 
-server 10.53.0.3 5300
+server 10.53.0.3 @PORT@
 
 ;      3, 4, 5
 ; NXDOMAIN for *.sub1.tld2 by NSDNAME
index 3140ee6349d3c5573e8bc4619d410065cca38edb..5b4624bf627b41992e800361cb717e6d8b47c376 100644 (file)
@@ -21,7 +21,7 @@
 
 ; NSIP tests
 
-server 10.53.0.3 5300
+server 10.53.0.3 @PORT@
 
 ; NXDOMAIN for all of tld2 based on its server IP address
 update add  32.2.0.53.10.rpz-nsip.bl.  300 CNAME .
index f014978fd2eb9e5714223df48aff9c437b0bd812..d63371ff6a01d22b82b5d3ef831bd0e6570bced5 100644 (file)
@@ -21,7 +21,7 @@
 
 ; walled-garden NSIP tests
 
-server 10.53.0.3 5300
+server 10.53.0.3 @PORT@
 
 ; rewrite all of tld2 based on its server IP address
 update add  32.2.0.53.10.rpz-nsip.bl.  300 A       41.41.41.41
index 42dbac8ba422597f597ce062b393ddd0111c0da8..25dc2487bae58100f06fb848011196d67765a5fc 100644 (file)
@@ -21,7 +21,7 @@
 
 ; the policies or replacements specified in ns3/named.conf override these
 
-server 10.53.0.3 5300
+server 10.53.0.3 @PORT@
 
 ;      1
 update add  a3-1.tld2.bl-given.            300 A 127.0.0.1
index aff0c25f519c09ce1620ff999a805f415ceeb922..728a48969d9bf968902d2c5b82b7bcbca35e52a3 100644 (file)
@@ -12,9 +12,6 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id$
-
-
 # test response policy zones (RPZ)
 
 SYSTEMTESTTOP=..
@@ -51,21 +48,21 @@ TS='%H:%M:%S '
 TS=
 comment () {
     if test -n "$TS"; then
-       date "+I:${TS}$*"
+       date "+${TS}$*" | cat_i
     fi
 }
 
-RNDCCMD="$RNDC -c $SYSTEMTESTTOP/common/rndc.conf -p 9953 -s"
+RNDCCMD="$RNDC -c $SYSTEMTESTTOP/common/rndc.conf -p ${CONTROLPORT} -s"
 
 digcmd () {
     # Default to +noauth and @$ns3
     # Also default to -bX where X is the @value so that OS X will choose
     #      the right IP source address.
-    digcmd_args=`echo "+noadd +time=2 +tries=1 -p 5300 $*" |   \
+    digcmd_args=`echo "+noadd +time=2 +tries=1 -p ${PORT} $*" |   \
           sed -e "/@/!s/.*/& @$ns3/"                          \
               -e '/-b/!s/@\([^ ]*\)/@\1 -b\1/'                \
               -e '/+n?o?auth/!s/.*/+noauth &/'`
-    #echo I:dig $digcmd_args 1>&2
+    #echo_i "dig $digcmd_args 1>&2
     $DIG $digcmd_args
 }
 
@@ -84,14 +81,14 @@ make_dignm () {
 setret () {
     ret=1
     status=`expr $status + 1`
-    echo "$*"
+    echo_i "$*"
 }
 
 # (re)load the reponse policy zones with the rules in the file $TEST_FILE
 load_db () {
     if test -n "$TEST_FILE"; then
        $NSUPDATE -v $TEST_FILE || {
-           echo "I:failed to update policy zone with $TEST_FILE"
+           echo_i "failed to update policy zone with $TEST_FILE"
            exit 1
        }
     fi
@@ -106,7 +103,7 @@ restart () {
            sleep 1
            PID=`cat ns$1/named.pid 2>/dev/null`
            if test -n "$PID"; then
-               echo "I:killing ns$1 server $PID"
+               echo_i "killing ns$1 server $PID"
                kill -9 $PID
            fi
        fi
@@ -117,7 +114,7 @@ restart () {
            cp -f ns$1/base.db $NM
        done
     fi
-    $PERL $SYSTEMTESTTOP/start.pl --noclean --restart . ns$1
+    $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . ns$1
     load_db
 }
 
@@ -151,7 +148,8 @@ ckstats () {
 # $1=message  $2=optional test file name
 start_group () {
     ret=0
-    test -n "$1" && date "+I:${TS}checking $1"
+    t=`expr $t + 1`
+    test -n "$1" && date "+${TS}checking $1 (${t})" | cat_i
     TEST_FILE=$2
     if test -n "$TEST_FILE"; then
        GROUP_NM="-$TEST_FILE"
@@ -165,10 +163,12 @@ start_group () {
 end_group () {
     if test -n "$TEST_FILE"; then
        # remove the previous set of test rules
-       sed -e 's/[      ]add[   ]/ delete /' $TEST_FILE | $NSUPDATE
+        copy_setports $TEST_FILE tmp
+       sed -e 's/[      ]add[   ]/ delete /' tmp | $NSUPDATE
+        rm -f tmp
        TEST_FILE=
     fi
-    ckalive $ns3 "I:failed; ns3 server crashed and restarted"
+    ckalive $ns3 "failed; ns3 server crashed and restarted"
     GROUP_NM=
 }
 
@@ -180,17 +180,17 @@ clean_result () {
 
 # $1=dig args $2=other dig output file
 ckresult () {
-    #ckalive "$1" "I:server crashed by 'dig $1'" || return 1
+    #ckalive "$1" "server crashed by 'dig $1'" || return 1
     if grep "flags:.* aa .*ad;" $DIGNM; then
-       setret "I:'dig $1' AA and AD set;"
+       setret "'dig $1' AA and AD set;"
     elif grep "flags:.* aa .*ad;" $DIGNM; then
-       setret "I:'dig $1' AD set;"
+       setret "'dig $1' AD set;"
     fi
     if $PERL $SYSTEMTESTTOP/digcomp.pl $DIGNM $2 >/dev/null; then
        clean_result ${DIGNM}*
        return 0
     fi
-    setret "I:'dig $1' wrong; diff $DIGNM $2"
+    setret "'dig $1' wrong; diff $DIGNM $2"
     return 1
 }
 
@@ -198,7 +198,7 @@ ckresult () {
 # $1=target domain  $2=optional query type
 nocrash () {
     digcmd $* >/dev/null
-    ckalive "$*" "I:server crashed by 'dig $*'"
+    ckalive "$*" "server crashed by 'dig $*'"
 }
 
 
@@ -229,15 +229,15 @@ addr () {
     ADDR=$1
     make_dignm
     digcmd $2 >$DIGNM
-    #ckalive "$2" "I:server crashed by 'dig $2'" || return 1
+    #ckalive "$2" "server crashed by 'dig $2'" || return 1
     ADDR_ESC=`echo "$ADDR" | sed -e 's/\./\\\\./g'`
     ADDR_TTL=`sed -n -e "s/^[-.a-z0-9]\{1,\}   *\([0-9]*\)     IN      AA*     ${ADDR_ESC}\$/\1/p" $DIGNM`
     if test -z "$ADDR_TTL"; then
-       setret "I:'dig $2' wrong; no address $ADDR record in $DIGNM"
+       setret "'dig $2' wrong; no address $ADDR record in $DIGNM"
        return 1
     fi
     if test -n "$3" && test "$ADDR_TTL" -ne "$3"; then
-       setret "I:'dig $2' wrong; TTL=$ADDR_TTL instead of $3 in $DIGNM"
+       setret "'dig $2' wrong; TTL=$ADDR_TTL instead of $3 in $DIGNM"
        return 1
     fi
     clean_result ${DIGNM}*
@@ -355,7 +355,7 @@ $RNDCCMD 10.53.0.2 reload bl.tld2
 goodsoa="rpz.tld2. hostmaster.ns.tld2. 2 3600 1200 604800 60"
 for i in 0 1 2 3 4 5 6 7 8 9 10
 do
-       soa=`$DIG -p 5300 +short soa bl.tld2 @10.53.0.3 -b10.53.0.3`
+       soa=`$DIG -p ${PORT} +short soa bl.tld2 @10.53.0.3 -b10.53.0.3`
        test "$soa" = "$goodsoa" && break
        sleep 1
 done
@@ -366,7 +366,7 @@ goodsoa="rpz.tld2. hostmaster.ns.tld2. 3 3600 1200 604800 60"
 $RNDCCMD 10.53.0.2 reload bl.tld2
 for i in 0 1 2 3 4 5 6 7 8 9 10
 do
-       soa=`$DIG -p 5300 +short soa bl.tld2 @10.53.0.3 -b10.53.0.3`
+       soa=`$DIG -p ${PORT} +short soa bl.tld2 @10.53.0.3 -b10.53.0.3`
        test "$soa" = "$goodsoa" && break
        sleep 1
 done
@@ -407,7 +407,7 @@ if $FEATURETEST --rpz-nsdname; then
     end_group
     NS3_STATS=`expr $NS3_STATS + 7`
 else
-    echo "I:NSDNAME not checked; named configured with --disable-rpz-nsdname"
+    echo_i "NSDNAME not checked; named configured with --disable-rpz-nsdname"
 fi
 
 if $FEATURETEST --rpz-nsip; then
@@ -429,7 +429,7 @@ if $FEATURETEST --rpz-nsip; then
 #    end_group
     NS3_STATS=`expr $NS3_STATS + 1`
 else
-    echo "I:NSIP not checked; named configured with --disable-rpz-nsip"
+    echo_i "NSIP not checked; named configured with --disable-rpz-nsip"
 fi
 
 # policies in ./test5 overridden by response-policy{} in ns3/named.conf
@@ -479,20 +479,20 @@ end_group
 QPERF=`sh qperf.sh`
 if test -n "$QPERF"; then
     perf () {
-       date "+I:${TS}checking performance $1"
+       date "+${TS}checking performance $1" | cat_i
        # Dry run to prime everything
        comment "before dry run $1"
-       $QPERF -c -1 -l30 -d ns5/requests -s $ns5 -p 5300 >/dev/null
+       $QPERF -c -1 -l30 -d ns5/requests -s $ns5 -p ${PORT} >/dev/null
        comment "before real test $1"
        PFILE="ns5/$2.perf"
-       $QPERF -c -1 -l30 -d ns5/requests -s $ns5 -p 5300 >$PFILE
+       $QPERF -c -1 -l30 -d ns5/requests -s $ns5 -p ${PORT} >$PFILE
        comment "after test $1"
        X=`sed -n -e 's/.*Returned *\([^ ]*:\) *\([0-9]*\) .*/\1\2/p' $PFILE \
                | tr '\n' ' '`
        if test "$X" != "$3"; then
-           setret "I:wrong results '$X' in $PFILE"
+           setret "wrong results '$X' in $PFILE"
        fi
-       ckalive $ns5 "I:failed; server #5 crashed"
+       ckalive $ns5 "failed; server #5 crashed"
     }
     trim () {
        sed -n -e 's/.*Queries per second: *\([0-9]*\).*/\1/p' ns5/$1.perf
@@ -509,21 +509,20 @@ if test -n "$QPERF"; then
     NORPZ=`trim norpz`
 
     PERCENT=`expr \( "$RPZ" \* 100 + \( $NORPZ / 2 \) \) / $NORPZ`
-    echo "I:$RPZ qps with rpz is $PERCENT% of $NORPZ qps without rpz"
+    echo_i "$RPZ qps with rpz is $PERCENT% of $NORPZ qps without rpz"
 
     MIN_PERCENT=30
     if test "$PERCENT" -lt $MIN_PERCENT; then
-       echo "I:$RPZ qps with rpz or $PERCENT% is below $MIN_PERCENT% of $NORPZ qps"
+       echo_i "$RPZ qps with rpz or $PERCENT% is below $MIN_PERCENT% of $NORPZ qps"
     fi
 
     if test "$PERCENT" -ge 100; then
-       echo "I:$RPZ qps with RPZ or $PERCENT% of $NORPZ qps without RPZ is too high"
+       echo_i "$RPZ qps with RPZ or $PERCENT% of $NORPZ qps without RPZ is too high"
     fi
 
     ckstats $ns5 ns5 203
-
 else
-    echo "I:performance not checked; queryperf not available"
+    echo_i "performance not checked; queryperf not available"
 fi
 
 ckstats $ns3 ns3 82
@@ -533,24 +532,24 @@ if test -z "$HAVE_CORE"; then
     $PERL $SYSTEMTESTTOP/stop.pl . ns3
     restart 3
     HAVE_CORE=`find ns* -name '*core*' -print`
-    test -z "$HAVE_CORE" || setret "I:found $HAVE_CORE; memory leak?"
+    test -z "$HAVE_CORE" || setret "found $HAVE_CORE; memory leak?"
 fi
 
 # look for complaints from lib/dns/rpz.c and bin/name/query.c
 EMSGS=`egrep -l 'invalid rpz|rpz.*failed' ns*/named.run`
 if test -n "$EMSGS"; then
-    setret "I:error messages in $EMSGS starting with:"
-    egrep 'invalid rpz|rpz.*failed' ns*/named.run | sed -e '10,$d' -e 's/^/I:  /'
+    setret "error messages in $EMSGS starting with:"
+    egrep 'invalid rpz|rpz.*failed' ns*/named.run | sed -e '10,$d' | cat_i
 fi
 
-echo "I:checking that ttl values are not zeroed when qtype is '*'"
-$DIG +noall +answer -p 5300 @$ns3 any a3-2.tld2 > dig.out.any
+echo_i "checking that ttl values are not zeroed when qtype is '*'"
+$DIG +noall +answer -p ${PORT} @$ns3 any a3-2.tld2 > dig.out.any
 ttl=`awk '/a3-2 tld2 text/ {print $2}' dig.out.any`
-if test ${ttl:=0} -eq 0; then setret I:failed; fi
+if test ${ttl:=0} -eq 0; then setret "failed"; fi
 
-echo "I:checking rpz with delegation fails correctly"
-$DIG -p 5300 @$ns3 ns example.com > dig.out.delegation
+echo_i "checking rpz with delegation fails correctly"
+$DIG -p ${PORT} @$ns3 ns example.com > dig.out.delegation
 grep "status: SERVFAIL" dig.out.delegation > /dev/null || setret "I:failed"
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index e0b630299c79aa3eca4e59e3bf608e39cbbcd952..d66a6cca11bf404de0a9c2b8179e8467aa2cc68e 100644 (file)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-
-
 # Clean up after rrl tests.
 
 rm -f dig.out* *mdig.out*
 rm -f  */named.memstats */named.run */named.stats */log-* */session.key
 rm -f ns3/bl*.db */*.jnl */*.core */*.pid
+rm -f ns*/named.conf
similarity index 96%
rename from bin/tests/system/rrl/ns1/named.conf
rename to bin/tests/system/rrl/ns1/named.conf.in
index 7bb725ca6f3ca9d55bb41b0497e860dd2b1fec46..78dbb06e4d693f5e0066a5e60098a4cee58939e7 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-
-controls { /* empty */ };
-
 options {
        query-source address 10.53.0.1;
        notify-source 10.53.0.1;
        transfer-source 10.53.0.1;
-       port 5300;
+       port @PORT@;
        session-keyfile "session.key";
        pid-file "named.pid";
        listen-on { 10.53.0.1; };
similarity index 94%
rename from bin/tests/system/rrl/ns2/named.conf
rename to bin/tests/system/rrl/ns2/named.conf.in
index cc261cb9bcba89eb81ff36bc8ddb78ac9c53009f..b1ae53054a1c70a90d8bf0c292bda97831fa2152 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-
-controls { /* empty */ };
-
 options {
        query-source address 10.53.0.2;
        notify-source 10.53.0.2;
        transfer-source 10.53.0.2;
-       port 5300;
+       port @PORT@;
        session-keyfile "session.key";
        pid-file "named.pid";
        statistics-file "named.stats";
@@ -47,7 +44,7 @@ key rndc_key {
        algorithm hmac-md5;
 };
 controls {
-       inet 10.53.0.2 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.2 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 /*
similarity index 97%
rename from bin/tests/system/rrl/ns3/named.conf
rename to bin/tests/system/rrl/ns3/named.conf.in
index c797996acceddbf6c1dbdb136fda9e71572a43d2..2d3321c5d785a8ef47fc581bce1a662730ba1b16 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-
-controls { /* empty */ };
-
 options {
        query-source address 10.53.0.3;
        notify-source 10.53.0.3;
        transfer-source 10.53.0.3;
-       port 5300;
+       port @PORT@;
        session-keyfile "session.key";
        pid-file "named.pid";
        listen-on { 10.53.0.3; };
index 942c078e9a68bdfb0ecb8749b887ae5658913815..b8e0d34f1db08730f6d5d210f1ad301b6c0315f7 100644 (file)
@@ -21,6 +21,7 @@ if $FEATURETEST --enable-rrl
 then
     :
 else
-    echo "I:This test requires --enable-rrl at compile time." >&2
+    echo_i "This test requires --enable-rrl at compile time." >&2
     exit 255
 fi
+exit 0
index 1cbdd725d4eef260791fcb58f40ac09729a811f5..76a28c595ee05ccafb60fe149cd8f74eddf7af5a 100644 (file)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
-. ./clean.sh
 
+$SHELL clean.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
+copy_setports ns4/named.conf.in ns4/named.conf
index 49f71ea56248ceaa51672176cb7a9756b43df533..a1740290b9076d16056e29e9697d4b7c9e800cf7 100644 (file)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-
 # test response rate limiting
 
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
+RNDCCMD="$RNDC -c $SYSTEMTESTTOP/common/rndc.conf -p ${CONTROLPORT} -s"
+
 #set -x
 
 ns1=10.53.0.1                      # root, defining the others
@@ -44,7 +45,7 @@ trap 'exit 1' 1 2 15
 ret=0
 setret () {
     ret=1
-    echo "$*"
+    echo_i "$*"
 }
 
 
@@ -84,7 +85,7 @@ burst () {
         eval BURST_DOM="$BURST_DOM_BASE"
         DOMS="$DOMS $BURST_DOM"
     done
-    ARGS="+nocookie +continue +time=1 +tries=1 -p 5300 $* @$ns2 $DOMS"
+    ARGS="+nocookie +continue +time=1 +tries=1 -p ${PORT} $* @$ns2 $DOMS"
     $MDIG $ARGS 2>&1 | tee -a full-$FILENAME | sed -n -e '/^;; AUTHORITY/,/^$/d'                       \
                -e '/^;; ADDITIONAL/,/^$/d'                             \
                -e 's/^[^;].*   \([^     ]\{1,\}\)$/\1/p'               \
@@ -116,27 +117,27 @@ ck_result() {
     NOERROR=`egrep "^NOERROR$" mdig.out-$1                     2>/dev/null | wc -l`
     
     range $ADDRS "$3" 1 ||
-    setret "I:"$ADDRS" instead of $3 '$2' responses for $1" &&
+    setret "$ADDRS instead of $3 '$2' responses for $1" &&
     BAD=yes
     
     range $TC "$4" 1 ||
-    setret "I:"$TC" instead of $4 truncation responses for $1" &&
+    setret "$TC instead of $4 truncation responses for $1" &&
     BAD=yes
     
     range $DROP "$5" 1 ||
-    setret "I:"$DROP" instead of $5 dropped responses for $1" &&
+    setret "$DROP instead of $5 dropped responses for $1" &&
     BAD=yes
     
     range $NXDOMAIN "$6" 1 ||
-    setret "I:"$NXDOMAIN" instead of $6 NXDOMAIN responses for $1" &&
+    setret "$NXDOMAIN instead of $6 NXDOMAIN responses for $1" &&
     BAD=yes
     
     range $SERVFAIL "$7" 1 ||
-    setret "I:"$SERVFAIL" instead of $7 error responses for $1" &&
+    setret "$SERVFAIL instead of $7 error responses for $1" &&
     BAD=yes
 
     range $NOERROR "$8" 1 ||
-    setret "I:"$NOERROR" instead of $8 NOERROR responses for $1" &&
+    setret "$NOERROR instead of $8 NOERROR responses for $1" &&
     BAD=yes
     
     if test -z "$BAD"; then
@@ -153,7 +154,7 @@ ckstats () {
            ns2/named.stats | tail -1`
     C=`expr 0$C + 0`
     if test "$C" -ne $EXPECTED; then
-       setret "I:wrong $LABEL $TYPE statistics of $C instead of $EXPECTED"
+       setret "wrong $LABEL $TYPE statistics of $C instead of $EXPECTED"
     fi
 }
 
@@ -205,7 +206,7 @@ ck_result 'y*.a3.tld3'      192.0.3.3       10      0       0       0       0       10
 #   as both truncated and NXDOMAIN.
 ck_result 'z*.a4.tld2' x               0       3       5       5       0       0
 
-$RNDC -c $SYSTEMTESTTOP/common/rndc.conf -p 9953 -s $ns2 stats
+$RNDCCMD $ns2 stats
 ckstats first dropped 36
 ckstats first truncated 21
 
@@ -233,7 +234,7 @@ ck_result a7.tld4   x               0       0       8       0       2       0
 # NODATA responses are counted as the same regardless of qtype.
 ck_result a8.tld2      x               0       2       2       0       0       4
 
-$RNDC -c $SYSTEMTESTTOP/common/rndc.conf -p 9953 -s $ns2 stats
+$RNDCCMD $ns2 stats
 ckstats second dropped 46
 ckstats second truncated 23
 
@@ -249,11 +250,10 @@ burst 60 'all$CNT.a9.tld2'
 
 ck_result 'a*.a9.tld2' 192.0.2.8       50      0       10      0       0       50
 
-$RNDC -c $SYSTEMTESTTOP/common/rndc.conf -p 9953 -s $ns2 stats
+$RNDCCMD $ns2 stats
 ckstats final dropped 56
 ckstats final truncated 23
 
-
-echo "I:exit status: $ret"
+echo_i "exit status: $ret"
 #[ $status -eq 0 ] || exit 1
-[ $ret -eq 0 ] || echo "I:test failure overridden"
+[ $ret -eq 0 ] || echo_i "test failure overridden"
index 3154a2df77467dd45b2818ff658e92e26000a43f..46754d7c3a2e37362282f43cd0d752604695e902 100644 (file)
@@ -14,8 +14,6 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: clean.sh,v 1.10 2011/12/23 23:47:13 tbox Exp $
-
 rm -f dig.out.test*
 rm -f dig.out.cyclic dig.out.fixed dig.out.random
 rm -f dig.out.0 dig.out.1 dig.out.2 dig.out.3
@@ -23,3 +21,4 @@ rm -f dig.out.cyclic2
 rm -f ns2/root.bk
 rm -f ns?/named.run ns?/named.core
 rm -f */named.memstats
+rm -f ns*/named.conf
similarity index 92%
rename from bin/tests/system/rrsetorder/ns1/named.conf
rename to bin/tests/system/rrsetorder/ns1/named.conf.in
index 88f01a464d28011c0552db235bdb23024aad6d24..d2f478adc8a145a60a6633027084709cee0757ae 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.4 2007/06/19 23:47:05 tbox Exp $ */
-
-controls { /* empty */ };
-
 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 92%
rename from bin/tests/system/rrsetorder/ns2/named.conf
rename to bin/tests/system/rrsetorder/ns2/named.conf.in
index 0a1e9b90cb57c96034a7b2b7b005d18cac77db20..7c0879381e85a189fb1510867a7ab2878a26eb4a 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.4 2007/06/19 23:47:05 tbox Exp $ */
-
-controls { /* empty */ };
-
 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 92%
rename from bin/tests/system/rrsetorder/ns3/named.conf
rename to bin/tests/system/rrsetorder/ns3/named.conf.in
index fa8bfc9f6dc1b1200325ef520b3d740aee569649..f53e91ce211384a509f92c5a6b74dc6e49b84944 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.5 2007/06/18 23:47:30 tbox Exp $ */
-
-controls { /* empty */ };
-
 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; };
@@ -42,4 +38,3 @@ zone "." {
        type hint;
        file "../../common/root.hint";
 };
-
similarity index 92%
rename from bin/tests/system/rrsetorder/ns4/named.conf
rename to bin/tests/system/rrsetorder/ns4/named.conf.in
index e7524e999d8032b5cb8e62b2d3e940da94f9c89c..8425c7a0c5520ab2bc4554e6d3f404795ef44c09 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.5 2007/06/18 23:47:30 tbox Exp $ */
-
-controls { /* empty */ };
-
 options {
        query-source address 10.53.0.4;
        notify-source 10.53.0.4;
        transfer-source 10.53.0.4;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.4; };
        listen-on-v6 { none; };
diff --git a/bin/tests/system/rrsetorder/setup.sh b/bin/tests/system/rrsetorder/setup.sh
new file mode 100644 (file)
index 0000000..a3303c3
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/sh
+#
+# Copyright (C)  2018  Internet Systems Consortium, Inc. ("ISC")
+#
+# 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 http://mozilla.org/MPL/2.0/.
+
+SYSTEMTESTTOP=..
+. $SYSTEMTESTTOP/conf.sh
+
+$SHELL clean.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
+copy_setports ns4/named.conf.in ns4/named.conf
index f90788716de2e3ef28a3651e165ec3956786516f..f21b260ac2bdd689e33789c39f5d94209729d599 100644 (file)
@@ -18,36 +18,36 @@ SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
 DIGOPTS="+nosea +nocomm +nocmd +noquest +noadd +noauth +nocomm +nostat +short"
-DIGCMD="$DIG $DIGOPTS -p 5300"
+DIGCMD="$DIG $DIGOPTS -p ${PORT}"
 
 status=0
 
 if grep "^#define DNS_RDATASET_FIXED" $TOP/config.h > /dev/null 2>&1 ; then
-        test_fixed=true
+    test_fixed=true
 else
-        echo "I: Order 'fixed' disabled at compile time"
-        test_fixed=false
+    echo_i "Order 'fixed' disabled at compile time"
+    test_fixed=false
 fi
 
 #
 #
 #
 if $test_fixed; then
-    echo "I: Checking order fixed (master)"
+    echo_i "Checking order fixed (master)"
     ret=0
     for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
     do
     $DIGCMD @10.53.0.1 fixed.example > dig.out.fixed || ret=1
     cmp -s dig.out.fixed dig.out.fixed.good || ret=1
     done
-    if [ $ret != 0 ]; then echo "I:failed"; fi
+    if [ $ret != 0 ]; then echo_i "failed"; fi
     status=`expr $status + $ret`
 fi
 
 #
 #
 #
-echo "I: Checking order cyclic (master + additional)"
+echo_i "Checking order cyclic (master + additional)"
 ret=0
 matches=0
 for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
@@ -67,13 +67,13 @@ cmp -s dig.out.1 dig.out.2 && ret=1
 cmp -s dig.out.1 dig.out.3 && ret=1
 cmp -s dig.out.2 dig.out.3 && ret=1
 if [ $matches -ne 16 ]; then ret=1; fi
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 #
 #
 #
-echo "I: Checking order cyclic (master)"
+echo_i "Checking order cyclic (master)"
 ret=0
 matches=0
 for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
@@ -93,9 +93,9 @@ cmp -s dig.out.1 dig.out.2 && ret=1
 cmp -s dig.out.1 dig.out.3 && ret=1
 cmp -s dig.out.2 dig.out.3 && ret=1
 if [ $matches -ne 16 ]; then ret=1; fi
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
-echo "I: Checking order random (master)"
+echo_i "Checking order random (master)"
 ret=0
 for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
 do
@@ -103,44 +103,44 @@ do
 done
 for i in a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 9
 do
-       $DIGCMD @10.53.0.1 random.example > dig.out.random || ret=1
-       match=0
-       for j in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
-       do
-               eval "cmp -s dig.out.random dig.out.random.good$j && match$j=1 match=1"
-               if [ $match -eq 1 ]; then break; fi
-       done
-       if [ $match -eq 0 ]; then ret=1; fi
+    $DIGCMD @10.53.0.1 random.example > dig.out.random || ret=1
+    match=0
+    for j in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
+    do
+        eval "cmp -s dig.out.random dig.out.random.good$j && match$j=1 match=1"
+       if [ $match -eq 1 ]; then break; fi
+    done
+    if [ $match -eq 0 ]; then ret=1; fi
 done
 match=0
 for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
 do
        eval "match=\`expr \$match + \$match$i\`"
 done
-echo "I: Random selection return $match of 24 possible orders in 36 samples"
+echo_i "Random selection return $match of 24 possible orders in 36 samples"
 if [ $match -lt 8 ]; then echo ret=1; fi
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 #
 #
 #
 if $test_fixed; then
-    echo "I: Checking order fixed (slave)"
+    echo_i "Checking order fixed (slave)"
     ret=0
     for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
     do
     $DIGCMD @10.53.0.2 fixed.example > dig.out.fixed || ret=1
     cmp -s dig.out.fixed dig.out.fixed.good || ret=1
     done
-    if [ $ret != 0 ]; then echo "I:failed"; fi
+    if [ $ret != 0 ]; then echo_i "failed"; fi
     status=`expr $status + $ret`
 fi
 
 #
 #
 #
-echo "I: Checking order cyclic (slave + additional)"
+echo_i "Checking order cyclic (slave + additional)"
 ret=0
 matches=0
 for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
@@ -160,13 +160,13 @@ cmp -s dig.out.1 dig.out.2 && ret=1
 cmp -s dig.out.1 dig.out.3 && ret=1
 cmp -s dig.out.2 dig.out.3 && ret=1
 if [ $matches -ne 16 ]; then ret=1; fi
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 #
 #
 #
-echo "I: Checking order cyclic (slave)"
+echo_i "Checking order cyclic (slave)"
 ret=0
 matches=0
 for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
@@ -186,10 +186,10 @@ cmp -s dig.out.1 dig.out.2 && ret=1
 cmp -s dig.out.1 dig.out.3 && ret=1
 cmp -s dig.out.2 dig.out.3 && ret=1
 if [ $matches -ne 16 ]; then ret=1; fi
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: Checking order random (slave)"
+echo_i "Checking order random (slave)"
 ret=0
 for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
 do
@@ -197,60 +197,60 @@ do
 done
 for i in a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 9
 do
-$DIGCMD @10.53.0.2 random.example > dig.out.random || ret=1
-       match=0
-       for j in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
-       do
-               eval "cmp -s dig.out.random dig.out.random.good$j && match$j=1 match=1"
-               if [ $match -eq 1 ]; then break; fi
-       done
-       if [ $match -eq 0 ]; then ret=1; fi
+    $DIGCMD @10.53.0.2 random.example > dig.out.random || ret=1
+    match=0
+    for j in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
+    do
+       eval "cmp -s dig.out.random dig.out.random.good$j && match$j=1 match=1"
+       if [ $match -eq 1 ]; then break; fi
+    done
+    if [ $match -eq 0 ]; then ret=1; fi
 done
 match=0
 for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
 do
 eval "match=\`expr \$match + \$match$i\`"
 done
-echo "I: Random selection return $match of 24 possible orders in 36 samples"
+echo_i "Random selection return $match of 24 possible orders in 36 samples"
 if [ $match -lt 8 ]; then echo ret=1; fi
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: Shutting down slave"
+echo_i "Shutting down slave"
 
 (cd ..; $SHELL stop.sh rrsetorder ns2 )
 
-echo "I: Checking for slave's on disk copy of zone"
+echo_i "Checking for slave's on disk copy of zone"
 
 if [ ! -f ns2/root.bk ]
 then
-       echo "I:failed";
+       echo_i "failed";
        status=`expr $status + 1`
 fi
 
-echo "I: Re-starting slave"
+echo_i "Re-starting slave"
 
-(cd ..; $SHELL start.sh --noclean rrsetorder ns2 )
+(cd ..; $PERL start.pl --noclean --port ${PORT} rrsetorder ns2 )
 
 #
 #
 #
 if $test_fixed; then
-    echo "I: Checking order fixed (slave loaded from disk)"
+    echo_i "Checking order fixed (slave loaded from disk)"
     ret=0
     for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
     do
     $DIGCMD @10.53.0.2 fixed.example > dig.out.fixed || ret=1
     cmp -s dig.out.fixed dig.out.fixed.good || ret=1
     done
-    if [ $ret != 0 ]; then echo "I:failed"; fi
+    if [ $ret != 0 ]; then echo_i "failed"; fi
     status=`expr $status + $ret`
 fi
 
 #
 #
 #
-echo "I: Checking order cyclic (slave + additional, loaded from disk)"
+echo_i "Checking order cyclic (slave + additional, loaded from disk)"
 ret=0
 matches=0
 for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
@@ -270,13 +270,13 @@ cmp -s dig.out.1 dig.out.2 && ret=1
 cmp -s dig.out.1 dig.out.3 && ret=1
 cmp -s dig.out.2 dig.out.3 && ret=1
 if [ $matches -ne 16 ]; then ret=1; fi
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 #
 #
 #
-echo "I: Checking order cyclic (slave loaded from disk)"
+echo_i "Checking order cyclic (slave loaded from disk)"
 ret=0
 matches=0
 for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
@@ -296,10 +296,10 @@ cmp -s dig.out.1 dig.out.2 && ret=1
 cmp -s dig.out.1 dig.out.3 && ret=1
 cmp -s dig.out.2 dig.out.3 && ret=1
 if [ $matches -ne 16 ]; then ret=1; fi
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: Checking order random (slave loaded from disk)"
+echo_i "Checking order random (slave loaded from disk)"
 ret=0
 for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
 do
@@ -321,30 +321,30 @@ for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
 do
 eval "match=\`expr \$match + \$match$i\`"
 done
-echo "I: Random selection return $match of 24 possible orders in 36 samples"
+echo_i "Random selection return $match of 24 possible orders in 36 samples"
 if [ $match -lt 8 ]; then echo ret=1; fi
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 #
 #
 #
 if $test_fixed; then
-    echo "I: Checking order fixed (cache)"
+    echo_i "Checking order fixed (cache)"
     ret=0
     for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
     do
     $DIGCMD @10.53.0.3 fixed.example > dig.out.fixed || ret=1
     cmp -s dig.out.fixed dig.out.fixed.good || ret=1
     done
-    if [ $ret != 0 ]; then echo "I:failed"; fi
+    if [ $ret != 0 ]; then echo_i "failed"; fi
     status=`expr $status + $ret`
 fi
 
 #
 #
 #
-echo "I: Checking order cyclic (cache + additional)"
+echo_i "Checking order cyclic (cache + additional)"
 ret=0
 # prime acache
 $DIGCMD @10.53.0.3 cyclic.example > dig.out.cyclic || ret=1
@@ -366,13 +366,13 @@ cmp -s dig.out.1 dig.out.2 && ret=1
 cmp -s dig.out.1 dig.out.3 && ret=1
 cmp -s dig.out.2 dig.out.3 && ret=1
 if [ $matches -ne 16 ]; then ret=1; fi
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 #
 #
 #
-echo "I: Checking order cyclic (cache)"
+echo_i "Checking order cyclic (cache)"
 ret=0
 # prime acache
 $DIGCMD @10.53.0.3 cyclic2.example > dig.out.cyclic2 || ret=1
@@ -394,10 +394,10 @@ cmp -s dig.out.1 dig.out.2 && ret=1
 cmp -s dig.out.1 dig.out.3 && ret=1
 cmp -s dig.out.2 dig.out.3 && ret=1
 if [ $matches -ne 16 ]; then ret=1; fi
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I: Checking order random (cache)"
+echo_i "Checking order random (cache)"
 ret=0
 for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
 do
@@ -419,11 +419,11 @@ for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
 do
 eval "match=\`expr \$match + \$match$i\`"
 done
-echo "I: Random selection return $match of 24 possible orders in 36 samples"
+echo_i "Random selection return $match of 24 possible orders in 36 samples"
 if [ $match -lt 8 ]; then echo ret=1; fi
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 
-echo "I: Checking default order no match in rrset-order (random)"
+echo_i "Checking default order no match in rrset-order (random)"
 ret=0
 for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
 do
@@ -431,8 +431,7 @@ do
 done
 for i in a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 9
 do
-$DIG +nosea +nocomm +nocmd +noquest +noadd +noauth +nocomm +nostat +short \
-       -p 5300 @10.53.0.4 random.example > dig.out.random|| ret=1
+        $DIGCMD @10.53.0.4 random.example > dig.out.random|| ret=1
        match=0
        for j in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
        do
@@ -446,10 +445,10 @@ for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
 do
 eval "match=\`expr \$match + \$match$i\`"
 done
-echo "I: Random selection return $match of 24 possible orders in 36 samples"
+echo_i "Random selection return $match of 24 possible orders in 36 samples"
 if [ $match -lt 8 ]; then echo ret=1; fi
-if [ $ret != 0 ]; then echo "I:failed"; fi
-
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
-echo "I:exit status: $status"
+
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index 4199c30faf3f600f7953281d70cae286d234ac0d..e3603d39a13be9c322f3a1bcbcc7cbcdc1581c83 100644 (file)
@@ -20,3 +20,4 @@ rm -f ns*/named.memstats
 rm -f ns1/root.db
 rm -f ns2/signer.err
 rm -f dig.out.*
+rm -f ns*/named.conf
similarity index 95%
rename from bin/tests/system/rsabigexponent/ns1/named.conf
rename to bin/tests/system/rsabigexponent/ns1/named.conf.in
index 3a3442d9015b728b3c27ab3fbe20dabe65d27f4b..718244bdda88c1ee2b1f8c156f6456ce76e58a62 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id$ */
-
 // NS1
 
-controls { /* empty */ };
-
 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 95%
rename from bin/tests/system/rsabigexponent/ns2/named.conf
rename to bin/tests/system/rsabigexponent/ns2/named.conf.in
index cae5da06fcd10ca0fc3b78e6b375d808aca1340c..485e9258cc6f331430b9022ac0a2f3cb1a533745 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id$ */
-
 // NS2
 
-controls { /* empty */ };
-
 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 95%
rename from bin/tests/system/rsabigexponent/ns3/named.conf
rename to bin/tests/system/rsabigexponent/ns3/named.conf.in
index e8e589c0f272d3f9c5b619ca697d3021a97b72f8..c27f8b53471c141c94579e8babecffa2c7e282e6 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id$ */
-
 // NS3
 
-controls { /* empty */ };
-
 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; };
index e191706ab702eb1aacc0b8ec164fcd4abad83f4b..c61467e8d96d4c075e39abee45b332afb70e9418 100644 (file)
@@ -23,6 +23,6 @@ if ./bigkey > /dev/null 2>&1
 then
     rm -f Kexample.*
 else
-    echo "I:This test requires that --with-openssl was used." >&2
+    echo_i "This test requires that --with-openssl was used." >&2
     exit 255
 fi
index 5edcfe179ca49d71220f3b04f5fec4a2e9eda6f1..1b162a23c088be021687545ce2447d6ab6ff14fd 100644 (file)
@@ -21,4 +21,8 @@ $SHELL clean.sh
 
 test -r $RANDFILE || $GENRANDOM 400 $RANDFILE
 
+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
+
 cd ns1 && $SHELL -e sign.sh
index ca92a21e243f3d9a9e1cfbdbdaab55f1f5fdf6cf..51a7170427203dffd0101ac5afb32603d70558df 100644 (file)
@@ -14,8 +14,6 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id$
-
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
@@ -23,40 +21,40 @@ status=0
 
 rm -f dig.out.*
 
-DIGOPTS="+tcp +noadd +nosea +nostat +nocmd +dnssec -p 5300"
+DIGOPTS="+tcp +noadd +nosea +nostat +nocmd +dnssec -p ${PORT}"
 
 for f in conf/good*.conf
 do
-       echo "I:checking '$f'"
+       echo_i "checking '$f'"
        ret=0
        $CHECKCONF $f > /dev/null || ret=1
-       if [ $ret != 0 ]; then echo "I:failed"; fi
+       if [ $ret != 0 ]; then echo_i "failed"; fi
        status=`expr $status + $ret`
 done
 
 for f in conf/bad*.conf
 do
-       echo "I:checking '$f'"
+       echo_i "checking '$f'"
        ret=0
        $CHECKCONF $f > /dev/null && ret=1
-       if [ $ret != 0 ]; then echo "I:failed"; fi
+       if [ $ret != 0 ]; then echo_i "failed"; fi
        status=`expr $status + $ret`
 done
 
-echo "I:checking that RSA big exponent keys can't be loaded"
+echo_i "checking that RSA big exponent keys can't be loaded"
 ret=0
 grep "out of range" ns2/signer.err > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking that RSA big exponent signature can't validate"
+echo_i "checking that RSA big exponent signature can't validate"
 ret=0
 $DIG $DIGOPTS a.example @10.53.0.2 > dig.out.ns2 || ret=1
 $DIG $DIGOPTS a.example @10.53.0.3 > dig.out.ns3 || ret=1
 grep "status: NOERROR" dig.out.ns2 > /dev/null || ret=1
 grep "status: SERVFAIL" dig.out.ns3 > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index 1044716784a723cad83962da98f258273e6a5c92..6940f7a01b673ab5e8990f282c980c8057ec18e1 100644 (file)
@@ -24,76 +24,147 @@ SYSTEMTESTTOP=.
 
 stopservers=true
 clean=true
+baseport=5300
+
+while getopts "knp:r" flag; do
+    case "$flag" in
+       k) stopservers=false ;;
+       n) clean=false ;;
+       p) baseport=$OPTARG ;;
+       r) runall="-r" ;;
+    esac
+done
+shift `expr $OPTIND - 1`
+
+if [ $# -eq 0 ]; then
+    echofail "Usage: $0 [-k] [-n] [-p <PORT>] [-r] test-directory [test-options]" >&2;
+    exit 1
+fi
 
-case $1 in
-   --keep|-k) stopservers=false; shift ;;
-   --noclean|-n) clean=false; shift ;;
-esac
-
-test $# -gt 0 || { echo "usage: $0 [--keep|--noclean] test-directory" >&2; exit 1; }
-
-test=$1
+systest=$1
 shift
 
-test -d $test || { echo "$0: $test: no such test" >&2; exit 1; }
+if [ ! -d $systest ]; then
+    echofail "$0: $systest: no such test" >&2
+    exit 1
+fi
+
+# Define the number of ports allocated for each test, and the lowest and
+# highest valid values for the "-p" option.
+#
+# The lowest valid value is one more than the highest privileged port number
+# (1024).
+#
+# The highest valid value is calculated by noting that the value passed on the
+# command line is the lowest port number in a block of "numports" consecutive
+# ports and that the highest valid port number is 65,535.
+numport=100
+minvalid=`expr 1024 + 1`
+maxvalid=`expr 65535 - $numport + 1`
+
+test "$baseport" -eq "$baseport" > /dev/null 2>&1
+if [ $? -ne 0 ]; then
+    echofail "$0: $systest: must specify a numeric value for the port" >&2
+    exit 1
+elif [ $baseport -lt $minvalid -o $baseport -gt $maxvalid  ]; then
+    echofail "$0: $systest: the specified port must be in the range $minvalid to $maxvalid" >&2
+    exit 1
+fi
 
-echoinfo "S:$test:`date`" >&2
-echoinfo "T:$test:1:A" >&2
-echoinfo "A:System test $test" >&2
+# Name the first 10 ports in the set (it is assumed that each test has access
+# to ten or more ports): the query port, the control port and eight extra
+# ports.  Since the lowest numbered port (specified in the command line)
+# will usually be a multiple of 10, the names are chosen so that if this is
+# true, the last digit of EXTRAPORTn is "n".
+PORT=$baseport
+EXTRAPORT1=`expr $baseport + 1`
+EXTRAPORT2=`expr $baseport + 2`
+EXTRAPORT3=`expr $baseport + 3`
+EXTRAPORT4=`expr $baseport + 4`
+EXTRAPORT5=`expr $baseport + 5`
+EXTRAPORT6=`expr $baseport + 6`
+EXTRAPORT7=`expr $baseport + 7`
+EXTRAPORT8=`expr $baseport + 8`
+CONTROLPORT=`expr $baseport + 9`
+
+LOWPORT=$baseport
+HIGHPORT=`expr $baseport + $numport - 1`
+
+export PORT
+export EXTRAPORT1
+export EXTRAPORT2
+export EXTRAPORT3
+export EXTRAPORT4
+export EXTRAPORT5
+export EXTRAPORT6
+export EXTRAPORT7
+export EXTRAPORT8
+export CONTROLPORT
+
+export LOWPORT
+export HIGHPORT
+
+echostart "S:$systest:`date`"
+echoinfo  "T:$systest:1:A"
+echoinfo  "A:$systest:System test $systest"
+echoinfo  "I:$systest:PORTRANGE:${LOWPORT} - ${HIGHPORT}"
 
 if [ x${PERL:+set} = x ]
 then
-    echowarn "I:Perl not available.  Skipping test." >&2
-    echowarn "R:UNTESTED" >&2
-    echoinfo "E:$test:`date`" >&2
+    echowarn "I:$systest:Perl not available.  Skipping test."
+    echowarn "R:$systest:UNTESTED"
+    echoend  "E:$systest:`date $dateargs`"
     exit 0;
 fi
 
-$PERL testsock.pl || {
-    echowarn "I:Network interface aliases not set up.  Skipping test." >&2;
-    echowarn "R:UNTESTED" >&2;
-    echoinfo "E:$test:`date`" >&2;
+$PERL testsock.pl -p $PORT  || {
+    echowarn "I:$systest:Network interface aliases not set up.  Skipping test."
+    echowarn "R:$systest:UNTESTED"
+    echoend  "E:$systest:`date $dateargs`"
     exit 0;
 }
 
-
 # Check for test-specific prerequisites.
-test ! -f $test/prereq.sh || ( cd $test && $SHELL prereq.sh "$@" )
+test ! -f $systest/prereq.sh || ( cd $systest && $SHELL prereq.sh "$@" )
 result=$?
 
 if [ $result -eq 0 ]; then
     : prereqs ok
 else
-    echowarn "I:Prerequisites for $test missing, skipping test." >&2
-    [ $result -eq 255 ] && echowarn "R:SKIPPED" || echowarn "R:UNTESTED"
-    echoinfo "E:$test:`date`" >&2
+    echowarn "I:$systest:Prerequisites missing, skipping test."
+    [ $result -eq 255 ] && echowarn "R:$systest:SKIPPED" || echowarn "R:$systest:UNTESTED"
+    echoend "E:$systest:`date $dateargs`"
     exit 0
 fi
 
 # Check for PKCS#11 support
 if
-    test ! -f $test/usepkcs11 || $SHELL cleanpkcs11.sh
+    test ! -f $systest/usepkcs11 || $SHELL cleanpkcs11.sh
 then
     : pkcs11 ok
 else
-    echowarn "I:Need PKCS#11 for $test, skipping test." >&2
-    echowarn "R:PKCS11ONLY" >&2
-    echoinfo "E:$test:`date`" >&2
+    echowarn "I:$systest:Need PKCS#11, skipping test."
+    echowarn "R:$systest:PKCS11ONLY"
+    echoend  "E:$systest:`date $dateargs`"
     exit 0
 fi
 
 # Set up any dynamically generated test data
-if test -f $test/setup.sh
+if test -f $systest/setup.sh
 then
-   ( cd $test && $SHELL setup.sh "$@" )
+   ( cd $systest && $SHELL setup.sh "$@" )
 fi
 
 # Start name servers running
-$PERL start.pl $test || { echofail "R:FAIL"; echoinfo "E:$test:`date`"; exit 1; }
+$PERL start.pl --port $PORT $systest
+if [ $? -ne 0 ]; then
+    echofail "R:$systest:FAIL"
+    echoend  "E:$systest:`date $dateargs`"
+    exit 1
+fi
 
 # Run the tests
-( cd $test ; $SHELL tests.sh )
-
+( cd $systest ; $SHELL tests.sh "$@" )
 status=$?
 
 if $stopservers
@@ -104,34 +175,30 @@ else
 fi
 
 # Shutdown
-$PERL stop.pl $test
+$PERL stop.pl $systest
 
 status=`expr $status + $?`
 
 if [ $status != 0 ]; then
-    echofail "R:FAIL"
-    # Don't clean up - we need the evidence.
+    echofail "R:$systest:FAIL"
+    # Do not clean up - we need the evidence.
     find . -name core -exec chmod 0644 '{}' \;
 else
-    echopass "R:PASS"
-
+    echopass "R:$systest:PASS"
     if $clean
     then
        rm -f $SYSTEMTESTTOP/random.data
-       if test -f $test/clean.sh
-       then
-           ( cd $test && $SHELL clean.sh "$@" )
-       fi
+       $SHELL clean.sh $runall $systest "$@"
        if test -d ../../../.git
        then
-           git status -su --ignored $test |
+           git status -su --ignored $systest | \
            sed -n -e 's|^?? \(.*\)|I:file \1 not removed|p' \
-               -e 's|^!! \(.*/named.run\)$|I:file \1 not removed|p' \
-               -e 's|^!! \(.*/named.memstats\)$|I:file \1 not removed|p'
+           -e 's|^!! \(.*/named.run\)$|I:file \1 not removed|p' \
+           -e 's|^!! \(.*/named.memstats\)$|I:file \1 not removed|p'
        fi
     fi
 fi
 
-echoinfo "E:$test:`date`"
+echoend "E:$systest:`date $dateargs`"
 
 exit $status
index ad5a94f627ff8973d200e49f89a7555caa4b66c2..65c8484886ac89e88b90f34a248e41c17f3eecab 100644 (file)
@@ -14,7 +14,7 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-rm -f ns2/named.conf
+rm -f ns2/named.conf ns2/named-alt*.conf
 rm -f */named.memstats
 rm -f */named*.run
 rm -f ns*/named.lock ns*/named*.pid ns*/other.lock
similarity index 96%
rename from bin/tests/system/runtime/ns2/named-alt1.conf
rename to bin/tests/system/runtime/ns2/named-alt1.conf.in
index ccc20c99009e28db35a90dbcf91dfeeecb8271aa..46507643ad56a7b77229e0d8002002c7686cc920 100644 (file)
 
 // NS2
 
-controls { /* empty */ };
-
 options {
        query-source address 10.53.0.2;
-       port 5300;
+       port @PORT@;
        pid-file "named2.pid";
        listen-on { 10.53.0.2; };
        listen-on-v6 { fd92:7065:b8e:ffff::2; };
similarity index 96%
rename from bin/tests/system/runtime/ns2/named-alt2.conf
rename to bin/tests/system/runtime/ns2/named-alt2.conf.in
index c4cc7d267e15d7d7b9e9fe6602e3a106b3159aef..54ee361d294f3214e2042664f6a3c9306d624f64 100644 (file)
 
 // NS2
 
-controls { /* empty */ };
-
 options {
        query-source address 10.53.0.2;
-       port 5300;
+       port @PORT@;
        pid-file "named3.pid";
        listen-on { 10.53.0.2; 10.53.0.3; };
        listen-on-v6 { fd92:7065:b8e:ffff::2; };
similarity index 96%
rename from bin/tests/system/runtime/ns2/named-alt3.conf
rename to bin/tests/system/runtime/ns2/named-alt3.conf.in
index a006a3909b95fac9e57e04913a6e2850560b3f32..aeab8224ef2e8f240c2a54fdfbcf0cdbd2f17ce6 100644 (file)
 
 // NS2
 
-controls { /* empty */ };
-
 options {
        query-source address 10.53.0.2;
-       port 5300;
+       port @PORT@;
        pid-file "named4.pid";
        lock-file none;
        listen-on { 10.53.0.2; 10.53.0.3; };
similarity index 98%
rename from bin/tests/system/runtime/ns2/named-alt4.conf
rename to bin/tests/system/runtime/ns2/named-alt4.conf.in
index 7261ec9f3c2142eab56faa7c38643a13c9d057f1..26463dfa6d430633870c5e778d2f833a2daf817e 100644 (file)
@@ -17,7 +17,7 @@
 options {
        include "dir";
        include "nopemkd";
-       port 5300;
+       port @PORT@;
        pid-file "../named4.pid";
        listen-on { 127.0.0.1; };
        listen-on-v6 { none; };
similarity index 98%
rename from bin/tests/system/runtime/ns2/named-alt5.conf
rename to bin/tests/system/runtime/ns2/named-alt5.conf.in
index 6684a75923d117c8ea03020cbadb8d461c64c140..f327a99f26c8e47e11f6a75125e708c8d30844f5 100644 (file)
@@ -16,7 +16,7 @@
 
 options {
        include "nopedir";
-       port 5300;
+       port @PORT@;
        pid-file "../named5.pid";
        listen-on { 127.0.0.1; };
        listen-on-v6 { none; };
similarity index 98%
rename from bin/tests/system/runtime/ns2/named-alt6.conf
rename to bin/tests/system/runtime/ns2/named-alt6.conf.in
index e56a8cafa8d0e6d3ef193935b131f6064a5b7df1..9795235c0e6fd2780509d12d7d426d0a493a20a7 100644 (file)
@@ -17,7 +17,7 @@
 options {
        include "../nopedir";
        include "../mkd";
-       port 5300;
+       port @PORT@;
        pid-file "../named6.pid";
        listen-on { 127.0.0.1; };
        listen-on-v6 { none; };
similarity index 91%
rename from bin/tests/system/runtime/ns2/named1.conf
rename to bin/tests/system/runtime/ns2/named1.conf.in
index 76837c6ae8f852db9337ff913577f527758fd5a8..13cf3c6666acbba6508fa49309a8b17b85ecaa8a 100644 (file)
 
 // NS2
 
-controls { /* empty */ };
-
 options {
        query-source address 10.53.0.2;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.2; };
        listen-on-v6 { fd92:7065:b8e:ffff::2; };
@@ -36,5 +34,5 @@ key rndc_key {
 };
 
 controls {
-       inet 10.53.0.2 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.2 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
index 9307be85782d4c6c458dd7128c1347d878367ffc..f171c7fcf526190bc8b8925d7e0a2da48221980b 100644 (file)
@@ -19,7 +19,11 @@ SYSTEMTESTTOP=..
 
 $SHELL clean.sh
 
-cp ns2/named1.conf ns2/named.conf
+copy_setports ns2/named1.conf.in ns2/named.conf
+
+copy_setports ns2/named-alt1.conf.in ns2/named-alt1.conf
+copy_setports ns2/named-alt2.conf.in ns2/named-alt2.conf
+copy_setports ns2/named-alt3.conf.in ns2/named-alt3.conf
 
 mkdir ns2/nope
 
index 3d26c80421a230a2e9285e404bc2dd6aac783bac..e2b39da0781aa9701877b92e299a4740d8451699 100644 (file)
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
+RNDCCMD="$RNDC -c $SYSTEMTESTTOP/common/rndc.conf -p ${CONTROLPORT} -s"
+
 status=0
 n=0
 
 if $SHELL ../testcrypto.sh -q
 then
     n=`expr $n + 1`
-    echo "I: checking that named refuses to reconfigure if managed-keys-directory is set and not writable ($n)"
+    echo_i "checking that named refuses to reconfigure if managed-keys-directory is set and not writable ($n)"
     ret=0
-    cp -f ns2/named-alt4.conf ns2/named.conf
-    $RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reconfig > rndc.out.$n 2>&1
+    copy_setports ns2/named-alt4.conf.in ns2/named.conf
+    $RNDCCMD 10.53.0.2 reconfig > rndc.out.$n 2>&1
     grep "failed: permission denied" rndc.out.$n > /dev/null 2>&1 || ret=1
     sleep 1
     grep "managed-keys-directory '.*' is not writable" ns2/named.run > /dev/null 2>&1 || ret=1
-    if [ $ret != 0 ]; then echo "I:failed"; fi
+    if [ $ret != 0 ]; then echo_i "failed"; fi
     status=`expr $status + $ret`
 
     n=`expr $n + 1`
-    echo "I: checking that named refuses to reconfigure if managed-keys-directory is unset and working directory is not writable ($n)"
+    echo_i "checking that named refuses to reconfigure if managed-keys-directory is unset and working directory is not writable ($n)"
     ret=0
-    cp -f ns2/named-alt5.conf ns2/named.conf
-    $RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reconfig > rndc.out.$n 2>&1
+    copy_setports ns2/named-alt5.conf.in ns2/named.conf
+    $RNDCCMD 10.53.0.2 reconfig > rndc.out.$n 2>&1
     grep "failed:" rndc.out.$n > /dev/null 2>&1 || ret=1
     sleep 1
     grep "working directory '.*' is not writable" ns2/named.run > /dev/null 2>&1 || ret=1
-    if [ $ret != 0 ]; then echo "I:failed"; fi
+    if [ $ret != 0 ]; then echo_i "failed"; fi
     status=`expr $status + $ret`
 
     n=`expr $n + 1`
-    echo "I: checking that named reconfigures if working directory is not writable but managed-keys-directory is ($n)"
+    echo_i "checking that named reconfigures if working directory is not writable but managed-keys-directory is ($n)"
     ret=0
-    cp -f ns2/named-alt6.conf ns2/named.conf
-    $RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reconfig > rndc.out.$n 2>&1
+    copy_setports ns2/named-alt6.conf.in ns2/named.conf
+    $RNDCCMD 10.53.0.2 reconfig > rndc.out.$n 2>&1
     grep "failed:" rndc.out.$n > /dev/null 2>&1 && ret=1
-    if [ $ret != 0 ]; then echo "I:failed"; fi
+    if [ $ret != 0 ]; then echo_i "failed"; fi
     status=`expr $status + $ret`
 
-    echo "I: shutting down existing named"
+    echo_i "shutting down existing named"
     pid=`cat named4.pid 2>/dev/null`
     test "${pid:+set}" = set && $KILL -15 ${pid} >/dev/null 2>&1
     pid=`cat named5.pid 2>/dev/null`
@@ -61,7 +63,7 @@ then
 fi
 
 n=`expr $n + 1`
-echo "I: checking that named refuses to start if managed-keys-directory is set and not writable ($n)"
+echo_i "checking that named refuses to start if managed-keys-directory is set and not writable ($n)"
 ret=0
 cd ns2
 $NAMED -c named-alt4.conf -d 99 -g > named4.run 2>&1 &
@@ -70,11 +72,11 @@ grep "exiting (due to fatal error)" named4.run > /dev/null || ret=1
 pid=`cat named4.pid 2>/dev/null`
 test "${pid:+set}" = set && $KILL -15 ${pid} >/dev/null 2>&1
 cd ..
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: checking that named refuses to start if managed-keys-directory is unset and working directory is not writable ($n)"
+echo_i "checking that named refuses to start if managed-keys-directory is unset and working directory is not writable ($n)"
 ret=0
 cd ns2
 $NAMED -c named-alt5.conf -d 99 -g > named5.run 2>&1 &
@@ -83,11 +85,11 @@ grep "exiting (due to fatal error)" named5.run > /dev/null || ret=1
 pid=`cat named5.pid 2>/dev/null`
 test "${pid:+set}" = set && $KILL -15 ${pid} >/dev/null 2>&1
 cd ..
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: checking that named starts if managed-keys-directory is writable and working directory is not writable ($n)"
+echo_i "checking that named starts if managed-keys-directory is writable and working directory is not writable ($n)"
 ret=0
 cd ns2
 $NAMED -c named-alt6.conf -d 99 -g > named6.run 2>&1 &
@@ -96,8 +98,8 @@ grep "exiting (due to fatal error)" named6.run > /dev/null || ret=1
 pid=`cat named6.pid 2>/dev/null`
 test "${pid:+set}" = set && $KILL -15 ${pid} >/dev/null 2>&1
 cd ..
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index 541f24ae5fd3f4838fb574abe37f7f602dc8385f..a95c9f4dcbaa846b6c51065de514f3ba32429439 100644 (file)
@@ -25,7 +25,7 @@ pfile=parent.db
 czone=child.parent.nil
 cfile=child.db
 
-echo "I:generating child's keys"
+echo_i "generating child's keys"
 # active zsk
 czsk1=`$KEYGEN -q -r $RANDFILE -L 30 $czone`
 
@@ -52,23 +52,23 @@ cksk1=`$KEYGEN -q -r $RANDFILE -fk -L 30 $czone`
 cksk2=`$KEYGEN -q -r $RANDFILE -fk $czone`
 # $SETTIME moved after other $KEYGENs
 
-echo I:revoking key
+echo_i "revoking key"
 # revoking key changes its ID
 cksk3=`$KEYGEN -q -r $RANDFILE -fk $czone`
 cksk4=`$REVOKE $cksk3`
 
-echo I:generating parent keys
+echo_i "generating parent keys"
 pzsk=`$KEYGEN -q -r $RANDFILE $pzone`
 pksk=`$KEYGEN -q -r $RANDFILE -fk $pzone`
 
-echo "I:setting child's activation time"
+echo_i "setting child's activation time"
 # using now+30s to fix RT 24561
 $SETTIME -A now+30s $cksk2 > /dev/null
 
-echo I:signing child zone
+echo_i "signing child zone"
 czoneout=`$SIGNER -Sg -e now+1d -X now+2d -r $RANDFILE -o $czone $cfile 2>&1`
 
-echo I:signing parent zone
+echo_i "signing parent zone"
 pzoneout=`$SIGNER -Sg -r $RANDFILE -o $pzone $pfile 2>&1`
 
 czactive=`echo $czsk1 | sed 's/^K.*+005+0*\([0-9]\)/\1/'`
@@ -85,20 +85,20 @@ ckrevoked=`echo $cksk4 | sed 's/.*+005+0*\([0-9]*\)$/\1/'`
 pzid=`echo $pzsk | sed 's/^K.*+005+0*\([0-9]\)/\1/'`
 pkid=`echo $pksk | sed 's/^K.*+005+0*\([0-9]\)/\1/'`
 
-echo "I:checking dnssec-signzone output matches expectations"
+echo_i "checking dnssec-signzone output matches expectations"
 ret=0
 echo "$pzoneout" | grep 'KSKs: 1 active, 0 stand-by, 0 revoked' > /dev/null || ret=1
 echo "$pzoneout" | grep 'ZSKs: 1 active, 0 stand-by, 0 revoked' > /dev/null || ret=1
 echo "$czoneout" | grep 'KSKs: 1 active, 1 stand-by, 1 revoked' > /dev/null || ret=1
 echo "$czoneout" | grep 'ZSKs: 1 active, 2 stand-by, 0 revoked' > /dev/null || ret=1
 if [ $ret != 0 ]; then
-       echo "I: parent $pzoneout"
-       echo "I: child $czoneout"
-       echo "I:failed";
+       echo_i "parent $pzoneout"
+       echo_i "child $czoneout"
+       echo_i "failed";
 fi
 status=`expr $status + $ret`
 
-echo "I:rechecking dnssec-signzone output with -x"
+echo_i "rechecking dnssec-signzone output with -x"
 ret=0
 # use an alternate output file so -x doesn't interfere with later checks
 pzoneout=`$SIGNER -Sxg -r $RANDFILE -o $pzone -f ${pfile}2.signed $pfile 2>&1`
@@ -108,26 +108,26 @@ echo "$pzoneout" | grep 'ZSKs: 1 active, 0 present, 0 revoked' > /dev/null || re
 echo "$czoneout" | grep 'KSKs: 1 active, 1 stand-by, 1 revoked' > /dev/null || ret=1
 echo "$czoneout" | grep 'ZSKs: 1 active, 2 present, 0 revoked' > /dev/null || ret=1
 if [ $ret != 0 ]; then
-       echo "I: parent $pzoneout"
-       echo "I: child $czoneout"
-       echo "I:failed";
+       echo_i "parent $pzoneout"
+       echo_i "child $czoneout"
+       echo_i "failed";
 fi
 status=`expr $status + $ret`
 
-echo "I:checking parent zone DNSKEY set"
+echo_i "checking parent zone DNSKEY set"
 ret=0
 grep "key id = $pzid" $pfile.signed > /dev/null || {
        ret=1
-       echo "I: missing expected parent ZSK id = $pzid"
+       echo_i "missing expected parent ZSK id = $pzid"
 }
 grep "key id = $pkid" $pfile.signed > /dev/null || {
        ret=1
-       echo "I: missing expected parent KSK id = $pkid"
+       echo_i "missing expected parent KSK id = $pkid"
 }
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking parent zone DS records"
+echo_i "checking parent zone DS records"
 ret=0
 awk '$2 == "DS" {print $3}' $pfile.signed > dsset.out
 grep -w "$ckactive" dsset.out > /dev/null || ret=1
@@ -135,56 +135,56 @@ grep -w "$ckpublished" dsset.out > /dev/null || ret=1
 # revoked key should not be there, hence the &&
 grep -w "$ckprerevoke" dsset.out > /dev/null && ret=1
 grep -w "$ckrevoked" dsset.out > /dev/null && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking child zone DNSKEY set"
+echo_i "checking child zone DNSKEY set"
 ret=0
 grep "key id = $ckactive\$" $cfile.signed > /dev/null || {
        ret=1
-       echo "I: missing expected child KSK id = $ckactive"
+       echo_i "missing expected child KSK id = $ckactive"
 }
 grep "key id = $ckpublished\$" $cfile.signed > /dev/null || {
        ret=1
-       echo "I: missing expected child prepublished KSK id = $ckpublished"
+       echo_i "missing expected child prepublished KSK id = $ckpublished"
 }
 grep "key id = $ckrevoked\$" $cfile.signed > /dev/null || {
        ret=1
-       echo "I: missing expected child revoked KSK id = $ckrevoked"
+       echo_i "missing expected child revoked KSK id = $ckrevoked"
 }
 grep "key id = $czactive\$" $cfile.signed > /dev/null || {
        ret=1
-       echo "I: missing expected child ZSK id = $czactive"
+       echo_i "missing expected child ZSK id = $czactive"
 }
 grep "key id = $czpublished\$" $cfile.signed > /dev/null || {
        ret=1
-       echo "I: missing expected child prepublished ZSK id = $czpublished"
+       echo_i "missing expected child prepublished ZSK id = $czpublished"
 }
 grep "key id = $czinactive\$" $cfile.signed > /dev/null || {
        ret=1
-       echo "I: missing expected child inactive ZSK id = $czinactive"
+       echo_i "missing expected child inactive ZSK id = $czinactive"
 }
 # should not be there, hence the &&
 grep "key id = $ckprerevoke\$" $cfile.signed > /dev/null && {
        ret=1
-       echo "I: found unexpect child pre-revoke ZSK id = $ckprerevoke"
+       echo_i "found unexpect child pre-revoke ZSK id = $ckprerevoke"
 }
 grep "key id = $czgenerated\$" $cfile.signed > /dev/null && {
        ret=1
-       echo "I: found unexpected child generated ZSK id = $czgenerated"
+       echo_i "found unexpected child generated ZSK id = $czgenerated"
 }
 grep "key id = $czpredecessor\$" $cfile.signed > /dev/null && {
-       echo "I: found unexpected ZSK predecessor id = $czpredecessor (ignored)"
+       echo_i "found unexpected ZSK predecessor id = $czpredecessor (ignored)"
 }
 grep "key id = $czsuccessor\$" $cfile.signed > /dev/null && {
-       echo "I: found unexpected ZSK successor id = $czsuccessor (ignored)"
+       echo_i "found unexpected ZSK successor id = $czsuccessor (ignored)"
 }
 #grep "key id = $czpredecessor\$" $cfile.signed > /dev/null && ret=1
 #grep "key id = $czsuccessor\$" $cfile.signed > /dev/null && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking key TTLs are correct"
+echo_i "checking key TTLs are correct"
 ret=0
 grep "${czone}. 30 IN" ${czsk1}.key > /dev/null 2>&1 || ret=1
 grep "${czone}. 30 IN" ${cksk1}.key > /dev/null 2>&1 || ret=1
@@ -193,71 +193,71 @@ $SETTIME -L 45 ${czsk2} > /dev/null
 grep "${czone}. 45 IN" ${czsk2}.key > /dev/null 2>&1 || ret=1
 $SETTIME -L 0 ${czsk2} > /dev/null
 grep "${czone}. IN" ${czsk2}.key > /dev/null 2>&1 || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking key TTLs were imported correctly"
+echo_i "checking key TTLs were imported correctly"
 ret=0
 awk 'BEGIN {r = 0} $2 == "DNSKEY" && $1 != 30 {r = 1} END {exit r}' \
         ${cfile}.signed || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:re-signing and checking imported TTLs again"
+echo_i "re-signing and checking imported TTLs again"
 ret=0
 $SETTIME -L 15 ${czsk2} > /dev/null
 czoneout=`$SIGNER -Sg -e now+1d -X now+2d -r $RANDFILE -o $czone $cfile 2>&1`
 awk 'BEGIN {r = 0} $2 == "DNSKEY" && $1 != 15 {r = 1} END {exit r}' \
         ${cfile}.signed || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 # There is some weirdness in Solaris 10 (Generic_120011-14), which
 # is why the next section has all those echo $ret > /dev/null;sync
 # commands
-echo "I:checking child zone signatures"
+echo_i "checking child zone signatures"
 ret=0
 # check DNSKEY signatures first
 awk '$2 == "RRSIG" && $3 == "DNSKEY" { getline; print $3 }' $cfile.signed > dnskey.sigs
 sub=0
 grep -w "$ckactive" dnskey.sigs > /dev/null || sub=1
-if [ $sub != 0 ]; then echo "I:missing ckactive $ckactive (dnskey)"; ret=1; fi
+if [ $sub != 0 ]; then echo_i "missing ckactive $ckactive (dnskey)"; ret=1; fi
 echo $ret > /dev/null
 sync
 sub=0
 grep -w "$ckrevoked" dnskey.sigs > /dev/null || sub=1
-if [ $sub != 0 ]; then echo "I:missing ckrevoke $ckrevoke (dnskey)"; ret=1; fi
+if [ $sub != 0 ]; then echo_i "missing ckrevoke $ckrevoke (dnskey)"; ret=1; fi
 echo $ret > /dev/null
 sync
 sub=0
 grep -w "$czactive" dnskey.sigs > /dev/null || sub=1
-if [ $sub != 0 ]; then echo "I:missing czactive $czactive (dnskey)"; ret=1; fi
+if [ $sub != 0 ]; then echo_i "missing czactive $czactive (dnskey)"; ret=1; fi
 # should not be there:
 echo $ret > /dev/null
 sync
 sub=0
 grep -w "$ckprerevoke" dnskey.sigs > /dev/null && sub=1
-if [ $sub != 0 ]; then echo "I:found ckprerevoke $ckprerevoke (dnskey)"; ret=1; fi
+if [ $sub != 0 ]; then echo_i "found ckprerevoke $ckprerevoke (dnskey)"; ret=1; fi
 echo $ret > /dev/null
 sync
 sub=0
 grep -w "$ckpublished" dnskey.sigs > /dev/null && sub=1
-if [ $sub != 0 ]; then echo "I:found ckpublished $ckpublished (dnskey)"; ret=1; fi
+if [ $sub != 0 ]; then echo_i "found ckpublished $ckpublished (dnskey)"; ret=1; fi
 echo $ret > /dev/null
 sync
 sub=0
 grep -w "$czpublished" dnskey.sigs > /dev/null && sub=1
-if [ $sub != 0 ]; then echo "I:found czpublished $czpublished (dnskey)"; ret=1; fi
+if [ $sub != 0 ]; then echo_i "found czpublished $czpublished (dnskey)"; ret=1; fi
 echo $ret > /dev/null
 sync
 sub=0
 grep -w "$czinactive" dnskey.sigs > /dev/null && sub=1
-if [ $sub != 0 ]; then echo "I:found czinactive $czinactive (dnskey)"; ret=1; fi
+if [ $sub != 0 ]; then echo_i "found czinactive $czinactive (dnskey)"; ret=1; fi
 echo $ret > /dev/null
 sync
 sub=0
 grep -w "$czgenerated" dnskey.sigs > /dev/null && sub=1
-if [ $sub != 0 ]; then echo "I:found czgenerated $czgenerated (dnskey)"; ret=1; fi
+if [ $sub != 0 ]; then echo_i "found czgenerated $czgenerated (dnskey)"; ret=1; fi
 # now check other signatures first
 awk '$2 == "RRSIG" && $3 != "DNSKEY" { getline; print $3 }' $cfile.signed | sort -un > other.sigs
 # should not be there:
@@ -265,55 +265,55 @@ echo $ret > /dev/null
 sync
 sub=0
 grep -w "$ckactive" other.sigs > /dev/null && sub=1
-if [ $sub != 0 ]; then echo "I:found ckactive $ckactive (other)"; ret=1; fi
+if [ $sub != 0 ]; then echo_i "found ckactive $ckactive (other)"; ret=1; fi
 echo $ret > /dev/null
 sync
 sub=0
 grep -w "$ckpublished" other.sigs > /dev/null && sub=1
-if [ $sub != 0 ]; then echo "I:found ckpublished $ckpublished (other)"; ret=1; fi
+if [ $sub != 0 ]; then echo_i "found ckpublished $ckpublished (other)"; ret=1; fi
 echo $ret > /dev/null
 sync
 sub=0
 grep -w "$ckprerevoke" other.sigs > /dev/null && sub=1
-if [ $sub != 0 ]; then echo "I:found ckprerevoke $ckprerevoke (other)"; ret=1; fi
+if [ $sub != 0 ]; then echo_i "found ckprerevoke $ckprerevoke (other)"; ret=1; fi
 echo $ret > /dev/null
 sync
 sub=0
 grep -w "$ckrevoked" other.sigs > /dev/null && sub=1
-if [ $sub != 0 ]; then echo "I:found ckrevoked $ckrevoked (other)"; ret=1; fi
+if [ $sub != 0 ]; then echo_i "found ckrevoked $ckrevoked (other)"; ret=1; fi
 echo $ret > /dev/null
 sync
 sub=0
 grep -w "$czpublished" other.sigs > /dev/null && sub=1
-if [ $sub != 0 ]; then echo "I:found czpublished $czpublished (other)"; ret=1; fi
+if [ $sub != 0 ]; then echo_i "found czpublished $czpublished (other)"; ret=1; fi
 echo $ret > /dev/null
 sync
 sub=0
 grep -w "$czinactive" other.sigs > /dev/null && sub=1
-if [ $sub != 0 ]; then echo "I:found czinactive $czinactive (other)"; ret=1; fi
+if [ $sub != 0 ]; then echo_i "found czinactive $czinactive (other)"; ret=1; fi
 echo $ret > /dev/null
 sync
 sub=0
 grep -w "$czgenerated" other.sigs > /dev/null && sub=1
-if [ $sub != 0 ]; then echo "I:found czgenerated $czgenerated (other)"; ret=1; fi
+if [ $sub != 0 ]; then echo_i "found czgenerated $czgenerated (other)"; ret=1; fi
 echo $ret > /dev/null
 sync
 sub=0
 grep -w "$czpredecessor" other.sigs > /dev/null && sub=1
-if [ $sub != 0 ]; then echo "I:found czpredecessor $czpredecessor (other)"; ret=1; fi
+if [ $sub != 0 ]; then echo_i "found czpredecessor $czpredecessor (other)"; ret=1; fi
 echo $ret > /dev/null
 sync
 sub=0
 grep -w "$czsuccessor" other.sigs > /dev/null && sub=1
-if [ $sub != 0 ]; then echo "I:found czsuccessor $czsuccessor (other)"; ret=1; fi
+if [ $sub != 0 ]; then echo_i "found czsuccessor $czsuccessor (other)"; ret=1; fi
 if [ $ret != 0 ]; then
     sed 's/^/I:dnskey sigs: /' < dnskey.sigs
     sed 's/^/I:other sigs: /' < other.sigs
-    echo "I:failed";
+    echo_i "failed";
 fi
 status=`expr $status + $ret`
 
-echo "I:checking RRSIG expiry date correctness"
+echo_i "checking RRSIG expiry date correctness"
 dnskey_expiry=`$CHECKZONE -o - $czone $cfile.signed 2> /dev/null |
               awk '$4 == "RRSIG" && $5 == "DNSKEY" {print $9; exit}' |
               cut -c1-10`
@@ -321,27 +321,27 @@ soa_expiry=`$CHECKZONE -o - $czone $cfile.signed 2> /dev/null |
            awk '$4 == "RRSIG" && $5 == "SOA" {print $9; exit}' |
            cut -c1-10`
 [ $dnskey_expiry -gt $soa_expiry ] || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:waiting 30 seconds for key activation"
+echo_i "waiting 30 seconds for key activation"
 sleep 30
-echo "I:re-signing child zone"
+echo_i "re-signing child zone"
 czoneout2=`$SIGNER -Sg -r $RANDFILE -o $czone -f $cfile.new $cfile.signed 2>&1`
 mv $cfile.new $cfile.signed
 
-echo "I:checking dnssec-signzone output matches expectations"
+echo_i "checking dnssec-signzone output matches expectations"
 ret=0
 echo "$czoneout2" | grep 'KSKs: 2 active, 0 stand-by, 1 revoked' > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:checking child zone signatures again"
+echo_i "checking child zone signatures again"
 ret=0
 awk '$2 == "RRSIG" && $3 == "DNSKEY" { getline; print $3 }' $cfile.signed > dnskey.sigs
 grep -w "$ckpublished" dnskey.sigs > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index 3109803c7e25148826f9e4d971a87e1c74776d46..77d0ab394b777c1b8e429fc824ea95b48681d49d 100644 (file)
@@ -15,8 +15,7 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: clean.sh,v 1.9 2009/12/06 23:48:29 tbox Exp $
-
 rm -f *.dig *.good *.out
 rm -f */named.memstats
 rm -f */named.run
+rm -f */named.conf
similarity index 93%
rename from bin/tests/system/sortlist/ns1/named.conf
rename to bin/tests/system/sortlist/ns1/named.conf.in
index 5d149ecd6499939ffd7e27279e2d29e9c75aca72..fdb05259c959d6975a6d3b173fca359d26d7e3d2 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.10 2007/06/19 23:47:05 tbox Exp $ */
-
-controls { /* empty */ };
-
 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; };
@@ -32,7 +28,7 @@ options {
 
        sortlist {
            { 10.53.0.1;                                   // IF 10.53.0.1
-               {                                          
+               {
                    !1.1.1.4; !1.1.1.2; !1.1.1.3; !1.1.1.1; // sort these last,
                    192.168.3/24;                           // this first
                    { 192.168.2/24; 192.168.1/24; }; }; };  // and these next
diff --git a/bin/tests/system/sortlist/setup.sh b/bin/tests/system/sortlist/setup.sh
new file mode 100644 (file)
index 0000000..c69f051
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+#
+# Copyright (C)  2018  Internet Systems Consortium, Inc. ("ISC")
+#
+# 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 http://mozilla.org/MPL/2.0/.
+
+SYSTEMTESTTOP=..
+. $SYSTEMTESTTOP/conf.sh
+
+$SHELL clean.sh
+copy_setports ns1/named.conf.in ns1/named.conf
index 59fe44bcb86f32db06083289d9ea2c78de4573af..a79b2e38b18068be7adc990f6b77ac2996db5b9d 100644 (file)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: tests.sh,v 1.9 2007/09/14 01:46:05 marka Exp $
-
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
+DIGOPTS="+tcp +noadd +nosea +nostat +noquest +noauth +nocomm +nocmd -p ${PORT}"
+
 status=0
 
-echo "I:test 2-element sortlist statement"
+echo_i "test 2-element sortlist statement"
 cat <<EOF >test1.good
 a.example.             300     IN      A       192.168.3.1
 a.example.             300     IN      A       192.168.1.1
@@ -32,29 +32,24 @@ a.example.          300     IN      A       1.1.1.3
 a.example.             300     IN      A       1.1.1.2
 a.example.             300     IN      A       1.1.1.4
 EOF
-$DIG +tcp +noadd +nosea +nostat +noquest +noauth +nocomm +nocmd a.example. \
-       @10.53.0.1 -b 10.53.0.1 -p 5300 >test1.dig
+$DIG $DIGOPTS a.example. @10.53.0.1 -b 10.53.0.1 >test1.dig
 # Note that this can't use digcomp.pl because here, the ordering of the
 # result RRs is significant.
 diff test1.dig test1.good || status=1
 
-echo "I:test 1-element sortlist statement and undocumented BIND 8 features"
+echo_i "test 1-element sortlist statement and undocumented BIND 8 features"
        cat <<EOF >test2.good
 b.example.             300     IN      A       10.53.0.$n
 EOF
 
-$DIG +tcp +noadd +nosea +nostat +noquest +noauth +nocomm +nocmd \
-       b.example. @10.53.0.1 -b 10.53.0.2 -p 5300 | sed 1q | \
+$DIG $DIGOPTS b.example. @10.53.0.1 -b 10.53.0.2 | sed 1q | \
         egrep '10.53.0.(2|3)$' > test2.out &&
-$DIG +tcp +noadd +nosea +nostat +noquest +noauth +nocomm +nocmd \
-       b.example. @10.53.0.1 -b 10.53.0.3 -p 5300 | sed 1q | \
+$DIG $DIGOPTS b.example. @10.53.0.1 -b 10.53.0.3 | sed 1q | \
         egrep '10.53.0.(2|3)$' >> test2.out &&
-$DIG +tcp +noadd +nosea +nostat +noquest +noauth +nocomm +nocmd \
-       b.example. @10.53.0.1 -b 10.53.0.4 -p 5300 | sed 1q | \
+$DIG $DIGOPTS b.example. @10.53.0.1 -b 10.53.0.4 | sed 1q | \
         egrep '10.53.0.4$' >> test2.out &&
-$DIG +tcp +noadd +nosea +nostat +noquest +noauth +nocomm +nocmd \
-       b.example. @10.53.0.1 -b 10.53.0.5 -p 5300 | sed 1q | \
+$DIG $DIGOPTS b.example. @10.53.0.1 -b 10.53.0.5 | sed 1q | \
         egrep '10.53.0.5$' >> test2.out || status=1
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index 2e3a0eebc0a1d867d4de17a0980ccae7b2b804f6..bb024bfdb283806a292111101a228e02fda274ab 100644 (file)
@@ -14,3 +14,4 @@
 
 rm -f ns1/named.run
 rm -f ns1/named.memstats
+rm -f ns*/named.conf
similarity index 96%
rename from bin/tests/system/spf/ns1/named.conf
rename to bin/tests/system/spf/ns1/named.conf.in
index 7d5dcfb0412bb1a62810fde0ec362d16b1ee9941..2e2e9c44fb686d897c0373686e0ff37ab30d54c1 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-controls { /* empty */ };
-
 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; };
diff --git a/bin/tests/system/spf/setup.sh b/bin/tests/system/spf/setup.sh
new file mode 100644 (file)
index 0000000..c69f051
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+#
+# Copyright (C)  2018  Internet Systems Consortium, Inc. ("ISC")
+#
+# 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 http://mozilla.org/MPL/2.0/.
+
+SYSTEMTESTTOP=..
+. $SYSTEMTESTTOP/conf.sh
+
+$SHELL clean.sh
+copy_setports ns1/named.conf.in ns1/named.conf
index a59a89b0f891f311265626f829b8eba481e3a299..9b936e75a716268fc9924c2777e63a9c7f6506a9 100644 (file)
@@ -20,7 +20,7 @@ SYSTEMTESTTOP=..
 n=1
 status=0
 
-echo "I:checking that SPF warnings have been correctly generated ($n)"
+echo_i "checking that SPF warnings have been correctly generated ($n)"
 ret=0
 
 grep "zone spf/IN: loaded serial 0" ns1/named.run > /dev/null || ret=1
@@ -35,8 +35,8 @@ grep "zone nowarn/IN: loaded serial 0" ns1/named.run > /dev/null || ret=1
 grep "'y.nowarn' found type SPF" ns1/named.run > /dev/null && ret=1
 grep "'nowarn' found type SPF" ns1/named.run > /dev/null && ret=1
 n=`expr $n + 1`
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index cef0810eb3bb40972d3b5715acf78b133d46602c..b53f1fe611b4653d63fda85606b456fc84e07ddc 100755 (executable)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
+rm -f tmp
 rm -f dig.out.*
 rm -f ns*/named.lock
-rm -f ns2/named.conf
+rm -f ns*/named.conf
 rm -f ns3/example.db
-rm -f ns3/named.conf
 rm -f ns3/undelegated.db
 rm -f ns4/sub.example.db
 rm -f ns?/named.memstats
similarity index 90%
rename from bin/tests/system/staticstub/ns1/named.conf
rename to bin/tests/system/staticstub/ns1/named.conf.in
index b083d7af670193300d9ef387fd8c8671d5634424..a7b2cb610b695ef3fdc655256bd2db3ad86d96e0 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.3 2010/12/17 00:57:38 marka Exp $ */
-
-controls { /* empty */ };
-
 options {
        query-source address 10.53.0.1;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.1; };
        listen-on-v6 { none; };
index 92a49150c9c033994ae8b2266dd038b3640990d4..f0bc6b5e80722194160052d3bec65e4020d60e91 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-# Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
-# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-# AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
-# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-# PERFORMANCE OF THIS SOFTWARE.
-
-# $Id: named.conf.in,v 1.3 2010/12/18 23:47:11 tbox Exp $
+key rndc_key {
+       secret "1234abcd8765";
+       algorithm hmac-sha256;
+};
 
-include "../../common/controls.conf";
+controls {
+       inet 10.53.0.2 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
+};
 
 include "trusted.conf";
 
@@ -38,7 +29,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; };
index 0223f42aa33d72df0fa6fe2e29a7caee7e0eae66..ab41fdac011ea89fd55008ac7ad6b0166fe6324e 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-# Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
-# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-# AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
-# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-# PERFORMANCE OF THIS SOFTWARE.
-
-# $Id: named.conf.in,v 1.4 2010/12/18 23:47:11 tbox Exp $
-
 key rndc_key {
        secret "1234abcd8765";
        algorithm hmac-md5;
 };
 
 controls {
-       inet 10.53.0.3 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.3 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 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/staticstub/ns4/named.conf b/bin/tests/system/staticstub/ns4/named.conf
deleted file mode 100644 (file)
index 9a34f70..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-# Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
-# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-# AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
-# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-# PERFORMANCE OF THIS SOFTWARE.
-
-# $Id: named.conf,v 1.4 2010/12/18 23:47:11 tbox Exp $
-
-controls { /* empty */ };
-
-options {
-       query-source address 10.53.0.4;
-       notify-source 10.53.0.4;
-       transfer-source 10.53.0.4;
-       port 5300;
-       pid-file "named.pid";
-       listen-on { 10.53.0.4; };
-       listen-on-v6 { ::1; };
-       recursion no;
-       notify no;
-};
-
-zone "example.com" {
-       type master;
-       file "example.com.db";
-};
-
-zone "example.org" {
-       type master;
-       file "example.org.db";
-};
-
-zone "sub.example" {
-       type master;
-       file "sub.example.db.signed";
-};
-
-zone "example.info" {
-       type master;
-       file "example.info.db";
-};
diff --git a/bin/tests/system/staticstub/ns4/named.conf.in b/bin/tests/system/staticstub/ns4/named.conf.in
new file mode 100644 (file)
index 0000000..87cd92a
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+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 { ::1; };
+       recursion no;
+       notify no;
+};
+
+zone "example.com" {
+       type master;
+       file "example.com.db";
+};
+
+zone "example.org" {
+       type master;
+       file "example.org.db";
+};
+
+zone "sub.example" {
+       type master;
+       file "sub.example.db.signed";
+};
+
+zone "example.info" {
+       type master;
+       file "example.info.db";
+};
index 3c5edbd673bff40d56257a49e846b27cc5a2e187..55136dcc168b82c15d4c0aba0b71d1a2bb0ae1b3 100755 (executable)
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
-sed 's/SERVER_CONFIG_PLACEHOLDER/server-names { "ns.example.net"; };/' ns2/named.conf.in > ns2/named.conf
+copy_setports ns1/named.conf.in ns1/named.conf
+copy_setports ns2/named.conf.in tmp
+sed 's/SERVER_CONFIG_PLACEHOLDER/server-names { "ns.example.net"; };/' tmp > ns2/named.conf
 
-sed 's/EXAMPLE_ZONE_PLACEHOLDER/zone "example" { type master; file "example.db.signed"; };/' ns3/named.conf.in > ns3/named.conf
+copy_setports ns3/named.conf.in tmp
+sed 's/EXAMPLE_ZONE_PLACEHOLDER/zone "example" { type master; file "example.db.signed"; };/' tmp > ns3/named.conf
+
+rm -f tmp
+
+copy_setports ns4/named.conf.in ns4/named.conf
 
 test -r $RANDFILE || $GENRANDOM 400 $RANDFILE
 
index cae04b417dbd83d23a4d1bb493de08eea17c722e..c40b7979fa103cd6e8221cd3a605f5f5abb84c42 100755 (executable)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: tests.sh,v 1.5 2011/01/11 23:47:12 tbox Exp $
-
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
+DIGOPTS="-p ${PORT}"
+RNDCCMD="$RNDC -c $SYSTEMTESTTOP/common/rndc.conf -p ${CONTROLPORT} -s"
+
 status=0
 n=0
 
 for conf in conf/good*.conf
 do
        n=`expr $n + 1`
-       echo "I:checking that $conf is accepted ($n)"
+       echo_i "checking that $conf is accepted ($n)"
        ret=0
        $CHECKCONF "$conf" || ret=1
-       if [ $ret != 0 ]; then echo "I:failed"; fi
+       if [ $ret != 0 ]; then echo_i "failed"; fi
        status=`expr $status + $ret`
 done
 
 for conf in conf/bad*.conf
 do
        n=`expr $n + 1`
-       echo "I:checking that $conf is rejected ($n)"
+       echo_i "checking that $conf is rejected ($n)"
        ret=0
        $CHECKCONF "$conf" >/dev/null && ret=1
-       if [ $ret != 0 ]; then echo "I:failed"; fi
+       if [ $ret != 0 ]; then echo_i "failed"; fi
        status=`expr $status + $ret`
 done
 
 n=`expr $n + 1`
-echo "I:trying an axfr that should be denied (NOTAUTH) ($n)"
+echo_i "trying an axfr that should be denied (NOTAUTH) ($n)"
 ret=0
-$DIG +tcp data.example. @10.53.0.2 axfr -p 5300 > dig.out.ns2.test$n || ret=1
+$DIG $DIGOPTS +tcp data.example. @10.53.0.2 axfr > dig.out.ns2.test$n || ret=1
 grep "; Transfer failed." dig.out.ns2.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:non recursive query for a static-stub zone with server name should be rejected ($n)"
+echo_i "non recursive query for a static-stub zone with server name should be rejected ($n)"
 ret=0
- $DIG +tcp +norec data.example. @10.53.0.2 txt -p 5300 > dig.out.ns2.test$n \
+ $DIG $DIGOPTS +tcp +norec data.example. @10.53.0.2 txt > dig.out.ns2.test$n \
        || ret=1
 grep "REFUSED" dig.out.ns2.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:non recursive query for a static-stub zone with server name should be rejected ($n)"
+echo_i "non recursive query for a static-stub zone with server name should be rejected ($n)"
 ret=0
-$DIG +tcp +norec data.example.org. @10.53.0.2 txt -p 5300 > dig.out.ns2.test$n \
+$DIG $DIGOPTS +tcp +norec data.example.org. @10.53.0.2 txt > dig.out.ns2.test$n \
        || ret=1
 grep "REFUSED" dig.out.ns2.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:allow-query ACL ($n)"
+echo_i "allow-query ACL ($n)"
 ret=0
-$DIG +tcp +norec data.example. @10.53.0.2 txt -b 10.53.0.7 -p 5300 \
+$DIG $DIGOPTS +tcp +norec data.example. @10.53.0.2 txt -b 10.53.0.7 \
        > dig.out.ns2.test$n || ret=1
 grep "REFUSED" dig.out.ns2.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:look for static-stub zone data with recursion (should be found) ($n)"
+echo_i "look for static-stub zone data with recursion (should be found) ($n)"
 ret=0
-$DIG +tcp data.example. @10.53.0.2 txt -p 5300 > dig.out.ns2.test$n || ret=1
+$DIG $DIGOPTS +tcp data.example. @10.53.0.2 txt > dig.out.ns2.test$n || ret=1
 $PERL ../digcomp.pl knowngood.dig.out.rec dig.out.ns2.test$n || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking authoritative NS is ignored for delegation ($n)"
+echo_i "checking authoritative NS is ignored for delegation ($n)"
 ret=0
 # the auth server returns a different (and incorrect) NS for .example.
-$DIG +tcp example. @10.53.0.2 ns -p 5300 > dig.out.ns2.test1.$n || ret=1
+$DIG $DIGOPTS +tcp example. @10.53.0.2 ns > dig.out.ns2.test1.$n || ret=1
 grep "ns4.example." dig.out.ns2.test1.$n > /dev/null || ret=1
 # but static-stub configuration should still be used
-$DIG +tcp data2.example. @10.53.0.2 txt -p 5300 > dig.out.ns2.test2.$n || ret=1
+$DIG $DIGOPTS +tcp data2.example. @10.53.0.2 txt > dig.out.ns2.test2.$n || ret=1
 grep "2nd test data" dig.out.ns2.test2.$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking queries for a child zone of the static-stub zone ($n)"
+echo_i "checking queries for a child zone of the static-stub zone ($n)"
 ret=0
 # prime the delegation to a child zone of the static-stub zone
-$DIG +tcp data1.sub.example. @10.53.0.2 txt -p 5300 > dig.out.ns2.test1.$n || ret=1
+$DIG $DIGOPTS +tcp data1.sub.example. @10.53.0.2 txt > dig.out.ns2.test1.$n || ret=1
 grep "1st sub test data" dig.out.ns2.test1.$n > /dev/null || ret=1
 # temporarily disable the the parent zone
-sed 's/EXAMPLE_ZONE_PLACEHOLDER//' ns3/named.conf.in > ns3/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 reload 2>&1 | sed 's/^/I:ns3 /'
+copy_setports ns3/named.conf.in tmp
+sed 's/EXAMPLE_ZONE_PLACEHOLDER//' tmp > ns3/named.conf
+$RNDCCMD 10.53.0.3 reload 2>&1 | sed 's/^/ns3 /' | cat_i
 # query the child zone again.  this should directly go to the child and
 # succeed.
 for i in 0 1 2 3 4 5 6 7 8 9
 do
-       $DIG +tcp data2.sub.example. @10.53.0.2 txt -p 5300 > dig.out.ns2.test2.$n || ret=1
+       $DIG $DIGOPTS +tcp data2.sub.example. @10.53.0.2 txt > dig.out.ns2.test2.$n || ret=1
        grep "2nd sub test data" dig.out.ns2.test2.$n > /dev/null && break
        sleep 1
 done
 grep "2nd sub test data" dig.out.ns2.test2.$n > /dev/null || ret=1
 # re-enable the parent
-sed 's/EXAMPLE_ZONE_PLACEHOLDER/zone "example" { type master; file "example.db.signed"; };/' ns3/named.conf.in > ns3/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 reload 2>&1 | sed 's/^/I:ns3 /'
-if [ $ret != 0 ]; then echo "I:failed"; fi
+copy_setports ns3/named.conf.in tmp
+sed 's/EXAMPLE_ZONE_PLACEHOLDER/zone "example" { type master; file "example.db.signed"; };/' tmp > ns3/named.conf
+$RNDCCMD 10.53.0.3 reload 2>&1 | sed 's/^/ns3 /' | cat_i
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking authoritative NS addresses are ignored for delegation ($n)"
+echo_i "checking authoritative NS addresses are ignored for delegation ($n)"
 ret=0
 # the auth server returns a different (and incorrect) A/AAA RR for .example.
-$DIG +tcp example. @10.53.0.2 a -p 5300 > dig.out.ns2.test1.$n || ret=1
+$DIG $DIGOPTS +tcp example. @10.53.0.2 a > dig.out.ns2.test1.$n || ret=1
 grep "10.53.0.4" dig.out.ns2.test1.$n > /dev/null || ret=1
-$DIG +tcp example. @10.53.0.2 aaaa -p 5300 > dig.out.ns2.test2.$n || ret=1
+$DIG $DIGOPTS +tcp example. @10.53.0.2 aaaa > dig.out.ns2.test2.$n || ret=1
 grep "::1" dig.out.ns2.test2.$n > /dev/null || ret=1
 # reload the server.  this will flush the ADB.
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
+$RNDCCMD 10.53.0.2 reload 2>&1 | sed 's/^/ns2 /' | cat_i
 # ask another RR that would require delegation.  static-stub configuration
 # should still be used instead of the authoritative A/AAAA cached above.
-$DIG +tcp data3.example. @10.53.0.2 txt -p 5300 > dig.out.ns2.test3.$n || ret=1
+$DIG $DIGOPTS +tcp data3.example. @10.53.0.2 txt > dig.out.ns2.test3.$n || ret=1
 grep "3rd test data" dig.out.ns2.test3.$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 # the authoritative server of the query domain (example.com) is the apex
 # name of the static-stub zone (example).  in this case the static-stub
 # configuration must be ignored and cached information must be used.
 n=`expr $n + 1`
-echo "I:checking NS of static-stub is ignored when referenced from other domain ($n)"
+echo_i "checking NS of static-stub is ignored when referenced from other domain ($n)"
 ret=0
-$DIG +tcp data.example.com. @10.53.0.2 txt -p 5300 > dig.out.ns2.test$n || ret=1
+$DIG $DIGOPTS +tcp data.example.com. @10.53.0.2 txt > dig.out.ns2.test$n || ret=1
 grep "example com data" dig.out.ns2.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 # check server-names
 n=`expr $n + 1`
-echo "I:checking static-stub with a server-name ($n)"
+echo_i "checking static-stub with a server-name ($n)"
 ret=0
-$DIG +tcp data.example.org. @10.53.0.2 txt -p 5300 > dig.out.ns2.test$n || ret=1
+$DIG $DIGOPTS +tcp data.example.org. @10.53.0.2 txt > dig.out.ns2.test$n || ret=1
 grep "example org data" dig.out.ns2.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
@@ -164,54 +167,55 @@ n=`expr $n + 1`
 # checks introduced in change 2916.
 if $TESTSOCK6 ../testsock6.pl ::1 2> /dev/null
 then
-    echo "I:checking IPv6 static-stub address ($n)"
+    echo_i "checking IPv6 static-stub address ($n)"
     ret=0
-    $DIG +tcp data.example.info. @10.53.0.2 txt -p 5300 > dig.out.ns2.test$n || ret=1
+    $DIG $DIGOPTS +tcp data.example.info. @10.53.0.2 txt > dig.out.ns2.test$n || ret=1
     grep "example info data" dig.out.ns2.test$n > /dev/null || ret=1
-    if [ $ret != 0 ]; then echo "I:failed"; fi
+    if [ $ret != 0 ]; then echo_i "failed"; fi
     status=`expr $status + $ret`
 else
-    echo "I:SKIPPED: checking IPv6 static-stub address ($n)"
+    echo_i "SKIPPED: checking IPv6 static-stub address ($n)"
 fi
 
 n=`expr $n + 1`
-echo "I:look for static-stub zone data with DNSSEC validation ($n)"
+echo_i "look for static-stub zone data with DNSSEC validation ($n)"
 ret=0
-$DIG +tcp +dnssec data4.example. @10.53.0.2 txt -p 5300 > dig.out.ns2.test$n || ret=1
+$DIG $DIGOPTS +tcp +dnssec data4.example. @10.53.0.2 txt > dig.out.ns2.test$n || ret=1
 grep "ad; QUERY" dig.out.ns2.test$n > /dev/null || ret=1
 grep "4th test data" dig.out.ns2.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:look for a child of static-stub zone data with DNSSEC validation ($n)"
+echo_i "look for a child of static-stub zone data with DNSSEC validation ($n)"
 ret=0
-$DIG +tcp +dnssec data3.sub.example. @10.53.0.2 txt -p 5300 > dig.out.ns2.test$n || ret=1
+$DIG $DIGOPTS +tcp +dnssec data3.sub.example. @10.53.0.2 txt > dig.out.ns2.test$n || ret=1
 grep "ad; QUERY" dig.out.ns2.test$n > /dev/null || ret=1
 grep "3rd sub test data" dig.out.ns2.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 # reload with a different name server: exisitng zone shouldn't be reused.
 n=`expr $n + 1`
-echo "I:checking server reload with a different static-stub config ($n)"
+echo_i "checking server reload with a different static-stub config ($n)"
 ret=0
-sed 's/SERVER_CONFIG_PLACEHOLDER/server-addresses { 10.53.0.4; };/' ns2/named.conf.in > ns2/named.conf
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
-$DIG +tcp data2.example.org. @10.53.0.2 txt -p 5300 > dig.out.ns2.test$n || ret=1
+copy_setports ns2/named.conf.in tmp
+sed 's/SERVER_CONFIG_PLACEHOLDER/server-addresses { 10.53.0.4; };/' tmp > ns2/named.conf
+$RNDCCMD 10.53.0.2 reload 2>&1 | sed 's/^/ns2 /' | cat_i
+$DIG $DIGOPTS +tcp data2.example.org. @10.53.0.2 txt > dig.out.ns2.test$n || ret=1
 grep "2nd example org data" dig.out.ns2.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:checking static-stub of a undelegated tld resolves after DS query ($n)"
+echo_i "checking static-stub of a undelegated tld resolves after DS query ($n)"
 ret=0
-$DIG undelegated. @10.53.0.2 ds -p 5300 > dig.out.ns2.ds.test$n
-$DIG undelegated. @10.53.0.2 soa -p 5300 > dig.out.ns2.soa.test$n
+$DIG $DIGOPTS undelegated. @10.53.0.2 ds > dig.out.ns2.ds.test$n
+$DIG $DIGOPTS undelegated. @10.53.0.2 soa > dig.out.ns2.soa.test$n
 grep "status: NXDOMAIN" dig.out.ns2.ds.test$n > /dev/null || ret=1
 grep "status: NOERROR" dig.out.ns2.soa.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
diff --git a/bin/tests/system/statistics/clean.sh b/bin/tests/system/statistics/clean.sh
deleted file mode 100644 (file)
index dc11e37..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2015  Internet Systems Consortium, Inc. ("ISC")
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
-# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-# AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
-# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-# PERFORMANCE OF THIS SOFTWARE.
-
-# $Id$
-
-#
-# Clean up after zone transfer tests.
-#
-
-rm -f ns3/example.bk
-rm -f ns3/internal.bk
-rm -f */named.memstats
-rm -f */named.run
-rm -f */ans.run
-rm -f */named.stats
-rm -f dig.out*
-rm -f curl.out.*
diff --git a/bin/tests/system/statistics/ns1/named.conf b/bin/tests/system/statistics/ns1/named.conf
deleted file mode 100644 (file)
index e55c3ae..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2015  Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* $Id$ */
-
-controls { /* empty */ };
-
-options {
-       query-source address 10.53.0.1;
-       notify-source 10.53.0.1;
-       transfer-source 10.53.0.1;
-       port 5300;
-       pid-file "named.pid";
-       listen-on { 10.53.0.1; };
-       listen-on-v6 { none; };
-       recursion no;
-       notify yes;
-};
-
-statistics-channels {
-       inet 10.53.0.1 port 8053 allow { any; };
-};
-
-zone "32/1.0.0.127-in-addr.example." {
-       type master;
-       file "zone.db";
-};
diff --git a/bin/tests/system/statistics/ns1/zone.db b/bin/tests/system/statistics/ns1/zone.db
deleted file mode 100644 (file)
index 0dbc615..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-; Copyright (C) 2015  Internet Systems Consortium, Inc. ("ISC")
-;
-; Permission to use, copy, modify, and/or distribute this software for any
-; purpose with or without fee is hereby granted, provided that the above
-; copyright notice and this permission notice appear in all copies.
-;
-; THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
-; REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-; AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
-; INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-; LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-; OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-; PERFORMANCE OF THIS SOFTWARE.
-
-@              3600    IN SOA  ns.example. hostmaster.example. 1 3600 1200 604800 3600
-@              3600    IN NS   ns.example.
-ns.example.    3600    IN A    10.53.0.1
diff --git a/bin/tests/system/statistics/tests.sh b/bin/tests/system/statistics/tests.sh
deleted file mode 100644 (file)
index 0919e4e..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2015, 2016  Internet Systems Consortium, Inc. ("ISC")
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
-# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-# AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
-# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-# PERFORMANCE OF THIS SOFTWARE.
-
-SYSTEMTESTTOP=..
-. $SYSTEMTESTTOP/conf.sh
-
-DIGOPTS="+tcp +noadd +nosea +nostat +noquest +nocomm +nocmd"
-DIGCMD="$DIG $DIGOPTS -p 5300"
-RNDCCMD="$RNDC -p 9953 -c ../common/rndc.conf"
-
-status=0
-t=0
-
-ret=0
-t=`expr $t + 1`
-echo "I:checking that zones with slash are properly shown in XML output (${t})"
-if $FEATURETEST --have-libxml2 && [ -x ${CURL} ] ; then
-    if $FEATURETEST --enable-newstats
-    then
-        ${CURL} http://10.53.0.1:8053/xml/v3 > curl.out.${t} 2>/dev/null || ret=1
-        grep '<zone name="32/1.0.0.127-in-addr.example" rdataclass="IN">' curl.out.${t} > /dev/null || ret=1
-    else
-        ${CURL} http://10.53.0.1:8053/xml > curl.out.${t} 2>/dev/null || ret=1
-awk '/<zone>/ { count=1 ; next }
-     /<name>32\/1.0.0.127-in-addr.example<\/name>/ && count == 1 { count = 2 ; next}
-     /<rdataclass>IN<\/rdataclass>/ && count == 2 { good = 1 }
-     {count=0}
-     END { if (good) exit (0); exit (1) }' curl.out.${t} || ret=1
-    fi
-else
-  echo "I:skipping test as libxml2 and/or curl was not found"
-fi
-if [ $ret != 0 ]; then echo "I:failed"; fi
-status=`expr $status + $ret`
-
-echo "I:exit status: $status"
-[ $status -eq 0 ] || exit 1
index a63e007aa5d59ddedebeed42025e15b6ca4cbd3e..b73bcd124da49468b5d6f5b78f31e88026034f35 100644 (file)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: clean.sh,v 1.10 2007/09/26 03:22:44 marka Exp $
-
 #
 # Clean up after stub tests.
 #
 rm -f dig.out.ns3 ns3/child.example.st
 rm -f */named.memstats
+rm -f */named.conf
 rm -f */named.run
similarity index 91%
rename from bin/tests/system/notify/ns1/named.conf
rename to bin/tests/system/stub/ns1/named.conf.in
index 29b22e5715e24b92d1b60deebc7a29667ae45bb8..cae3cbb12eefb40d89de2d4ecb3c3215c3822def 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.18 2007/06/19 23:47:04 tbox Exp $ */
-
-controls { /* empty */ };
-
 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 92%
rename from bin/tests/system/stub/ns2/named.conf
rename to bin/tests/system/stub/ns2/named.conf.in
index 888b5e04224abf8a6b9463dbbc43d2415960e393..52fd53e2d2caa3aae35dbb35dd0e181e21c92bbc 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.14 2007/06/19 23:47:05 tbox Exp $ */
-
-controls { /* empty */ };
-
 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 92%
rename from bin/tests/system/stub/ns3/named.conf
rename to bin/tests/system/stub/ns3/named.conf.in
index 89ba16e91a72fed4cac67937cf6cee2010d829ce..ca08bff60bda789157e6f352c23a6287c4d8667a 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.16 2007/06/18 23:47:31 tbox Exp $ */
-
-controls { /* empty */ };
-
 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/stub/setup.sh b/bin/tests/system/stub/setup.sh
new file mode 100644 (file)
index 0000000..5a1b70f
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/sh
+#
+# Copyright (C)  2018  Internet Systems Consortium, Inc. ("ISC")
+#
+# 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 http://mozilla.org/MPL/2.0/.
+
+SYSTEMTESTTOP=..
+. $SYSTEMTESTTOP/conf.sh
+
+$SHELL clean.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 1a3c8ec857b394ca59920f6f7c5a8d7699d7e0a0..657065438f3846c91cf8b63150a6d0fa4659c8b1 100644 (file)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: tests.sh,v 1.16 2011/11/02 23:46:24 tbox Exp $
-
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
+DIGOPTS="+tcp -p ${PORT}"
+
 status=0
-echo "I:check that the stub zone has been saved to disk"
+echo_i "check that the stub zone has been saved to disk"
 for i in 1 2 3 4 5 6 7 8 9 20
 do
        [ -f ns3/child.example.st ] && break
        sleep 1
 done
-[ -f ns3/child.example.st ] || { status=1;  echo "I:failed"; }
+[ -f ns3/child.example.st ] || { status=1;  echo_i "failed"; }
 
 for pass in 1 2
 do
 
-echo "I:trying an axfr that should be denied (NOTAUTH) (pass=$pass)"
+echo_i "trying an axfr that should be denied (NOTAUTH) (pass=$pass)"
 ret=0
-$DIG +tcp child.example. @10.53.0.3 axfr -p 5300 > dig.out.ns3 || ret=1
+$DIG $DIGOPTS child.example. @10.53.0.3 axfr > dig.out.ns3 || ret=1
 grep "; Transfer failed." dig.out.ns3 > /dev/null || ret=1
-[ $ret = 0 ] || { status=1;  echo "I:failed"; }
+[ $ret = 0 ] || { status=1;  echo_i "failed"; }
 
-echo "I:look for stub zone data without recursion (should not be found) (pass=$pass)"
+echo_i "look for stub zone data without recursion (should not be found) (pass=$pass)"
 for i in 1 2 3 4 5 6 7 8 9
 do
        ret=0
-       $DIG +tcp +norec data.child.example. \
-               @10.53.0.3 txt -p 5300 > dig.out.ns3 || ret=1
+       $DIG $DIGOPTS +norec data.child.example. \
+               @10.53.0.3 txt > dig.out.ns3 || ret=1
        grep "status: NOERROR" dig.out.ns3 > /dev/null || ret=1
        [ $ret = 0 ] && break
        sleep 1
 done
 $PERL ../digcomp.pl knowngood.dig.out.norec dig.out.ns3 || ret=1
-[ $ret = 0 ] || { status=1;  echo "I:failed"; }
+[ $ret = 0 ] || { status=1;  echo_i "failed"; }
 
-echo "I:look for stub zone data with recursion (should be found) (pass=$pass)"
+echo_i "look for stub zone data with recursion (should be found) (pass=$pass)"
 ret=0
-$DIG +tcp data.child.example. @10.53.0.3 txt -p 5300 > dig.out.ns3 || ret=1
+$DIG $DIGOPTS +tcp data.child.example. @10.53.0.3 txt > dig.out.ns3 || ret=1
 $PERL ../digcomp.pl knowngood.dig.out.rec dig.out.ns3 || ret=1
-[ $ret = 0 ] || { status=1;  echo "I:failed"; }
+[ $ret = 0 ] || { status=1;  echo_i "failed"; }
 
 [ $pass = 1 ] && {
-       echo "I:stopping stub server"
+       echo_i "stopping stub server"
        $PERL $SYSTEMTESTTOP/stop.pl . ns3
 
-       echo "I:re-starting stub server"
-       $PERL $SYSTEMTESTTOP/start.pl --noclean --restart . ns3
+       echo_i "re-starting stub server"
+       $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . ns3
 }
 done
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index 4e5b60683e0973ff0e2f555c0b5fcbda138fc2eb..7ec161073144c8a027ae1cd1c95ef134d3e9581d 100644 (file)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: clean.sh,v 1.6 2007/09/26 03:22:44 marka Exp $
-
 #
 # Clean up after tsig tests.
 #
 
 rm -f dig.out.*
 rm -f */named.memstats
+rm -f */named.conf
 rm -f */named.run
 rm -f Kexample.net.+163+*
 rm -f keygen.out?
similarity index 95%
rename from bin/tests/system/tsig/ns1/named.conf
rename to bin/tests/system/tsig/ns1/named.conf.in
index b48de835f4b9d295cbeb8ce6eee12ad368ded8e4..108e8c3e7747368e0b4a4d4585c8acb5154f5e8a 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.5 2007/06/19 23:47:06 tbox Exp $ */
-
-controls { /* empty */ };
-
 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; };
index f56c5ae39e44795efad3a3f788b717a90b13aa3f..5058c2c5f690aaa584accc1182f5443fe2d8e051 100644 (file)
@@ -17,6 +17,8 @@
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
-sh clean.sh
+$SHELL clean.sh
+
+copy_setports ns1/named.conf.in ns1/named.conf
 
 test -r $RANDFILE || $GENRANDOM 400 $RANDFILE
index 24e04ba07129654231ae7484ae9ebfec258999dd..5e5d791b57b65ff7851d9f7af7b3c06a88e884ce 100644 (file)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: tests.sh,v 1.7 2011/11/06 23:46:40 tbox Exp $
-
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
+DIGOPTS="+tcp +nosea +nostat +noquest +nocomm +nocmd -p ${PORT}"
+
 #
 # Shared secrets.
 #
@@ -31,67 +31,60 @@ sha512="jI/Pa4qRu96t76Pns5Z/Ndxbn3QCkwcxLOgt9vgvnJw5wqTRvNyk3FtD6yIMd1dWVlqZ+Y4f
 
 status=0
 
-echo "I:fetching using hmac-md5 (old form)"
+echo_i "fetching using hmac-md5 (old form)"
 ret=0
-$DIG +tcp +nosea +nostat +noquest +nocomm +nocmd example.nil.\
-       -y "md5:$md5" @10.53.0.1 soa -p 5300 > dig.out.md5.old || ret=1
+$DIG $DIGOPTS example.nil. -y "md5:$md5" @10.53.0.1 soa > dig.out.md5.old || ret=1
 grep -i "md5.*TSIG.*NOERROR" dig.out.md5.old > /dev/null || ret=1
 if [ $ret -eq 1 ] ; then
-       echo "I: failed"; status=1
+       echo_i "failed"; status=1
 fi
 
-echo "I:fetching using hmac-md5 (new form)"
+echo_i "fetching using hmac-md5 (new form)"
 ret=0
-$DIG +tcp +nosea +nostat +noquest +nocomm +nocmd example.nil.\
-       -y "hmac-md5:md5:$md5" @10.53.0.1 soa -p 5300 > dig.out.md5.new || ret=1
+$DIG $DIGOPTS example.nil. -y "hmac-md5:md5:$md5" @10.53.0.1 soa > dig.out.md5.new || ret=1
 grep -i "md5.*TSIG.*NOERROR" dig.out.md5.new > /dev/null || ret=1
 if [ $ret -eq 1 ] ; then
-       echo "I: failed"; status=1
+       echo_i "failed"; status=1
 fi
 
-echo "I:fetching using hmac-sha1"
+echo_i "fetching using hmac-sha1"
 ret=0
-$DIG +tcp +nosea +nostat +noquest +nocomm +nocmd example.nil.\
-       -y "hmac-sha1:sha1:$sha1" @10.53.0.1 soa -p 5300 > dig.out.sha1 || ret=1
+$DIG $DIGOPTS example.nil. -y "hmac-sha1:sha1:$sha1" @10.53.0.1 soa > dig.out.sha1 || ret=1
 grep -i "sha1.*TSIG.*NOERROR" dig.out.sha1 > /dev/null || ret=1
 if [ $ret -eq 1 ] ; then
-       echo "I: failed"; status=1
+       echo_i "failed"; status=1
 fi
 
-echo "I:fetching using hmac-sha224"
+echo_i "fetching using hmac-sha224"
 ret=0
-$DIG +tcp +nosea +nostat +noquest +nocomm +nocmd example.nil.\
-       -y "hmac-sha224:sha224:$sha224" @10.53.0.1 soa -p 5300 > dig.out.sha224 || ret=1
+$DIG $DIGOPTS example.nil. -y "hmac-sha224:sha224:$sha224" @10.53.0.1 soa > dig.out.sha224 || ret=1
 grep -i "sha224.*TSIG.*NOERROR" dig.out.sha224 > /dev/null || ret=1
 if [ $ret -eq 1 ] ; then
-       echo "I: failed"; status=1
+       echo_i "failed"; status=1
 fi
 
-echo "I:fetching using hmac-sha256"
+echo_i "fetching using hmac-sha256"
 ret=0
-$DIG +tcp +nosea +nostat +noquest +nocomm +nocmd example.nil.\
-       -y "hmac-sha256:sha256:$sha256" @10.53.0.1 soa -p 5300 > dig.out.sha256 || ret=1
+$DIG $DIGOPTS example.nil. -y "hmac-sha256:sha256:$sha256" @10.53.0.1 soa > dig.out.sha256 || ret=1
 grep -i "sha256.*TSIG.*NOERROR" dig.out.sha256 > /dev/null || ret=1
 if [ $ret -eq 1 ] ; then
-       echo "I: failed"; status=1
+       echo_i "failed"; status=1
 fi
 
-echo "I:fetching using hmac-sha384"
+echo_i "fetching using hmac-sha384"
 ret=0
-$DIG +tcp +nosea +nostat +noquest +nocomm +nocmd example.nil.\
-       -y "hmac-sha384:sha384:$sha384" @10.53.0.1 soa -p 5300 > dig.out.sha384 || ret=1
+$DIG $DIGOPTS example.nil. -y "hmac-sha384:sha384:$sha384" @10.53.0.1 soa > dig.out.sha384 || ret=1
 grep -i "sha384.*TSIG.*NOERROR" dig.out.sha384 > /dev/null || ret=1
 if [ $ret -eq 1 ] ; then
-       echo "I: failed"; status=1
+       echo_i "failed"; status=1
 fi
 
-echo "I:fetching using hmac-sha512"
+echo_i "fetching using hmac-sha512"
 ret=0
-$DIG +tcp +nosea +nostat +noquest +nocomm +nocmd example.nil.\
-       -y "hmac-sha512:sha512:$sha512" @10.53.0.1 soa -p 5300 > dig.out.sha512 || ret=1
+$DIG $DIGOPTS example.nil. -y "hmac-sha512:sha512:$sha512" @10.53.0.1 soa > dig.out.sha512 || ret=1
 grep -i "sha512.*TSIG.*NOERROR" dig.out.sha512 > /dev/null || ret=1
 if [ $ret -eq 1 ] ; then
-       echo "I: failed"; status=1
+       echo_i "failed"; status=1
 fi
 
 #
@@ -99,58 +92,52 @@ fi
 #      Truncated TSIG
 #
 #
-echo "I:fetching using hmac-md5 (trunc)"
+echo_i "fetching using hmac-md5 (trunc)"
 ret=0
-$DIG +tcp +nosea +nostat +noquest +nocomm +nocmd example.nil.\
-       -y "hmac-md5-80:md5-trunc:$md5" @10.53.0.1 soa -p 5300 > dig.out.md5.trunc || ret=1
+$DIG $DIGOPTS example.nil. -y "hmac-md5-80:md5-trunc:$md5" @10.53.0.1 soa > dig.out.md5.trunc || ret=1
 grep -i "md5-trunc.*TSIG.*NOERROR" dig.out.md5.trunc > /dev/null || ret=1
 if [ $ret -eq 1 ] ; then
-       echo "I: failed"; status=1
+       echo_i "failed"; status=1
 fi
 
-echo "I:fetching using hmac-sha1 (trunc)"
+echo_i "fetching using hmac-sha1 (trunc)"
 ret=0
-$DIG +tcp +nosea +nostat +noquest +nocomm +nocmd example.nil.\
-       -y "hmac-sha1-80:sha1-trunc:$sha1" @10.53.0.1 soa -p 5300 > dig.out.sha1.trunc || ret=1
+$DIG $DIGOPTS example.nil. -y "hmac-sha1-80:sha1-trunc:$sha1" @10.53.0.1 soa > dig.out.sha1.trunc || ret=1
 grep -i "sha1.*TSIG.*NOERROR" dig.out.sha1.trunc > /dev/null || ret=1
 if [ $ret -eq 1 ] ; then
-       echo "I: failed"; status=1
+       echo_i "failed"; status=1
 fi
 
-echo "I:fetching using hmac-sha224 (trunc)"
+echo_i "fetching using hmac-sha224 (trunc)"
 ret=0
-$DIG +tcp +nosea +nostat +noquest +nocomm +nocmd example.nil.\
-       -y "hmac-sha224-112:sha224-trunc:$sha224" @10.53.0.1 soa -p 5300 > dig.out.sha224.trunc || ret=1
+$DIG $DIGOPTS example.nil. -y "hmac-sha224-112:sha224-trunc:$sha224" @10.53.0.1 soa > dig.out.sha224.trunc || ret=1
 grep -i "sha224-trunc.*TSIG.*NOERROR" dig.out.sha224.trunc > /dev/null || ret=1
 if [ $ret -eq 1 ] ; then
-       echo "I: failed"; status=1
+       echo_i "failed"; status=1
 fi
 
-echo "I:fetching using hmac-sha256 (trunc)"
+echo_i "fetching using hmac-sha256 (trunc)"
 ret=0
-$DIG +tcp +nosea +nostat +noquest +nocomm +nocmd example.nil.\
-       -y "hmac-sha256-128:sha256-trunc:$sha256" @10.53.0.1 soa -p 5300 > dig.out.sha256.trunc || ret=1
+$DIG $DIGOPTS example.nil. -y "hmac-sha256-128:sha256-trunc:$sha256" @10.53.0.1 soa > dig.out.sha256.trunc || ret=1
 grep -i "sha256-trunc.*TSIG.*NOERROR" dig.out.sha256.trunc > /dev/null || ret=1
 if [ $ret -eq 1 ] ; then
-       echo "I: failed"; status=1
+       echo_i "failed"; status=1
 fi
 
-echo "I:fetching using hmac-sha384 (trunc)"
+echo_i "fetching using hmac-sha384 (trunc)"
 ret=0
-$DIG +tcp +nosea +nostat +noquest +nocomm +nocmd example.nil.\
-       -y "hmac-sha384-192:sha384-trunc:$sha384" @10.53.0.1 soa -p 5300 > dig.out.sha384.trunc || ret=1
+$DIG $DIGOPTS example.nil. -y "hmac-sha384-192:sha384-trunc:$sha384" @10.53.0.1 soa > dig.out.sha384.trunc || ret=1
 grep -i "sha384-trunc.*TSIG.*NOERROR" dig.out.sha384.trunc > /dev/null || ret=1
 if [ $ret -eq 1 ] ; then
-       echo "I: failed"; status=1
+       echo_i "failed"; status=1
 fi
 
-echo "I:fetching using hmac-sha512-256 (trunc)"
+echo_i "fetching using hmac-sha512-256 (trunc)"
 ret=0
-$DIG +tcp +nosea +nostat +noquest +nocomm +nocmd example.nil.\
-       -y "hmac-sha512-256:sha512-trunc:$sha512" @10.53.0.1 soa -p 5300 > dig.out.sha512.trunc || ret=1
+$DIG $DIGOPTS example.nil. -y "hmac-sha512-256:sha512-trunc:$sha512" @10.53.0.1 soa > dig.out.sha512.trunc || ret=1
 grep -i "sha512-trunc.*TSIG.*NOERROR" dig.out.sha512.trunc > /dev/null || ret=1
 if [ $ret -eq 1 ] ; then
-       echo "I: failed"; status=1
+       echo_i "failed"; status=1
 fi
 
 
@@ -159,79 +146,71 @@ fi
 #      Check for bad truncation.
 #
 #
-echo "I:fetching using hmac-md5-80 (BADTRUNC)" 
+echo_i "fetching using hmac-md5-80 (BADTRUNC)"
 ret=0
-$DIG +tcp +nosea +nostat +noquest +nocomm +nocmd example.nil.\
-       -y "hmac-md5-80:md5:$md5" @10.53.0.1 soa -p 5300 > dig.out.md5-80 || ret=1
+$DIG $DIGOPTS example.nil. -y "hmac-md5-80:md5:$md5" @10.53.0.1 soa > dig.out.md5-80 || ret=1
 grep -i "md5.*TSIG.*BADTRUNC" dig.out.md5-80 > /dev/null || ret=1
 if [ $ret -eq 1 ] ; then
-       echo "I: failed"; status=1
+       echo_i "failed"; status=1
 fi
 
-echo "I:fetching using hmac-sha1-80 (BADTRUNC)"
+echo_i "fetching using hmac-sha1-80 (BADTRUNC)"
 ret=0
-$DIG +tcp +nosea +nostat +noquest +nocomm +nocmd example.nil.\
-       -y "hmac-sha1-80:sha1:$sha1" @10.53.0.1 soa -p 5300 > dig.out.sha1-80 || ret=1
+$DIG $DIGOPTS example.nil. -y "hmac-sha1-80:sha1:$sha1" @10.53.0.1 soa > dig.out.sha1-80 || ret=1
 grep -i "sha1.*TSIG.*BADTRUNC" dig.out.sha1-80 > /dev/null || ret=1
 if [ $ret -eq 1 ] ; then
-       echo "I: failed"; status=1
+       echo_i "failed"; status=1
 fi
 
-echo "I:fetching using hmac-sha224-112 (BADTRUNC)"
+echo_i "fetching using hmac-sha224-112 (BADTRUNC)"
 ret=0
-$DIG +tcp +nosea +nostat +noquest +nocomm +nocmd example.nil.\
-       -y "hmac-sha224-112:sha224:$sha224" @10.53.0.1 soa -p 5300 > dig.out.sha224-112 || ret=1
+$DIG $DIGOPTS example.nil. -y "hmac-sha224-112:sha224:$sha224" @10.53.0.1 soa > dig.out.sha224-112 || ret=1
 grep -i "sha224.*TSIG.*BADTRUNC" dig.out.sha224-112 > /dev/null || ret=1
 if [ $ret -eq 1 ] ; then
-       echo "I: failed"; status=1
+       echo_i "failed"; status=1
 fi
 
-echo "I:fetching using hmac-sha256-128 (BADTRUNC)"
+echo_i "fetching using hmac-sha256-128 (BADTRUNC)"
 ret=0
-$DIG +tcp +nosea +nostat +noquest +nocomm +nocmd example.nil.\
-       -y "hmac-sha256-128:sha256:$sha256" @10.53.0.1 soa -p 5300 > dig.out.sha256-128 || ret=1
+$DIG $DIGOPTS example.nil. -y "hmac-sha256-128:sha256:$sha256" @10.53.0.1 soa > dig.out.sha256-128 || ret=1
 grep -i "sha256.*TSIG.*BADTRUNC" dig.out.sha256-128 > /dev/null || ret=1
 if [ $ret -eq 1 ] ; then
-       echo "I: failed"; status=1
+       echo_i "failed"; status=1
 fi
 
-echo "I:fetching using hmac-sha384-192 (BADTRUNC)"
+echo_i "fetching using hmac-sha384-192 (BADTRUNC)"
 ret=0
-$DIG +tcp +nosea +nostat +noquest +nocomm +nocmd example.nil.\
-       -y "hmac-sha384-192:sha384:$sha384" @10.53.0.1 soa -p 5300 > dig.out.sha384-192 || ret=1
+$DIG $DIGOPTS example.nil. -y "hmac-sha384-192:sha384:$sha384" @10.53.0.1 soa > dig.out.sha384-192 || ret=1
 grep -i "sha384.*TSIG.*BADTRUNC" dig.out.sha384-192 > /dev/null || ret=1
 if [ $ret -eq 1 ] ; then
-       echo "I: failed"; status=1
+       echo_i "failed"; status=1
 fi
 
-echo "I:fetching using hmac-sha512-256 (BADTRUNC)"
+echo_i "fetching using hmac-sha512-256 (BADTRUNC)"
 ret=0
-$DIG +tcp +nosea +nostat +noquest +nocomm +nocmd example.nil.\
-       -y "hmac-sha512-256:sha512:$sha512" @10.53.0.1 soa -p 5300 > dig.out.sha512-256 || ret=1
+$DIG $DIGOPTS example.nil. -y "hmac-sha512-256:sha512:$sha512" @10.53.0.1 soa > dig.out.sha512-256 || ret=1
 grep -i "sha512.*TSIG.*BADTRUNC" dig.out.sha512-256 > /dev/null || ret=1
 if [ $ret -eq 1 ] ; then
-       echo "I: failed"; status=1
+       echo_i "failed"; status=1
 fi
 
-echo "I:attempting fetch with bad tsig algorithm"
+echo_i "attempting fetch with bad tsig algorithm"
 ret=0
-$DIG +tcp +nosea +nostat +noquest +nocomm +nocmd example.nil.\
-       -y "badalgo:invalid:$sha512" @10.53.0.1 soa -p 5300 > dig.out.badalgo 2>&1 || ret=1
+$DIG $DIGOPTS example.nil. -y "badalgo:invalid:$sha512" @10.53.0.1 soa > dig.out.badalgo 2>&1 || ret=1
 grep -i "Couldn't create key invalid: algorithm is unsupported" dig.out.badalgo > /dev/null || ret=1
 if [ $ret -eq 1 ] ; then
-       echo "I: failed"; status=1
+       echo_i "failed"; status=1
 fi
 
-echo "I:checking both OPT and TSIG records are returned when TC=1"
+echo_i "checking both OPT and TSIG records are returned when TC=1"
 ret=0
-$DIG +ignore +bufsize=512 large.example.nil \
-       -y "hmac-sha1:sha1:$sha1" @10.53.0.1 txt -p 5300 > dig.out.large 2>&1 || ret=1
+$DIG -p ${PORT} +ignore +bufsize=512 large.example.nil -y "hmac-sha1:sha1:$sha1" @10.53.0.1 txt > dig.out.large 2>&1 || ret=1
 grep "flags:.* tc[ ;]" dig.out.large > /dev/null || ret=1
 grep "status: NOERROR" dig.out.large > /dev/null || ret=1
 grep "EDNS:" dig.out.large > /dev/null || ret=1
 grep -i "sha1.*TSIG.*NOERROR" dig.out.sha1 > /dev/null || ret=1
 if [ $ret -eq 1 ] ; then
-       echo "I: failed"; status=1
+       echo_i "failed"; status=1
 fi
 
 echo "I:check that multiple dnssec-keygen calls don't emit dns_dnssec_findmatchingkeys warning"
@@ -244,5 +223,5 @@ if [ $ret -eq 1 ] ; then
        echo "I: failed"; status=1
 fi
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index 377efa030f55daa7ea7d73b0e831a685aa065452..5ea86284b8171eb44b64d8c7cb16b5f02cddf1c2 100644 (file)
@@ -14,8 +14,6 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: authsock.pl,v 1.3 2011/01/07 23:47:07 tbox Exp $
-
 # test the update-policy external protocol
 
 require 5.6.0;
index ba5dc63f490a7f15a80054cfaf532ac27ed1c90b..9b5097f7b4cb74273e398b1bebb17c81dc92aa1c 100644 (file)
@@ -7,6 +7,7 @@ rm -f ns1/*.jnl ns1/update.txt ns1/auth.sock
 rm -f ns1/*.db ns1/K*.key ns1/K*.private
 rm -f ns1/_default.tsigkeys
 rm -f */named.memstats
+rm -f */named.conf
 rm -f */named.run
 rm -f authsock.pid
 rm -f ns1/core
similarity index 91%
rename from bin/tests/system/tsiggss/ns1/named.conf
rename to bin/tests/system/tsiggss/ns1/named.conf.in
index 645d578d9b444921a791cf40edfc9f8bab87b546..bb8096db29741273e92180fdcb6376e9c07c6668 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.6 2011/01/06 23:47:00 tbox Exp $ */
-
-controls { };
-
 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";
        session-keyfile "session.key";
        listen-on { 10.53.0.1; 127.0.0.1; };
@@ -38,7 +34,7 @@ key rndc_key {
 };
 
 controls {
-       inet 10.53.0.1 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.1 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 zone "example.nil." IN {
index f92c46cdc1b81f28520a32902ca53616bdf57503..d45508d5133f6eb864507215d4c94693cc9de8bf 100644 (file)
@@ -19,7 +19,7 @@ SYSTEMTESTTOP=..
 
 # enable the tsiggss test only if gssapi was enabled
 $FEATURETEST --gssapi ||  {
-        echo "I:gssapi and krb5 not supported - skipping tsiggss test"
+        echo_i "gssapi and krb5 not supported - skipping tsiggss test"
         exit 255
 }
 
index 65accdae485a2cdcf5505b239fb0174c50ae245a..54d34cc503f485fcb38e11134496914dccf670af 100644 (file)
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
+$SHELL clean.sh
+
 test -r $RANDFILE || $GENRANDOM 400 $RANDFILE
 
-rm -f ns1/*.jnl ns1/K*.key ns1/K*.private ns1/_default.tsigkeys
+copy_setports ns1/named.conf.in ns1/named.conf
 
 key=`$KEYGEN -Cq -K ns1 -a DSA -b 512 -r $RANDFILE -n HOST -T KEY key.example.nil.`
 cat ns1/example.nil.db.in ns1/${key}.key > ns1/example.nil.db
index d056b02cec66238788f221d41d4250c799ecc763..993b73fe38d1a64f1e056413ca6ff708630450a1 100644 (file)
@@ -6,7 +6,7 @@ SYSTEMTESTTOP=..
 
 status=0
 
-DIGOPTS="@10.53.0.1 -p 5300"
+DIGOPTS="@10.53.0.1 -p ${PORT}"
 
 test_update() {
     host="$1"
@@ -15,7 +15,7 @@ test_update() {
     digout="$4"
 
     cat <<EOF > ns1/update.txt
-server 10.53.0.1 5300
+server 10.53.0.1 ${PORT}
 update add $host $cmd
 send
 EOF
@@ -60,7 +60,7 @@ test_update testcname.example.nil. TXT "86400 A 10.53.0.13" "10.53.0.13" > /dev/
 echo "I:testing external policy with SIG(0) key"
 ret=0
 $NSUPDATE -R $RANDFILE -k ns1/Kkey.example.nil.*.private <<END > /dev/null 2>&1 || ret=1
-server 10.53.0.1 5300
+server 10.53.0.1 ${PORT}
 zone example.nil
 update add fred.example.nil 120 cname foo.bar.
 send
index c8709b52f849710a1367ebc78d20856a1a306cbd..4455ab18c67c79f82aafe6868cab60b9cbcaf669 100644 (file)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: clean.sh,v 1.7 2007/09/26 03:22:44 marka Exp $
-
 rm -f dig.out check.out
 rm -f */named.memstats
+rm -f */named.conf
 rm -f */named.run
 rm -f */*.bk
 rm -f */*.bk.*
similarity index 94%
rename from bin/tests/system/unknown/ns1/named.conf
rename to bin/tests/system/unknown/ns1/named.conf.in
index be3b57e2c5d22a75e2240f77bfd3b483355a9db7..2bc21637ec61da7c94027d8611e4808566eeebba 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.11 2007/06/19 23:47:06 tbox Exp $ */
-
-controls { /* empty */ };
-
 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 91%
rename from bin/tests/system/unknown/ns2/named.conf
rename to bin/tests/system/unknown/ns2/named.conf.in
index a2e867125b739b47f0deda0013c05ae2947545c4..e6c432733977520590386c1c08cfc87045f6ba15 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.11 2007/06/19 23:47:06 tbox Exp $ */
-
-controls { /* empty */ };
-
 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 91%
rename from bin/tests/system/unknown/ns3/named.conf
rename to bin/tests/system/unknown/ns3/named.conf.in
index 248aebae3852689583e1e8e75c908bdb39e6a039..1ad856b524bf9cf53c456d62e94ba9720d6b1323 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.11 2007/06/19 23:47:06 tbox Exp $ */
-
-controls { /* empty */ };
-
 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; };
index 317b75c115bf037fb71a171f858418c30840c9b7..a3f2c2a687270caf8463030c456851a135b49114 100644 (file)
@@ -19,4 +19,8 @@ $SHELL clean.sh
 
 test -r $RANDFILE || $GENRANDOM 400 $RANDFILE
 
+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
+
 (cd ns3; $SHELL -e sign.sh)
index 2d9dba9b48f6637da2f9a3fddf0bf5cae9b364d8..f6cd1f182af80a1ea077f96ee04b6b51e80c5dc5 100644 (file)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: tests.sh,v 1.12 2011/11/02 23:46:24 tbox Exp $
-
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
 status=0
 
-DIGOPTS="-p 5300"
+DIGOPTS="-p ${PORT}"
 
-echo "I:querying for various representations of an IN A record"
+echo_i "querying for various representations of an IN A record"
 for i in 1 2 3 4 5 6 7 8 9 10 11 12
 do
        ret=0
        $DIG +short $DIGOPTS @10.53.0.1 a$i.example a in > dig.out || ret=1
-       echo 10.0.0.1 | diff - dig.out || ret=1
+       echo 10.0.0.1 | $DIFF - dig.out || ret=1
        if [ $ret != 0 ]
        then
                echo "#$i failed"
@@ -37,12 +35,12 @@ do
        status=`expr $status + $ret`
 done
 
-echo "I:querying for various representations of an IN TXT record"
+echo_i "querying for various representations of an IN TXT record"
 for i in 1 2 3 4 5 6 7
 do
        ret=0
        $DIG +short $DIGOPTS @10.53.0.1 txt$i.example txt in > dig.out || ret=1
-       echo '"hello"' | diff - dig.out || ret=1
+       echo '"hello"' | $DIFF - dig.out || ret=1
        if [ $ret != 0 ]
        then
                echo "#$i failed"
@@ -50,12 +48,12 @@ do
        status=`expr $status + $ret`
 done
 
-echo "I:querying for various representations of an IN TYPE123 record"
+echo_i "querying for various representations of an IN TYPE123 record"
 for i in 1 2 3
 do
        ret=0
        $DIG +short $DIGOPTS @10.53.0.1 unk$i.example type123 in > dig.out || ret=1
-       echo '\# 1 00' | diff - dig.out || ret=1
+       echo '\# 1 00' | $DIFF - dig.out || ret=1
        if [ $ret != 0 ]
        then
                echo "#$i failed"
@@ -63,26 +61,26 @@ do
        status=`expr $status + $ret`
 done
 
-echo "I:querying for NULL record"
+echo_i "querying for NULL record"
 ret=0
 $DIG +short $DIGOPTS @10.53.0.1 null.example null in > dig.out || ret=1
-echo '\# 1 00' | diff - dig.out || ret=1
-[ $ret = 0 ] || echo "I: failed"
+echo '\# 1 00' | $DIFF - dig.out || ret=1
+[ $ret = 0 ] || echo_i "failed"
 status=`expr $status + $ret`
 
-echo "I:querying for empty NULL record"
+echo_i "querying for empty NULL record"
 ret=0
 $DIG +short $DIGOPTS @10.53.0.1 empty.example null in > dig.out || ret=1
-echo '\# 0' | diff - dig.out || ret=1
-[ $ret = 0 ] || echo "I: failed"
+echo '\# 0' | $DIFF - dig.out || ret=1
+[ $ret = 0 ] || echo_i "failed"
 status=`expr $status + $ret`
 
-echo "I:querying for various representations of a CLASS10 TYPE1 record"
+echo_i "querying for various representations of a CLASS10 TYPE1 record"
 for i in 1 2
 do
        ret=0
        $DIG +short $DIGOPTS @10.53.0.1 a$i.example a class10 > dig.out || ret=1
-       echo '\# 4 0A000001' | diff - dig.out || ret=1
+       echo '\# 4 0A000001' | $DIFF - dig.out || ret=1
        if [ $ret != 0 ]
        then
                echo "#$i failed"
@@ -90,12 +88,12 @@ do
        status=`expr $status + $ret`
 done
 
-echo "I:querying for various representations of a CLASS10 TXT record"
+echo_i "querying for various representations of a CLASS10 TXT record"
 for i in 1 2 3 4
 do
        ret=0
        $DIG +short $DIGOPTS @10.53.0.1 txt$i.example txt class10 > dig.out || ret=1
-       echo '"hello"' | diff - dig.out || ret=1
+       echo '"hello"' | $DIFF - dig.out || ret=1
        if [ $ret != 0 ]
        then
                echo "#$i failed"
@@ -103,12 +101,12 @@ do
        status=`expr $status + $ret`
 done
 
-echo "I:querying for various representations of a CLASS10 TYPE123 record"
+echo_i "querying for various representations of a CLASS10 TYPE123 record"
 for i in 1 2
 do
        ret=0
        $DIG +short $DIGOPTS @10.53.0.1 unk$i.example type123 class10 > dig.out || ret=1
-       echo '\# 1 00' | diff - dig.out || ret=1
+       echo '\# 1 00' | $DIFF - dig.out || ret=1
        if [ $ret != 0 ]
        then
                echo "#$i failed"
@@ -116,7 +114,7 @@ do
        status=`expr $status + $ret`
 done
 
-echo "I:querying for SOAs of zone that should have failed to load"
+echo_i "querying for SOAs of zone that should have failed to load"
 for i in 1 2 3 4
 do
        ret=0
@@ -129,71 +127,68 @@ do
        status=`expr $status + $ret`
 done
 
-echo "I:checking large unknown record loading on master"
+echo_i "checking large unknown record loading on master"
 ret=0
-$DIG $DIGOPTS @10.53.0.1 +tcp +short large.example TYPE45234 > dig.out || { ret=1 ; echo I: dig failed ; }
-diff -s large.out dig.out > /dev/null || { ret=1 ; echo "I: diff failed"; }
-[ $ret = 0 ] || echo "I: failed"
-status=`expr $status + $ret`
+$DIG $DIGOPTS @10.53.0.1 +tcp +short large.example TYPE45234 > dig.out || { ret=1 ; echo_i "dig failed" ; }
+$DIFF -s large.out dig.out > /dev/null || { ret=1 ; echo_i "$DIFF failed"; }
+[ $ret = 0 ] || echo_i "failed"
 
-echo "I:checking large unknown record loading on slave"
+echo_i "checking large unknown record loading on slave"
 ret=0
-$DIG $DIGOPTS @10.53.0.2 +tcp +short large.example TYPE45234 > dig.out || { ret=1 ; echo I: dig failed ; }
-diff -s large.out dig.out > /dev/null || { ret=1 ; echo "I: diff failed"; }
-[ $ret = 0 ] || echo "I: failed"
+$DIG $DIGOPTS @10.53.0.2 +tcp +short large.example TYPE45234 > dig.out || { ret=1 ; echo_i "dig failed ; }
+$DIFF -s large.out dig.out > /dev/null || { ret=1 ; echo_i "diff failed"; }
+[ $ret = 0 ] || echo_i "failed"
 status=`expr $status + $ret`
 
-echo "I:stop and restart slave"
+echo_i "stop and restart slave"
 $PERL $SYSTEMTESTTOP/stop.pl . ns2
-$PERL $SYSTEMTESTTOP/start.pl --noclean --restart . ns2
+$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . ns2
 
-echo "I:checking large unknown record loading on slave"
+echo_i "checking large unknown record loading on slave"
 ret=0
-$DIG $DIGOPTS @10.53.0.2 +tcp +short large.example TYPE45234 > dig.out || { ret=1 ; echo I: dig failed ; }
-diff -s large.out dig.out > /dev/null || { ret=1 ; echo "I: diff failed"; }
-[ $ret = 0 ] || echo "I: failed"
+$DIG $DIGOPTS @10.53.0.2 +tcp +short large.example TYPE45234 > dig.out || { ret=1 ; echo_i "dig failed ; }
+$DIFF -s large.out dig.out > /dev/null || { ret=1 ; echo_i "diff failed"; }
+[ $ret = 0 ] || echo_i "failed"
 status=`expr $status + $ret`
 
-echo "I:checking large unknown record loading on inline slave"
+echo_i "checking large unknown record loading on inline slave"
 ret=0
-$DIG $DIGOPTS @10.53.0.3 +tcp +short large.example TYPE45234 > dig.out || { ret=1 ; echo I: dig failed ; }
-diff large.out dig.out > /dev/null || { ret=1 ; echo "I: diff failed"; }
-[ $ret = 0 ] || echo "I: failed"
+$DIG $DIGOPTS @10.53.0.3 +tcp +short large.example TYPE45234 > dig.out || { ret=1 ; echo_i "dig failed ; }
+$DIFF large.out dig.out > /dev/null || { ret=1 ; echo_i "diff failed"; }
+[ $ret = 0 ] || echo_i "failed"
 status=`expr $status + $ret`
 
-echo "I:stop and restart inline slave"
+echo_i "stop and restart inline slave"
 $PERL $SYSTEMTESTTOP/stop.pl . ns3
-$PERL $SYSTEMTESTTOP/start.pl --noclean --restart . ns3
+$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . ns3
 
-echo "I:checking large unknown record loading on inline slave"
+echo_i "checking large unknown record loading on inline slave"
 ret=0
-$DIG $DIGOPTS @10.53.0.3 +tcp +short large.example TYPE45234 > dig.out || { ret=1 ; echo I: dig failed ; }
-diff large.out dig.out > /dev/null || { ret=1 ; echo "I: diff failed"; }
-[ $ret = 0 ] || echo "I: failed"
+$DIG $DIGOPTS @10.53.0.3 +tcp +short large.example TYPE45234 > dig.out || { ret=1 ; echo_i "dig failed ; }
+$DIFF large.out dig.out > /dev/null || { ret=1 ; echo_i "diff failed"; }
+[ $ret = 0 ] || echo_i "failed"
 status=`expr $status + $ret`
 
-echo "I:check that '"'"\\#"'"' is not treated as the unknown escape sequence"
+echo_i "check that '"'"\\#"'"' is not treated as the unknown escape sequence"
 ret=0
 $DIG $DIGOPTS @10.53.0.1 +tcp +short txt8.example txt > dig.out
-echo '"#" "2" "0145"' | diff - dig.out || ret=1
-[ $ret = 0 ] || echo "I: failed"
+echo '"#" "2" "0145"' | $DIFF - dig.out || ret=1
+[ $ret = 0 ] || echo_i "failed"
 status=`expr $status + $ret`
 
-echo "I:check that 'TXT \# text' is not treated as the unknown escape sequence"
+echo_i "check that 'TXT \# text' is not treated as the unknown escape sequence"
 ret=0
 $DIG $DIGOPTS @10.53.0.1 +tcp +short txt9.example txt > dig.out
-echo '"#" "text"' | diff - dig.out || ret=1
-[ $ret = 0 ] || echo "I: failed"
+echo '"#" "text"' | $DIFF - dig.out || ret=1
+[ $ret = 0 ] || echo_i "failed"
 status=`expr $status + $ret`
 
-echo "I:check that 'TYPE353 \# cat' produces 'not a valid number'"
+echo_i "check that 'TYPE353 \# cat' produces 'not a valid number'"
 ret=0
 $CHECKZONE nan.bad zones/nan.bad > check.out 2>&1
 grep "not a valid number" check.out > /dev/null || ret=1
-[ $ret = 0 ] || echo "I: failed"
+[ $ret = 0 ] || echo_i "failed"
 status=`expr $status + $ret`
 
-
-
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index 12e67b7c080797e3165e36879132cfdea3ff4f36..5d1a099ab06b95b704bcbfa38e827fc8e6edbc47 100644 (file)
@@ -14,8 +14,6 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: ans.pl,v 1.2 2011/08/31 06:49:10 marka Exp $
-
 #
 # This is the name server from hell.  It provides canned
 # responses based on pattern matching the queries, and
@@ -78,13 +76,16 @@ local $| = 1;
 
 my $server_addr = "10.53.0.4";
 
+my $localport = int($ENV{'PORT'});
+if (!$localport) { $localport = 5300; }
+
 my $udpsock = IO::Socket::INET->new(LocalAddr => "$server_addr",
-   LocalPort => 5300, Proto => "udp", Reuse => 1) or die "$!";
+   LocalPort => $localport, Proto => "udp", Reuse => 1) or die "$!";
 
 my $tcpsock = IO::Socket::INET->new(LocalAddr => "$server_addr",
-   LocalPort => 5300, Proto => "tcp", Listen => 5, Reuse => 1) or die "$!";
+   LocalPort => $localport, Proto => "tcp", Listen => 5, Reuse => 1) or die "$!";
 
-print "listening on $server_addr:5300.\n";
+print "listening on $server_addr:$localport.\n";
 
 my $pidf = new IO::File "ans.pid", "w" or die "cannot open pid file: $!";
 print $pidf "$$\n" or die "cannot write pid file: $!";
index fe5d9d4b70e1d447d92ee9bbfc4a5719c81f064d..8d050de82de53b1d561cb2fcf7ac94cb5ab9406e 100644 (file)
@@ -15,8 +15,6 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: clean.sh,v 1.11 2011/10/30 23:46:15 tbox Exp $
-
 #
 # Clean up after zone transfer tests.
 #
@@ -26,6 +24,7 @@ rm -f ns1/*.jnl ns2/*.jnl ns3/*.jnl ns1/example.db ns2/*.bk ns3/*.bk
 rm -f ns3/nomaster1.db
 rm -f */named.memstats
 rm -f */named.run
+rm -f */named.conf
 rm -f */ans.run
 rm -f Ksig0.example2.*
 rm -f keyname
similarity index 93%
rename from bin/tests/system/upforwd/ns1/named.conf
rename to bin/tests/system/upforwd/ns1/named.conf.in
index 65db79125f57e623ee2f7eb8023af7be922af2fa..5f4c3801913d204ad2425be74c71d82e5a9e9fe3 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.11 2007/06/18 23:47:31 tbox Exp $ */
-
 key "update.example." {
        algorithm "hmac-md5";
        secret "c3Ryb25nIGVub3VnaCBmb3IgYSBtYW4gYnV0IG1hZGUgZm9yIGEgd29tYW4K";
 };
 
-controls { /* empty */ };
-
 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 92%
rename from bin/tests/system/upforwd/ns2/named.conf
rename to bin/tests/system/upforwd/ns2/named.conf.in
index 4b609c3211f2675c0e533bda8565aafdaa5b00de..089eef045e918bdeda7b989dd6ca99b0b4a2e1e1 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.10 2007/06/18 23:47:31 tbox Exp $ */
-
-controls { /* empty */ };
-
 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 93%
rename from bin/tests/system/upforwd/ns3/named.conf
rename to bin/tests/system/upforwd/ns3/named.conf.in
index 4eaf24d77bba8301d04c81b36fa8d5c44792a221..313b68b4687375d97c2ee66a110ee8976b77f387 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.14 2011/10/26 15:23:37 each Exp $ */
-
-controls { /* empty */ };
-
 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; };
index a6c9952206e5c88f8fecb4adc81a3d5d1d35f80d..e44a03b1f74dc4274a45435e1567b732d130e4d5 100644 (file)
@@ -18,6 +18,6 @@ if $PERL -e 'use Net::DNS;' 2>/dev/null
 then
     :
 else
-    echo "I:This test requires the Net::DNS library." >&2
+    echo_i "This test requires the Net::DNS library." >&2
     exit 1
 fi
index 9e1f437e6aec08f4a1258acdc591a1bfa5898114..59f7542a2b8e7d51ceec1cfd9e1da00d1c42b922 100644 (file)
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
+$SHELL clean.sh
+
 cp -f ns1/example1.db ns1/example.db
-rm -f ns1/example.db.jnl ns2/example.bk ns2/example.bk.jnl
-rm -f ns1/example2.db.jnl ns2/example2.bk ns2/example2.bk.jnl
 cp -f ns3/nomaster.db ns3/nomaster1.db
-rm -f Ksig0.example2.*
+
+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
 
 #
 # SIG(0) required cryptographic support which may not be configured.
index 013e235c52e2dbd0722e2e2abcfa5c2a45bf5871..df8db2211b93a12cff37f87d55f675321f020a7a 100644 (file)
@@ -15,8 +15,6 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: tests.sh,v 1.13 2011/10/13 22:18:05 marka Exp $ 
-
 # ns1 = stealth master
 # ns2 = slave with update forwarding disabled; not currently used
 # ns3 = slave with update forwarding enabled
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
+DIGOPTS="+tcp +noadd +nosea +nostat +noquest +nocomm +nocmd -p ${PORT}"
+
 status=0
 n=1
 
 sleep 5
 
-echo "I:waiting for servers to be ready for testing ($n)"
+echo_i "waiting for servers to be ready for testing ($n)"
 for i in 1 2 3 4 5 6 7 8 9 10
 do
        ret=0
-       $DIG +tcp example. @10.53.0.1 soa -p 5300 > dig.out.ns1 || ret=1
+       $DIG +tcp -p ${PORT} example. @10.53.0.1 soa > dig.out.ns1 || ret=1
        grep "status: NOERROR" dig.out.ns1 > /dev/null ||  ret=1
-       $DIG +tcp example. @10.53.0.2 soa -p 5300 > dig.out.ns2 || ret=1
+       $DIG +tcp -p ${PORT} example. @10.53.0.2 soa > dig.out.ns2 || ret=1
        grep "status: NOERROR" dig.out.ns2 > /dev/null ||  ret=1
-       $DIG +tcp example. @10.53.0.3 soa -p 5300 > dig.out.ns3 || ret=1
+       $DIG +tcp -p ${PORT} example. @10.53.0.3 soa > dig.out.ns3 || ret=1
        grep "status: NOERROR" dig.out.ns3 > /dev/null ||  ret=1
        test $ret = 0 && break
        sleep 1
 done
-if [ $ret != 0 ] ; then echo "I:failed"; status=`expr $status + $ret`; fi
+if [ $ret != 0 ] ; then echo_i "failed"; status=`expr $status + $ret`; fi
 n=`expr $n + 1`
 
-echo "I:fetching master copy of zone before update ($n)"
+echo_i "fetching master copy of zone before update ($n)"
 ret=0
-$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd example.\
-       @10.53.0.1 axfr -p 5300 > dig.out.ns1 || ret=1
-if [ $ret != 0 ] ; then echo "I:failed"; status=`expr $status + $ret`; fi
+$DIG $DIGOPTS example.\
+       @10.53.0.1 axfr > dig.out.ns1 || ret=1
+if [ $ret != 0 ] ; then echo_i "failed"; status=`expr $status + $ret`; fi
 n=`expr $n + 1`
 
-echo "I:fetching slave 1 copy of zone before update ($n)"
-$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd example.\
-       @10.53.0.2 axfr -p 5300 > dig.out.ns2 || ret=1
-if [ $ret != 0 ] ; then echo "I:failed"; status=`expr $status + $ret`; fi
+echo_i "fetching slave 1 copy of zone before update ($n)"
+$DIG $DIGOPTS example.\
+       @10.53.0.2 axfr > dig.out.ns2 || ret=1
+if [ $ret != 0 ] ; then echo_i "failed"; status=`expr $status + $ret`; fi
 n=`expr $n + 1`
 
-echo "I:fetching slave 2 copy of zone before update ($n)"
+echo_i "fetching slave 2 copy of zone before update ($n)"
 ret=0
-$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd example.\
-       @10.53.0.3 axfr -p 5300 > dig.out.ns3 || ret=1
-if [ $ret != 0 ] ; then echo "I:failed"; status=`expr $status + $ret`; fi
+$DIG $DIGOPTS example.\
+       @10.53.0.3 axfr > dig.out.ns3 || ret=1
+if [ $ret != 0 ] ; then echo_i "failed"; status=`expr $status + $ret`; fi
 n=`expr $n + 1`
 
-echo "I:comparing pre-update copies to known good data ($n)"
+echo_i "comparing pre-update copies to known good data ($n)"
 ret=0
 $PERL ../digcomp.pl knowngood.before dig.out.ns1 || ret=1
 $PERL ../digcomp.pl knowngood.before dig.out.ns2 || ret=1
 $PERL ../digcomp.pl knowngood.before dig.out.ns3 || ret=1
-if [ $ret != 0 ] ; then echo "I:failed"; status=`expr $status + $ret`; fi
+if [ $ret != 0 ] ; then echo_i "failed"; status=`expr $status + $ret`; fi
 
-echo "I:updating zone (signed) ($n)"
+echo_i "updating zone (signed) ($n)"
 ret=0
 $NSUPDATE -y update.example:c3Ryb25nIGVub3VnaCBmb3IgYSBtYW4gYnV0IG1hZGUgZm9yIGEgd29tYW4K -- - <<EOF || ret=1
-server 10.53.0.3 5300
+server 10.53.0.3 ${PORT}
 update add updated.example. 600 A 10.10.10.1
 update add updated.example. 600 TXT Foo
 send
 EOF
-if [ $ret != 0 ] ; then echo "I:failed"; status=`expr $status + $ret`; fi
+if [ $ret != 0 ] ; then echo_i "failed"; status=`expr $status + $ret`; fi
 n=`expr $n + 1`
 
-echo "I:sleeping 15 seconds for server to incorporate changes"
+echo_i "sleeping 15 seconds for server to incorporate changes"
 sleep 15
 
-echo "I:fetching master copy of zone after update ($n)"
+echo_i "fetching master copy of zone after update ($n)"
 ret=0
-$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd example.\
-       @10.53.0.1 axfr -p 5300 > dig.out.ns1 || ret=1
-if [ $ret != 0 ] ; then echo "I:failed"; status=`expr $status + $ret`; fi
+$DIG $DIGOPTS example.\
+       @10.53.0.1 axfr > dig.out.ns1 || ret=1
+if [ $ret != 0 ] ; then echo_i "failed"; status=`expr $status + $ret`; fi
 n=`expr $n + 1`
 
-echo "I:fetching slave 1 copy of zone after update ($n)"
+echo_i "fetching slave 1 copy of zone after update ($n)"
 ret=0
-$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd example.\
-       @10.53.0.2 axfr -p 5300 > dig.out.ns2 || ret=1
-if [ $ret != 0 ] ; then echo "I:failed"; status=`expr $status + $ret`; fi
+$DIG $DIGOPTS example.\
+       @10.53.0.2 axfr > dig.out.ns2 || ret=1
+if [ $ret != 0 ] ; then echo_i "failed"; status=`expr $status + $ret`; fi
 
-echo "I:fetching slave 2 copy of zone after update ($n)"
+echo_i "fetching slave 2 copy of zone after update ($n)"
 ret=0
-$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd example.\
-       @10.53.0.3 axfr -p 5300 > dig.out.ns3 || ret=1
-if [ $ret != 0 ] ; then echo "I:failed"; status=`expr $status + $ret`; fi
+$DIG $DIGOPTS example.\
+       @10.53.0.3 axfr > dig.out.ns3 || ret=1
+if [ $ret != 0 ] ; then echo_i "failed"; status=`expr $status + $ret`; fi
 n=`expr $n + 1`
 
-echo "I:comparing post-update copies to known good data ($n)"
+echo_i "comparing post-update copies to known good data ($n)"
 ret=0
 $PERL ../digcomp.pl knowngood.after1 dig.out.ns1 || ret=1
 $PERL ../digcomp.pl knowngood.after1 dig.out.ns2 || ret=1
 $PERL ../digcomp.pl knowngood.after1 dig.out.ns3 || ret=1
-if [ $ret != 0 ] ; then echo "I:failed"; status=`expr $status + $ret`; fi
+if [ $ret != 0 ] ; then echo_i "failed"; status=`expr $status + $ret`; fi
 
-echo "I:checking 'forwarding update for zone' is logged ($n)"
+echo_i "checking 'forwarding update for zone' is logged ($n)"
 ret=0
 grep "forwarding update for zone 'example/IN'" ns3/named.run > /dev/null || ret=1
-if [ $ret != 0 ] ; then echo "I:failed"; status=`expr $status + $ret`; fi
+if [ $ret != 0 ] ; then echo_i "failed"; status=`expr $status + $ret`; fi
 n=`expr $n + 1`
 
-echo "I:updating zone (unsigned) ($n)"
+echo_i "updating zone (unsigned) ($n)"
 ret=0
 $NSUPDATE -- - <<EOF || ret=1
-server 10.53.0.3 5300
+server 10.53.0.3 ${PORT}
 update add unsigned.example. 600 A 10.10.10.1
 update add unsigned.example. 600 TXT Foo
 send
 EOF
-if [ $ret != 0 ] ; then echo "I:failed"; status=`expr $status + $ret`; fi
+if [ $ret != 0 ] ; then echo_i "failed"; status=`expr $status + $ret`; fi
 n=`expr $n + 1`
 
-echo "I:sleeping 15 seconds for server to incorporate changes"
+echo_i "sleeping 15 seconds for server to incorporate changes"
 sleep 15
 
-echo "I:fetching master copy of zone after update ($n)"
+echo_i "fetching master copy of zone after update ($n)"
 ret=0
-$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd example.\
-       @10.53.0.1 axfr -p 5300 > dig.out.ns1 || ret=1
-if [ $ret != 0 ] ; then echo "I:failed"; status=`expr $status + $ret`; fi
+$DIG $DIGOPTS example.\
+       @10.53.0.1 axfr > dig.out.ns1 || ret=1
+if [ $ret != 0 ] ; then echo_i "failed"; status=`expr $status + $ret`; fi
 
-echo "I:fetching slave 1 copy of zone after update ($n)"
+echo_i "fetching slave 1 copy of zone after update ($n)"
 ret=0
-$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd example.\
-       @10.53.0.2 axfr -p 5300 > dig.out.ns2 || ret=1
-if [ $ret != 0 ] ; then echo "I:failed"; status=`expr $status + $ret`; fi
+$DIG $DIGOPTS example.\
+       @10.53.0.2 axfr > dig.out.ns2 || ret=1
+if [ $ret != 0 ] ; then echo_i "failed"; status=`expr $status + $ret`; fi
 n=`expr $n + 1`
 
-echo "I:fetching slave 2 copy of zone after update ($n)"
+echo_i "fetching slave 2 copy of zone after update ($n)"
 ret=0
-$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd example.\
-       @10.53.0.3 axfr -p 5300 > dig.out.ns3 || ret=1
-if [ $ret != 0 ] ; then echo "I:failed"; status=`expr $status + $ret`; fi
+$DIG $DIGOPTS example.\
+       @10.53.0.3 axfr > dig.out.ns3 || ret=1
+if [ $ret != 0 ] ; then echo_i "failed"; status=`expr $status + $ret`; fi
 
-echo "I:comparing post-update copies to known good data ($n)"
+echo_i "comparing post-update copies to known good data ($n)"
 ret=0
 $PERL ../digcomp.pl knowngood.after2 dig.out.ns1 || ret=1
 $PERL ../digcomp.pl knowngood.after2 dig.out.ns2 || ret=1
 $PERL ../digcomp.pl knowngood.after2 dig.out.ns3 || ret=1
-if [ $ret != 0 ] ; then echo "I:failed"; status=`expr $status + $ret`; fi
+if [ $ret != 0 ] ; then echo_i "failed"; status=`expr $status + $ret`; fi
 n=`expr $n + 1`
 
-echo "I:checking update forwarding to dead master ($n)"
+echo_i "checking update forwarding to dead master ($n)"
 count=0
 ret=0
 while [ $count -lt 5 -a $ret -eq 0 ]
 do
 (
 $NSUPDATE -- - <<EOF 
-server 10.53.0.3 5300
+server 10.53.0.3 ${PORT}
 zone nomaster
 update add unsigned.nomaster. 600 A 10.10.10.1
 update add unsigned.nomaster. 600 TXT Foo
 send
 EOF
 ) > /dev/null 2>&1 &
-       $DIG +notcp +noadd +noauth nomaster.\
-               @10.53.0.3 soa -p 5300 > dig.out.ns3 || ret=1
+       $DIG -p ${PORT} +noadd +notcp +noauth nomaster. @10.53.0.3 soa > dig.out.ns3 || ret=1
        grep "status: NOERROR" dig.out.ns3 > /dev/null || ret=1
        count=`expr $count + 1`
 done
-if [ $ret != 0 ] ; then echo "I:failed"; status=`expr $status + $ret`; fi
+if [ $ret != 0 ] ; then echo_i "failed"; status=`expr $status + $ret`; fi
 n=`expr $n + 1`
 
 if test -f keyname
 then
-       echo "I:checking update forwarding to with sig0 ($n)"
+       echo_i "checking update forwarding to with sig0 ($n)"
        ret=0
        keyname=`cat keyname`
        $NSUPDATE -k $keyname.private -- - <<EOF
-       server 10.53.0.3 5300
+       server 10.53.0.3 ${PORT}
        zone example2
        update add unsigned.example2. 600 A 10.10.10.1
        update add unsigned.example2. 600 TXT Foo
        send
 EOF
-       $DIG unsigned.example2 A @10.53.0.1 -p 5300 > dig.out.ns1.test$n
+       $DIG unsigned.example2 A @10.53.0.1 > dig.out.ns1.test$n
        grep "status: NOERROR" dig.out.ns1.test$n > /dev/null || ret=1
-       if [ $ret != 0 ] ; then echo "I:failed"; fi
+       if [ $ret != 0 ] ; then echo_i "failed"; fi
        status=`expr $status + $ret`
        n=`expr $n + 1`
 fi
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index e467e02537458055ee38001add3d13275b38919b..69009fdec78d53fcf58aa8c6129eb7cb412a4641 100644 (file)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id$
-
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 failed () {
        cat verify.out.$n | sed 's/^/D:/';
-       echo "I:failed";
+       echo_i "failed";
        status=1;
 }
 
@@ -29,7 +27,7 @@ for file in zones/*.good
 do
        n=`expr $n + 1`
        zone=`expr "$file" : 'zones/\(.*\).good'`
-       echo "I:checking supposedly good zone: $zone ($n)"
+       echo_i "checking supposedly good zone: $zone ($n)"
        ret=0
        case $zone in
        zsk-only.*) only=-z;;
@@ -44,7 +42,7 @@ for file in zones/*.bad
 do
        n=`expr $n + 1`
        zone=`expr "$file" : 'zones/\(.*\).bad'`
-       echo "I:checking supposedly bad zone: $zone ($n)"
+       echo_i "checking supposedly bad zone: $zone ($n)"
        ret=0
        dumpit=0
        case $zone in
@@ -95,7 +93,7 @@ do
 done
 
 n=`expr $n + 1`
-echo "I:checking error message when -o is not used and a SOA record not at top of zone is found ($n)"
+echo_i "checking error message when -o is not used and a SOA record not at top of zone is found ($n)"
 ret=0
 # When -o is not used, origin is set to zone file name, which should cause an error in this case
 $VERIFY zones/ksk+zsk.nsec.good > verify.out.$n 2>&1 && ret=1
@@ -104,12 +102,12 @@ grep "use -o to specify a different zone origin" verify.out.$n > /dev/null || re
 [ $ret = 0 ] || failed
 
 n=`expr $n + 1`
-echo "I:checking error message when an invalid -o is specified and a SOA record not at top of zone is found ($n)"
+echo_i "checking error message when an invalid -o is specified and a SOA record not at top of zone is found ($n)"
 ret=0
 $VERIFY -o invalid.origin zones/ksk+zsk.nsec.good > verify.out.$n 2>&1 && ret=1
 grep "not at top of zone" verify.out.$n > /dev/null || ret=1
 grep "use -o to specify a different zone origin" verify.out.$n > /dev/null && ret=1
 [ $ret = 0 ] || failed
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index f08f22f690f38af3b08a920e1b3b8c8eb500c625..aa67358a2bdfbd85521dcab3e13d829b786e1870 100644 (file)
@@ -12,8 +12,6 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id$
-
 SYSTEMTESTTOP=../..
 . $SYSTEMTESTTOP/conf.sh
 
@@ -22,7 +20,7 @@ dumpit () {
        cat "${1}" | sed 's/^/D:/'
 }
 setup () {
-       echo "I:setting up $2 zone: $1"
+       echo_i "setting up $2 zone: $1"
        debug="$1"
        zone="$1"
        file="$1.$2"
index 6e20cfa968ea451551119c1de9f6d9d21f3e2b21..b21b60be14a5f384ee8b314b45c3c6c37a7d09a7 100644 (file)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: clean.sh,v 1.14 2007/09/26 03:22:44 marka Exp $
-
 #
 # Clean up after zone transfer tests.
 #
 
+rm -f ns*/named.conf
 rm -f ns3/example.bk dig.out.ns?.?
-rm -f ns2/named.conf ns2/example.db ns3/named.conf ns3/internal.bk
+rm -f ns2/example.db ns3/named.conf ns3/internal.bk
 rm -f */named.memstats
-rm -f */named.run
+rm -f */named.run */named.run.prev
 rm -f ns2/external/K*
 rm -f ns2/external/inline.db.jbk
 rm -f ns2/external/inline.db.signed
similarity index 91%
rename from bin/tests/system/stub/ns1/named.conf
rename to bin/tests/system/views/ns1/named.conf.in
index 858506bb1c3c058e7d6b7239dd2564a4e764bf99..cae3cbb12eefb40d89de2d4ecb3c3215c3822def 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.14 2007/06/19 23:47:05 tbox Exp $ */
-
-controls { /* empty */ };
-
 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 87%
rename from bin/tests/system/views/ns2/named1.conf
rename to bin/tests/system/views/ns2/named1.conf.in
index a09d0691e39b3e538df732e9c6c9ad82dfa96c3a..5c2b811e9ae3521592a1057552ff9c38efcacf8a 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named1.conf,v 1.20 2007/06/19 23:47:07 tbox Exp $ */
-
-controls { /* empty */ };
-
 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; };
@@ -31,7 +27,15 @@ options {
        notify yes;
 };
 
-include "../../common/controls.conf";
+key rndc_key {
+       secret "1234abcd8765";
+       algorithm hmac-sha256;
+};
+
+controls {
+       inet 10.53.0.2 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
+};
+
 
 zone "." {
        type hint;
similarity index 91%
rename from bin/tests/system/views/ns2/named2.conf
rename to bin/tests/system/views/ns2/named2.conf.in
index f17eb825c3e98aa46896443d9ed152b6dadf6578..8f21acb9d1410ac0f9201816196313c1f59bfa68 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named2.conf,v 1.22 2007/06/19 23:47:07 tbox Exp $ */
-
-controls { /* empty */ };
-
 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; 10.53.0.4; };
        listen-on-v6 { none; };
@@ -31,7 +27,14 @@ options {
        notify yes;
 };
 
-include "../../common/controls.conf";
+key rndc_key {
+       secret "1234abcd8765";
+       algorithm hmac-sha256;
+};
+
+controls {
+       inet 10.53.0.2 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
+};
 
 view "internal" {
        match-clients { 10.53.0.2;
@@ -78,4 +81,3 @@ view "external" {
                inline-signing yes;
        };
 };
-
similarity index 88%
rename from bin/tests/system/views/ns3/named1.conf
rename to bin/tests/system/views/ns3/named1.conf.in
index 9723e08d48a219502d7a06a968ea6ddd25ea8bfa..e7ce8dd75f91363545065c74f93a7b4f2ae4df97 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named1.conf,v 1.19 2007/06/19 23:47:07 tbox Exp $ */
-
-controls { /* empty */ };
-
 options {
        query-source address 10.53.0.3;
        notify-source 10.53.0.3;
        transfer-source 10.53.0.3;
-       port 5300;
+       port @PORT@;
        directory ".";
        pid-file "named.pid";
        listen-on { 10.53.0.3; };
@@ -38,7 +34,7 @@ key rndc_key {
 };
 
 controls {
-        inet 10.53.0.3 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.3 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 zone "." {
@@ -51,5 +47,3 @@ zone "example" {
         allow-update { any; };
        file "internal.db";
 };
-
-
similarity index 88%
rename from bin/tests/system/views/ns3/named2.conf
rename to bin/tests/system/views/ns3/named2.conf.in
index 27d4955f72b98882bf5e3102c9e951a9d42de502..317895fa43a68db63c48a45a582c72463fb1f4de 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named2.conf,v 1.19 2007/06/19 23:47:07 tbox Exp $ */
-
-controls { /* empty */ };
-
 options {
        query-source address 10.53.0.3;
        notify-source 10.53.0.3;
        transfer-source 10.53.0.3;
-       port 5300;
+       port @PORT@;
        directory ".";
        pid-file "named.pid";
        listen-on { 10.53.0.3; };
@@ -38,7 +34,7 @@ key rndc_key {
 };
 
 controls {
-        inet 10.53.0.3 port 11953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.3 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 zone "." {
index 254bd3bfc39e102de5cdef16eb3ff31f3aeb904d..ea58c083083fac3e1c0acffd4eac212e7f29e1f7 100644 (file)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
+SYSTEMTESTTOP=..
+. $SYSTEMTESTTOP/conf.sh
+
+$SHELL clean.sh
+
+test -r $RANDFILE || $GENRANDOM 400 $RANDFILE
+
 cp -f ns2/example1.db ns2/example.db
-cp -f ns2/named1.conf ns2/named.conf
-cp -f ns3/named1.conf ns3/named.conf
 rm -f ns2/external/K*
 rm -f ns2/external/inline.db.signed
 rm -f ns2/external/inline.db.signed.jnl
@@ -25,10 +30,10 @@ rm -f ns2/internal/K*
 rm -f ns2/internal/inline.db.signed
 rm -f ns2/internal/inline.db.signed.jnl
 
-SYSTEMTESTTOP=..
-. $SYSTEMTESTTOP/conf.sh
-
-test -r $RANDFILE || $GENRANDOM 400 $RANDFILE
+copy_setports ns1/named.conf.in ns1/named.conf
+copy_setports ns2/named1.conf.in ns2/named.conf
+copy_setports ns3/named1.conf.in ns3/named.conf
+copy_setports ns5/named.conf.in ns5/named.conf
 
 #
 # We remove k1 and k2 as KEYGEN is deterministic when given the
index 858ef7a3e0a94e51458546795e34d8e148b9222f..ed8521740ba4bef058ba782b7ecef18fbd51fa1d 100644 (file)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: tests.sh,v 1.30 2007/06/19 23:47:06 tbox Exp $
-
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
+DIGOPTS="+tcp +noadd +nosea +nostat +noquest +nocomm +nocmd +noauth -p ${PORT}"
+SHORTOPTS="+tcp +short -p ${PORT}"
+RNDCCMD="$RNDC -c $SYSTEMTESTTOP/common/rndc.conf -p ${CONTROLPORT} -s"
+
 status=0
 
-echo "I:fetching a.example from ns2's initial configuration"
-$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd +noauth \
-       a.example. @10.53.0.2 any -p 5300 > dig.out.ns2.1 || status=1
+echo_i "fetching a.example from ns2's initial configuration"
+$DIG $DIGOPTS a.example. @10.53.0.2 any > dig.out.ns2.1 || status=1
 grep ";" dig.out.ns2.1 # XXXDCL why is this here?
 
-echo "I:fetching a.example from ns3's initial configuration"
-$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd +noauth \
-       a.example. @10.53.0.3 any -p 5300 > dig.out.ns3.1 || status=1
+echo_i "fetching a.example from ns3's initial configuration"
+$DIG $DIGOPTS a.example. @10.53.0.3 any > dig.out.ns3.1 || status=1
 grep ";" dig.out.ns3.1 # XXXDCL why is this here?
 
-echo "I:copying in new configurations for ns2 and ns3"
+echo_i "copying in new configurations for ns2 and ns3"
 rm -f ns2/named.conf ns3/named.conf ns2/example.db
-cp -f ns2/named2.conf ns2/named.conf
-cp -f ns3/named2.conf ns3/named.conf
 cp -f ns2/example2.db ns2/example.db
-
-echo "I:reloading ns2 and ns3 with rndc"
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 reload 2>&1 | sed 's/^/I:ns3 /'
-
-echo "I:sleeping for 20 seconds"
-sleep 20
-
-echo "I:fetching a.example from ns2's 10.53.0.4, source address 10.53.0.4"
-$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd +noauth \
-       -b 10.53.0.4 a.example. @10.53.0.4 any -p 5300 > dig.out.ns4.2 \
-       || status=1
+copy_setports ns2/named2.conf.in ns2/named.conf
+copy_setports ns3/named2.conf.in ns3/named.conf
+
+echo_i "reloading ns2 and ns3 with rndc"
+nextpart ns2/named.run > /dev/null
+nextpart ns3/named.run > /dev/null
+$RNDCCMD 10.53.0.2 reload 2>&1 | sed 's/^/ns2 /' | cat_i
+$RNDCCMD 10.53.0.3 reload 2>&1 | sed 's/^/ns3 /' | cat_i
+
+echo_i "wait for reload"
+a=0 b=0
+for i in 1 2 3 4 5 6 7 8 9 0; do
+        nextpart ns2/named.run | grep "reloading zones succeeded" > /dev/null && a=1
+        nextpart ns3/named.run | grep "reloading zones succeeded" > /dev/null && b=1
+        [ $a -eq 1 -a $b -eq 1 ] && break
+        sleep 1
+done
+
+echo_i "fetching a.example from ns2's 10.53.0.4, source address 10.53.0.4"
+$DIG $DIGOPTS -b 10.53.0.4 a.example. @10.53.0.4 any > dig.out.ns4.2 || status=1
 grep ";" dig.out.ns4.2 # XXXDCL why is this here?
 
-echo "I:fetching a.example from ns2's 10.53.0.2, source address 10.53.0.2"
-$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd +noauth \
-       -b 10.53.0.2 a.example. @10.53.0.2 any -p 5300 > dig.out.ns2.2 \
-       || status=1
+echo_i "fetching a.example from ns2's 10.53.0.2, source address 10.53.0.2"
+$DIG $DIGOPTS -b 10.53.0.2 a.example. @10.53.0.2 any > dig.out.ns2.2 || status=1
 grep ";" dig.out.ns2.2 # XXXDCL why is this here?
 
-echo "I:fetching a.example from ns3's 10.53.0.3, source address defaulted"
-$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd +noauth \
-       @10.53.0.3 a.example. any -p 5300 > dig.out.ns3.2 || status=1
+echo_i "fetching a.example from ns3's 10.53.0.3, source address defaulted"
+$DIG $DIGOPTS @10.53.0.3 a.example. any > dig.out.ns3.2 || status=1
 grep ";" dig.out.ns3.2 # XXXDCL why is this here?
 
-echo "I:comparing ns3's initial a.example to one from reconfigured 10.53.0.2"
+echo_i "comparing ns3's initial a.example to one from reconfigured 10.53.0.2"
 $PERL ../digcomp.pl dig.out.ns3.1 dig.out.ns2.2 || status=1
 
-echo "I:comparing ns3's initial a.example to one from reconfigured 10.53.0.3"
+echo_i "comparing ns3's initial a.example to one from reconfigured 10.53.0.3"
 $PERL ../digcomp.pl dig.out.ns3.1 dig.out.ns3.2 || status=1
 
-echo "I:comparing ns2's initial a.example to one from reconfigured 10.53.0.4"
+echo_i "comparing ns2's initial a.example to one from reconfigured 10.53.0.4"
 $PERL ../digcomp.pl dig.out.ns2.1 dig.out.ns4.2 || status=1
 
-echo "I:comparing ns2's initial a.example to one from reconfigured 10.53.0.3"
-echo "I:(should be different)"
+echo_i "comparing ns2's initial a.example to one from reconfigured 10.53.0.3"
+echo_i "(should be different)"
 if $PERL ../digcomp.pl dig.out.ns2.1 dig.out.ns3.2 >/dev/null
 then
-       echo "I:no differences found.  something's wrong."
+       echo_i "no differences found.  something's wrong."
        status=1
 fi
 
 if $SHELL ../testcrypto.sh
 then
-       echo "I:verifying inline zones work with views"
+       echo_i "verifying inline zones work with views"
        ret=0
-       $DIG @10.53.0.2 -p 5300 -b 10.53.0.2 +dnssec DNSKEY inline > dig.out.internal
-       $DIG @10.53.0.2 -p 5300 -b 10.53.0.5 +dnssec DNSKEY inline > dig.out.external
+       $DIG -p ${PORT} @10.53.0.2 -b 10.53.0.2 +dnssec DNSKEY inline > dig.out.internal
+       $DIG -p ${PORT} @10.53.0.2 -b 10.53.0.5 +dnssec DNSKEY inline > dig.out.external
        grep "ANSWER: 4," dig.out.internal > /dev/null || ret=1
        grep "ANSWER: 4," dig.out.external > /dev/null || ret=1
        int=`awk '$4 == "DNSKEY" { print $8 }' dig.out.internal | sort`
        ext=`awk '$4 == "DNSKEY" { print $8 }' dig.out.external | sort`
        test "$int" != "$ext" || ret=1
-       if [ $ret != 0 ]; then echo "I:failed"; fi
+       if [ $ret != 0 ]; then echo_i "failed"; fi
        status=`expr $status + $ret`
 fi
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index 7c532a13f916bd66c94efdc265be40c20fad5fbd..adc7fa17a4ae208745246984e44b17cd4813589c 100644 (file)
@@ -15,6 +15,7 @@
 # PERFORMANCE OF THIS SOFTWARE.
 
 rm -f ns*/named.run
+rm -f ns*/named.conf
 rm -f ns1/K*
 rm -f ns1/*.db
 rm -f ns1/*.signed
similarity index 93%
rename from bin/tests/system/wildcard/ns1/named.conf
rename to bin/tests/system/wildcard/ns1/named.conf.in
index 0b30b9d344c784cb92e2706ae70e3947c407b161..e8ca2d35fe7f897383212733dc5961377ac1bd5e 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.1.2.3 2010/06/01 07:04:49 marka Exp $ */
-
-controls { /* empty */ };
-
 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; };
index 621f03cc57b4f9906c887e1b6c51f761fbc6cf36..65cccf5fe8e13d624e9dc28020925de7ad44f20f 100755 (executable)
@@ -14,8 +14,6 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: sign.sh,v 1.1.2.2 2010/06/01 06:38:47 marka Exp $
-
 SYSTEMTESTTOP=../..
 . $SYSTEMTESTTOP/conf.sh
 
@@ -33,7 +31,7 @@ keyname2=`$KEYGEN -f KSK -r $RANDFILE -a RSASHA1 -b 1024 -n zone $zone 2> /dev/n
 cat $infile $keyname1.key $keyname2.key > $zonefile
 
 $SIGNER -r $RANDFILE -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
-echo "I: signed $zone"
+echo_i "signed $zone"
 
 zone=nsec.
 infile=nsec.db.in
@@ -47,7 +45,7 @@ keyname2=`$KEYGEN -f KSK -r $RANDFILE -a RSASHA1 -b 1024 -n zone $zone 2> /dev/n
 cat $infile $keyname1.key $keyname2.key > $zonefile
 
 $SIGNER -r $RANDFILE -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
-echo "I: signed $zone"
+echo_i "signed $zone"
 
 zone=private.nsec.
 infile=private.nsec.db.in
@@ -60,7 +58,7 @@ keyname2=`$KEYGEN -f KSK -r $RANDFILE -a RSASHA1 -b 1024 -n zone $zone 2> /dev/n
 cat $infile $keyname1.key $keyname2.key > $zonefile
 
 $SIGNER -r $RANDFILE -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
-echo "I: signed $zone"
+echo_i "signed $zone"
 
 grep -v '^;' $keyname2.key | $PERL -n -e '
 local ($dn, $class, $type, $flags, $proto, $alg, @rest) = split;
@@ -84,7 +82,7 @@ keyname2=`$KEYGEN -f KSK -r $RANDFILE -a NSEC3RSASHA1 -b 1024 -n zone $zone 2> /
 cat $infile $keyname1.key $keyname2.key > $zonefile
 
 $SIGNER -r $RANDFILE -3 - -H 10 -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
-echo "I: signed $zone"
+echo_i "signed $zone"
 
 zone=private.nsec3.
 infile=private.nsec3.db.in
@@ -97,7 +95,7 @@ keyname2=`$KEYGEN -f KSK -r $RANDFILE -a NSEC3RSASHA1 -b 1024 -n zone $zone 2> /
 cat $infile $keyname1.key $keyname2.key > $zonefile
 
 $SIGNER -r $RANDFILE -3 - -H 10 -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
-echo "I: signed $zone"
+echo_i "signed $zone"
 
 grep -v '^;' $keyname2.key | $PERL -n -e '
 local ($dn, $class, $type, $flags, $proto, $alg, @rest) = split;
@@ -120,7 +118,7 @@ keyname2=`$KEYGEN -f KSK -r $RANDFILE -a RSASHA1 -b 1024 -n zone $zone 2> /dev/n
 cat $infile $keyname1.key $keyname2.key $dssets >$zonefile
 
 $SIGNER -r $RANDFILE -o $zone -f $outfile $zonefile > /dev/null 2> signer.err || cat signer.err
-echo "I: signed $zone"
+echo_i "signed $zone"
 
 grep -v '^;' $keyname2.key | $PERL -n -e '
 local ($dn, $class, $type, $flags, $proto, $alg, @rest) = split;
similarity index 90%
rename from bin/tests/system/wildcard/ns2/named.conf
rename to bin/tests/system/wildcard/ns2/named.conf.in
index 54d92197ee8ec910b490ad5842a614d8ba1cc7ef..d26bf5d70a1101c0781cd4b23b9d527a82969935 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.1.2.1 2010/06/01 03:55:02 marka Exp $ */
-
-controls { /* empty */ };
-
 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 91%
rename from bin/tests/system/wildcard/ns3/named.conf
rename to bin/tests/system/wildcard/ns3/named.conf.in
index fe996c3515e941bd2ac800ef6d490af1769575af..dc551ef436ae3d05a0c75c34aa27e95ebe1d5dc1 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.1.2.1 2010/06/01 03:55:02 marka Exp $ */
-
-controls { /* empty */ };
-
 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; };
similarity index 91%
rename from bin/tests/system/wildcard/ns4/named.conf
rename to bin/tests/system/wildcard/ns4/named.conf.in
index d1174a86620a058c2e6f74c6a39e0f4e210b0b2e..7d9437a8f1c2e9c2d41fe7ed64a54291c49e3700 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.1.2.1 2010/06/01 03:55:02 marka Exp $ */
-
-controls { /* empty */ };
-
 options {
        query-source address 10.53.0.4;
        notify-source 10.53.0.4;
        transfer-source 10.53.0.4;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.4; };
        listen-on-v6 { none; };
similarity index 91%
rename from bin/tests/system/wildcard/ns5/named.conf
rename to bin/tests/system/wildcard/ns5/named.conf.in
index 121bf5f1a575dae8077ab39d1756192e7ea54250..f670313fd94b9836f15a6b867b0432739ca682b9 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.1.2.1 2010/06/01 03:55:02 marka Exp $ */
-
-controls { /* empty */ };
-
 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";
        listen-on { 10.53.0.5; };
        listen-on-v6 { none; };
index e53233a991ed213c5adc8b512b775e75bc495f87..9d4783a70fc301feba047c29ca9330b268b4f78a 100644 (file)
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
+$SHELL clean.sh
+
 test -r $RANDFILE || $GENRANDOM 400 $RANDFILE
 
+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
+copy_setports ns4/named.conf.in ns4/named.conf
+copy_setports ns5/named.conf.in ns5/named.conf
+
 (cd ns1 && $SHELL -e sign.sh)
index 07f9f03bdb97d1951908e35976184d0cc19cece4..2a044d1406664b6a1a1aea5964b75426fd858177 100644 (file)
@@ -14,8 +14,6 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: tests.sh,v 1.1.2.3 2010/06/01 06:57:31 marka Exp $
-
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
@@ -24,131 +22,131 @@ n=0
 
 rm -f dig.out.*
 
-DIGOPTS="+tcp +noadd +nosea +nostat +nocmd +dnssec -p 5300"
+DIGOPTS="+tcp +noadd +nosea +nostat +nocmd +dnssec -p ${PORT}"
 
 n=`expr $n + 1`
-echo "I: checking that NSEC wildcard non-existance proof is returned auth ($n)"
+echo_i "checking that NSEC wildcard non-existance proof is returned auth ($n)"
 ret=0
 $DIG $DIGOPTS a b.wild.nsec +norec @10.53.0.1 > dig.out.ns1.test$n || ret=1
 grep -i 'a\.wild\.nsec\..*NSEC.*nsec\..*NSEC'  dig.out.ns1.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: checking that NSEC wildcard non-existance proof is returned non-validating ($n)"
+echo_i "checking that NSEC wildcard non-existance proof is returned non-validating ($n)"
 ret=0
 $DIG $DIGOPTS a b.wild.nsec @10.53.0.2 > dig.out.ns2.test$n || ret=1
 grep -i 'a\.wild\.nsec\..*NSEC.*nsec\..*NSEC'  dig.out.ns2.test$n > /dev/null || ret=1
 grep -i 'flags:.* ad[ ;]'  dig.out.ns2.test$n > /dev/null && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: checking that NSEC wildcard non-existance proof is returned validating ($n)"
+echo_i "checking that NSEC wildcard non-existance proof is returned validating ($n)"
 ret=0
 $DIG $DIGOPTS a b.wild.nsec @10.53.0.3 > dig.out.ns3.test$n || ret=1
 grep -i 'a\.wild\.nsec\..*NSEC.*nsec\..*NSEC'  dig.out.ns3.test$n > /dev/null || ret=1
 grep -i 'flags:.* ad[ ;]'  dig.out.ns3.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: checking that NSEC wildcard non-existance proof is returned validating + CD ($n)"
+echo_i "checking that NSEC wildcard non-existance proof is returned validating + CD ($n)"
 ret=0
 $DIG $DIGOPTS +cd a b.wild.nsec @10.53.0.5 > dig.out.ns5.test$n || ret=1
 grep -i 'a\.wild\.nsec\..*NSEC.*nsec\..*NSEC'  dig.out.ns5.test$n > /dev/null || ret=1
 grep -i 'flags:.* ad[ ;]'  dig.out.ns5.test$n > /dev/null && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 n=`expr $n + 1`
 
-echo "I: checking that returned NSEC wildcard non-existance proof validates ($n)"
+echo_i "checking that returned NSEC wildcard non-existance proof validates ($n)"
 ret=0
 $DIG $DIGOPTS a b.wild.nsec @10.53.0.4 > dig.out.ns4.test$n || ret=1
 grep -i 'a\.wild\.nsec\..*NSEC.*nsec\..*NSEC'  dig.out.ns4.test$n > /dev/null || ret=1
 grep -i 'flags:.* ad[ ;]'  dig.out.ns4.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: checking that NSEC wildcard non-existance proof is returned private, validating ($n)"
+echo_i "checking that NSEC wildcard non-existance proof is returned private, validating ($n)"
 ret=0
 $DIG $DIGOPTS a b.wild.private.nsec @10.53.0.3 > dig.out.ns3.test$n || ret=1
 grep -i 'a\.wild\.private\.nsec\..*NSEC.*private\.nsec\..*NSEC'  dig.out.ns3.test$n > /dev/null || ret=1
 grep -i 'flags:.* ad[ ;]'  dig.out.ns3.test$n > /dev/null && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: checking that returned NSEC wildcard non-existance proof for private zone validates ($n)"
+echo_i "checking that returned NSEC wildcard non-existance proof for private zone validates ($n)"
 ret=0
 $DIG $DIGOPTS a b.wild.private.nsec @10.53.0.4 > dig.out.ns4.test$n || ret=1
 grep -i 'a\.wild\.private\.nsec\..*NSEC.*private\.nsec\..*NSEC'  dig.out.ns4.test$n > /dev/null || ret=1
 grep -i 'flags:.* ad[ ;]'  dig.out.ns4.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: checking that NSEC3 wildcard non-existance proof is returned auth ($n)"
+echo_i "checking that NSEC3 wildcard non-existance proof is returned auth ($n)"
 ret=0
 $DIG $DIGOPTS a b.wild.nsec3 +norec @10.53.0.1 > dig.out.ns1.test$n || ret=1
 grep -i 'O3TJ8D9AJ54CBTFCQCJ3QK49CH7SF6H9\.nsec3\..*V5DLFB6UJNHR94LQ61FO607KGK12H88A'  dig.out.ns1.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: checking that NSEC3 wildcard non-existance proof is returned non-validating ($n)"
+echo_i "checking that NSEC3 wildcard non-existance proof is returned non-validating ($n)"
 ret=0
 $DIG $DIGOPTS a b.wild.nsec3 @10.53.0.2 > dig.out.ns2.test$n || ret=1
 grep -i 'O3TJ8D9AJ54CBTFCQCJ3QK49CH7SF6H9\.nsec3\..*V5DLFB6UJNHR94LQ61FO607KGK12H88A'  dig.out.ns2.test$n > /dev/null || ret=1
 grep -i 'flags:.* ad[ ;]'  dig.out.ns2.test$n > /dev/null && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: checking that NSEC3 wildcard non-existance proof is returned validating ($n)"
+echo_i "checking that NSEC3 wildcard non-existance proof is returned validating ($n)"
 ret=0
 $DIG $DIGOPTS a b.wild.nsec3 @10.53.0.3 > dig.out.ns3.test$n || ret=1
 grep -i 'O3TJ8D9AJ54CBTFCQCJ3QK49CH7SF6H9\.nsec3\..*V5DLFB6UJNHR94LQ61FO607KGK12H88A'  dig.out.ns3.test$n > /dev/null || ret=1
 grep -i 'flags:.* ad[ ;]'  dig.out.ns3.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: checking that NSEC3 wildcard non-existance proof is returned validating + CD ($n)"
+echo_i "checking that NSEC3 wildcard non-existance proof is returned validating + CD ($n)"
 ret=0
 $DIG $DIGOPTS +cd a b.wild.nsec3 @10.53.0.5 > dig.out.ns5.test$n || ret=1
 grep -i 'O3TJ8D9AJ54CBTFCQCJ3QK49CH7SF6H9\.nsec3\..*V5DLFB6UJNHR94LQ61FO607KGK12H88A'  dig.out.ns5.test$n > /dev/null || ret=1
 grep -i 'flags:.* ad[ ;]'  dig.out.ns5.test$n > /dev/null && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: checking that returned NSEC3 wildcard non-existance proof validates ($n)"
+echo_i "checking that returned NSEC3 wildcard non-existance proof validates ($n)"
 ret=0
 $DIG $DIGOPTS a b.wild.nsec3 @10.53.0.4 > dig.out.ns4.test$n || ret=1
 grep -i 'O3TJ8D9AJ54CBTFCQCJ3QK49CH7SF6H9\.nsec3\..*V5DLFB6UJNHR94LQ61FO607KGK12H88A'  dig.out.ns4.test$n > /dev/null || ret=1
 grep -i 'flags:.* ad[ ;]'  dig.out.ns4.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: checking that NSEC3 wildcard non-existance proof is returned private, validating ($n)"
+echo_i "checking that NSEC3 wildcard non-existance proof is returned private, validating ($n)"
 ret=0
 $DIG $DIGOPTS a b.wild.private.nsec3 @10.53.0.3 > dig.out.ns3.test$n || ret=1
 grep -i 'UDBSP4R8OUOT6HSO39VD8B5LMOSHRD5N\.private\.nsec3\..*NSEC3.*ASDRUIB7GO00OR92S5OUGI404LT27RNU' dig.out.ns3.test$n > /dev/null || ret=1
 grep -i 'flags:.* ad[ ;]'  dig.out.ns3.test$n > /dev/null && ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I: checking that returned NSEC3 wildcard non-existance proof for private zone validates ($n)"
+echo_i "checking that returned NSEC3 wildcard non-existance proof for private zone validates ($n)"
 ret=0
 $DIG $DIGOPTS a b.wild.private.nsec3 @10.53.0.4 > dig.out.ns4.test$n || ret=1
 grep -i 'UDBSP4R8OUOT6HSO39VD8B5LMOSHRD5N\.private\.nsec3\..*NSEC3.*ASDRUIB7GO00OR92S5OUGI404LT27RNU' dig.out.ns4.test$n > /dev/null || ret=1
 grep -i 'flags:.* ad[ ;]'  dig.out.ns4.test$n > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index b7cf999fc38f7f3f78c1091193479cc1408f8537..ee73ee22c27d2c3ed38ca28657db4ccb65a76c42 100644 (file)
@@ -15,8 +15,6 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id$
-
 #
 # Clean up after zone transfer tests.
 #
@@ -29,10 +27,11 @@ rm -f ns1/slave.db ns2/slave.db
 rm -f ns2/example.db ns2/tsigzone.db ns2/example.db.jnl
 rm -f ns3/example.bk ns3/tsigzone.bk ns3/example.bk.jnl
 rm -f ns3/master.bk ns3/master.bk.jnl
-rm -f ns4/named.conf ns4/nil.db ns4/root.db
+rm -f ns4/nil.db ns4/root.db
 rm -f ns6/*.db ns6/*.bk ns6/*.jnl
 rm -f ns7/*.db ns7/*.bk ns7/*.jnl
-
+rm -f */named.conf
+rm -f */named.run
 rm -f */named.memstats
 rm -f */named.run
 rm -f */ans.run
similarity index 91%
rename from bin/tests/system/xfer/ns1/named.conf
rename to bin/tests/system/xfer/ns1/named.conf.in
index f9934ea0d234e5cd9f4d7e4acc84b690bd1b7b42..5569e44d39055bf327c69a972a066fd5ab7b4b12 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.20 2011/03/12 04:59:47 tbox Exp $ */
-
 include "../../common/rndc.key";
 
 controls {
-       inet 10.53.0.1 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.1 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 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 90%
rename from bin/tests/system/xfer/ns2/named.conf
rename to bin/tests/system/xfer/ns2/named.conf.in
index 03b06c2c6c345d316f41feb3a221cfe395c5ad71..87d9cfa83dcd252dad529391896bfe4505ddac0a 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.24 2007/12/20 01:48:29 marka Exp $ */
-
-controls { /* empty */ };
-
 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; };
@@ -33,7 +29,14 @@ options {
        check-integrity no;
 };
 
-include "../../common/controls.conf";
+key rndc_key {
+       secret "1234abcd8765";
+       algorithm hmac-sha256;
+};
+
+controls {
+       inet 10.53.0.2 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
+};
 
 key tsigzone. {
        algorithm hmac-md5;
similarity index 90%
rename from bin/tests/system/xfer/ns3/named.conf
rename to bin/tests/system/xfer/ns3/named.conf.in
index 5f742d287544aa2f7d01f1e139731df872aa8f1e..501331e440fd2a63eac7d986249c45f180421f66 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.23 2011/03/12 04:59:47 tbox Exp $ */
-
-controls { /* empty */ };
-
 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; };
@@ -38,7 +34,7 @@ key rndc_key {
 };
 
 controls {
-        inet 10.53.0.3 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.3 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 key tsigzone. {
@@ -73,5 +69,3 @@ zone "tsigzone" {
        file "tsigzone.bk";
        allow-transfer { key tsigzone.; };
 };
-
-
index 231fcfaef6da53b2a7617fc1e0ab92d6dc5e937c..e27567bd16675a913edfd91155492786b50fa419 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf.base,v 1.3 2011/12/01 00:53:58 marka Exp $ */
-
 options {
        query-source address 10.53.0.4;
        notify-source 10.53.0.4;
        transfer-source 10.53.0.4;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.4; };
        listen-on-v6 { none; };
@@ -44,7 +42,7 @@ key tsig_key. {
 };
 
 controls {
-       inet 10.53.0.4 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.4 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 zone "." {
similarity index 91%
rename from bin/tests/system/xfer/ns6/named.conf
rename to bin/tests/system/xfer/ns6/named.conf.in
index 15405bcb7a3015d2077f64eb1edbef2d36386129..a6c4ff78aa86a5ca91cc5c3edc6265b69c8a812e 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.3 2011/03/12 04:59:47 tbox Exp $ */
-
 include "../../common/rndc.key";
 
 controls {
-       inet 10.53.0.6 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.6 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 options {
        query-source address 10.53.0.6;
        notify-source 10.53.0.6;
        transfer-source 10.53.0.6;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.6; };
        listen-on-v6 { none; };
similarity index 90%
rename from bin/tests/system/xfer/ns7/named.conf
rename to bin/tests/system/xfer/ns7/named.conf.in
index dcacb08e641f89a695e0ef09cafdc08ccaf012d7..ac9bd779cd874511385d700330dbb3333012941f 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.3 2011/03/12 04:59:47 tbox Exp $ */
-
 include "../../common/rndc.key";
 
 controls {
-        inet 10.53.0.7 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.7 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 options {
        query-source address 10.53.0.7;
        notify-source 10.53.0.7;
        transfer-source 10.53.0.7;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.7; };
        listen-on-v6 { none; };
index e93d31eb059d15d8dda7c7d538f72d224b319a15..73fba03412dc0394a9e479461f010364fdc22733 100644 (file)
@@ -20,10 +20,10 @@ then
     then
         :
     else
-        echo "I:Net::DNS versions 0.69 to 0.74 have bugs that cause this test to fail: please update." >&2
+        echo_i "Net::DNS versions 0.69 to 0.74 have bugs that cause this test to fail: please update." >&2
         exit 1
     fi
 else
-    echo "I:This test requires the Net::DNS library." >&2
+    echo_i "This test requires the Net::DNS library." >&2
     exit 1
 fi
index 1b4fb9a7a0736ca56565fb6d9a0c96168c5d407f..4e1831b16956d0979d307a768c69bf2bc125bc42 100644 (file)
@@ -29,7 +29,15 @@ $SHELL ../genzone.sh 7 >ns7/master2.db
 rm -f ns4/*.db ns4/*.jnl
 cp -f ns4/root.db.in ns4/root.db
 $PERL -e 'for ($i=0;$i<10000;$i++){ printf("x%u 0 in a 10.53.0.1\n", $i);}' >> ns4/root.db
-cp -f ns4/named.conf.base ns4/named.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
+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 ns4/named.conf.base ns4/named.conf
 
 cp ns2/slave.db.in ns2/slave.db
 touch -t 200101010000 ns2/slave.db
index 052c4b93011e873c05adb704cf2bdf9896704801..4cf5b5bf23b77f0abc5dc8041d111124223a0fbf 100644 (file)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id$
-
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
-DIGOPTS="+tcp +noadd +nosea +nostat +noquest +nocomm +nocmd"
+DIGOPTS="+tcp +noadd +nosea +nostat +noquest +nocomm +nocmd -p ${PORT}"
+RNDCCMD="$RNDC -c $SYSTEMTESTTOP/common/rndc.conf -p ${CONTROLPORT} -s"
 
 status=0
 n=0
 
 n=`expr $n + 1`
-echo "I:testing basic zone transfer functionality"
+echo_i "testing basic zone transfer functionality"
 $DIG $DIGOPTS example. \
-       @10.53.0.2 axfr -p 5300 > dig.out.ns2 || status=1
+       @10.53.0.2 axfr > dig.out.ns2 || status=1
 grep "^;" dig.out.ns2
 
 #
@@ -38,10 +37,10 @@ for i in 1 2 3 4 5
 do
 tmp=0
 $DIG $DIGOPTS example. \
-       @10.53.0.3 axfr -p 5300 > dig.out.ns3 || tmp=1
+       @10.53.0.3 axfr > dig.out.ns3 || tmp=1
        grep "^;" dig.out.ns3 > /dev/null
        if test $? -ne 0 ; then break; fi
-       echo "I: plain zone re-transfer"
+       echo_i "plain zone re-transfer"
        sleep 5
 done
 if test $tmp -eq 1 ; then status=1; fi
@@ -52,10 +51,8 @@ $PERL ../digcomp.pl dig1.good dig.out.ns2 || status=1
 $PERL ../digcomp.pl dig1.good dig.out.ns3 || status=1
 
 n=`expr $n + 1`
-echo "I:testing TSIG signed zone transfers"
-$DIG $DIGOPTS tsigzone. \
-       @10.53.0.2 axfr -y tsigzone.:1234abcd8765 -p 5300 \
-       > dig.out.ns2 || status=1
+echo_i "testing TSIG signed zone transfers"
+$DIG $DIGOPTS tsigzone. @10.53.0.2 axfr -y tsigzone.:1234abcd8765 > dig.out.ns2 || status=1
 grep "^;" dig.out.ns2
 
 #
@@ -64,12 +61,10 @@ grep "^;" dig.out.ns2
 for i in 1 2 3 4 5
 do
 tmp=0
-$DIG $DIGOPTS tsigzone. \
-       @10.53.0.3 axfr -y tsigzone.:1234abcd8765 -p 5300 \
-       > dig.out.ns3 || tmp=1
+       $DIG $DIGOPTS tsigzone. @10.53.0.3 axfr -y tsigzone.:1234abcd8765 > dig.out.ns3 || tmp=1
        grep "^;" dig.out.ns3 > /dev/null
        if test $? -ne 0 ; then break; fi
-       echo "I: plain zone re-transfer"
+       echo_i "plain zone re-transfer"
        sleep 5
 done
 if test $tmp -eq 1 ; then status=1; fi
@@ -77,168 +72,167 @@ grep "^;" dig.out.ns3
 
 $PERL ../digcomp.pl dig.out.ns2 dig.out.ns3 || status=1
 
-echo "I:reload servers for in preparation for ixfr-from-differences tests"
+echo_i "reload servers for in preparation for ixfr-from-differences tests"
 
-$RNDC -c ../common/rndc.conf -s 10.53.0.1 -p 9953 reload 2>&1 | sed 's/^/I:ns1 /'
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
-$RNDC -c ../common/rndc.conf -s 10.53.0.3 -p 9953 reload 2>&1 | sed 's/^/I:ns3 /'
-$RNDC -c ../common/rndc.conf -s 10.53.0.6 -p 9953 reload 2>&1 | sed 's/^/I:ns6 /'
-$RNDC -c ../common/rndc.conf -s 10.53.0.7 -p 9953 reload 2>&1 | sed 's/^/I:ns7 /'
+$RNDCCMD 10.53.0.1 reload 2>&1 | sed 's/^/ns1 /' | cat_i
+$RNDCCMD 10.53.0.2 reload 2>&1 | sed 's/^/ns2 /' | cat_i
+$RNDCCMD 10.53.0.3 reload 2>&1 | sed 's/^/ns3 /' | cat_i
+$RNDCCMD 10.53.0.6 reload 2>&1 | sed 's/^/ns6 /' | cat_i
+$RNDCCMD 10.53.0.7 reload 2>&1 | sed 's/^/ns7 /' | cat_i
 
 sleep 2
 
-echo "I:updating master zones for ixfr-from-differences tests"
+echo_i "updating master zones for ixfr-from-differences tests"
 
 $PERL -i -p -e '
        s/0\.0\.0\.0/0.0.0.1/;
        s/1397051952/1397051953/
 ' ns1/slave.db
 
-$RNDC -c ../common/rndc.conf -s 10.53.0.1 -p 9953 reload 2>&1 | sed 's/^/I:ns1 /'
+$RNDCCMD 10.53.0.1 reload 2>&1 | sed 's/^/ns1 /' | cat_i
 
 $PERL -i -p -e '
        s/0\.0\.0\.0/0.0.0.1/;
        s/1397051952/1397051953/
 ' ns2/example.db
 
-$RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reload 2>&1 | sed 's/^/I:ns2 /'
+$RNDCCMD 10.53.0.2 reload 2>&1 | sed 's/^/ns2 /' | cat_i
 
 $PERL -i -p -e '
        s/0\.0\.0\.0/0.0.0.1/;
        s/1397051952/1397051953/
 ' ns6/master.db
 
-$RNDC -c ../common/rndc.conf -s 10.53.0.6 -p 9953 reload 2>&1 | sed 's/^/I:ns6 /'
+$RNDCCMD 10.53.0.6 reload 2>&1 | sed 's/^/ns6 /' | cat_i
 
 $PERL -i -p -e '
        s/0\.0\.0\.0/0.0.0.1/;
        s/1397051952/1397051953/
 ' ns7/master2.db
 
-$RNDC -c ../common/rndc.conf -s 10.53.0.7 -p 9953 reload 2>&1 | sed 's/^/I:ns7 /'
+$RNDCCMD 10.53.0.7 reload 2>&1 | sed 's/^/ns7 /' | cat_i
 
 sleep 3
 
-echo "I:testing zone is dumped after successful transfer"
-$DIG $DIGOPTS +noall +answer +multi @10.53.0.2 -p 5300 \
+echo_i "testing zone is dumped after successful transfer"
+$DIG $DIGOPTS +noall +answer +multi @10.53.0.2 \
        slave. soa > dig.out.ns2 || tmp=1
 grep "1397051952 ; serial" dig.out.ns2 > /dev/null 2>&1 || tmp=1
 grep "1397051952 ; serial" ns2/slave.db > /dev/null 2>&1 || tmp=1
-if test $tmp != 0 ; then echo "I:failed"; fi
+if test $tmp != 0 ; then echo_i "failed"; fi
 status=`expr $status + $tmp`
 
 n=`expr $n + 1`
-echo "I:testing ixfr-from-differences yes;"
+echo_i "testing ixfr-from-differences yes;"
 tmp=0
 for i in 0 1 2 3 4 5 6 7 8 9
 do
-       $DIG $DIGOPTS @10.53.0.3 -p 5300 +noall +answer soa example > dig.out.soa.ns3
+       $DIG $DIGOPTS @10.53.0.3 +noall +answer soa example > dig.out.soa.ns3
        grep "1397051953" dig.out.soa.ns3 > /dev/null && break;
        sleep 1
 done
 
 $DIG $DIGOPTS example. \
-       @10.53.0.3 axfr -p 5300 > dig.out.ns3 || tmp=1
+       @10.53.0.3 axfr > dig.out.ns3 || tmp=1
 grep "^;" dig.out.ns3
 
 $PERL ../digcomp.pl dig2.good dig.out.ns3 || tmp=1
 
 # ns3 has a journal iff it received an IXFR.
-test -f ns3/example.bk || tmp=1 
-test -f ns3/example.bk.jnl || tmp=1 
+test -f ns3/example.bk || tmp=1
+test -f ns3/example.bk.jnl || tmp=1
 
-if test $tmp != 0 ; then echo "I:failed"; fi
+if test $tmp != 0 ; then echo_i "failed"; fi
 status=`expr $status + $tmp`
 
 n=`expr $n + 1`
-echo "I:testing ixfr-from-differences master; (master zone)"
+echo_i "testing ixfr-from-differences master; (master zone)"
 tmp=0
 
 $DIG $DIGOPTS master. \
-       @10.53.0.6 axfr -p 5300 > dig.out.ns6 || tmp=1
+       @10.53.0.6 axfr > dig.out.ns6 || tmp=1
 grep "^;" dig.out.ns6
 
 $DIG $DIGOPTS master. \
-       @10.53.0.3 axfr -p 5300 > dig.out.ns3 || tmp=1
+       @10.53.0.3 axfr > dig.out.ns3 || tmp=1
 grep "^;" dig.out.ns3 && cat dig.out.ns3
 
 $PERL ../digcomp.pl dig.out.ns6 dig.out.ns3 || tmp=1
 
 # ns3 has a journal iff it received an IXFR.
-test -f ns3/master.bk || tmp=1 
-test -f ns3/master.bk.jnl || tmp=1 
+test -f ns3/master.bk || tmp=1
+test -f ns3/master.bk.jnl || tmp=1
 
-if test $tmp != 0 ; then echo "I:failed"; fi
+if test $tmp != 0 ; then echo_i "failed"; fi
 status=`expr $status + $tmp`
 
 n=`expr $n + 1`
-echo "I:testing ixfr-from-differences master; (slave zone)"
+echo_i "testing ixfr-from-differences master; (slave zone)"
 tmp=0
 
 $DIG $DIGOPTS slave. \
-       @10.53.0.6 axfr -p 5300 > dig.out.ns6 || tmp=1
+       @10.53.0.6 axfr > dig.out.ns6 || tmp=1
 grep "^;" dig.out.ns6
 
 $DIG $DIGOPTS slave. \
-       @10.53.0.1 axfr -p 5300 > dig.out.ns1 || tmp=1
+       @10.53.0.1 axfr > dig.out.ns1 || tmp=1
 grep "^;" dig.out.ns1
 
 $PERL ../digcomp.pl dig.out.ns6 dig.out.ns1 || tmp=1
 
 # ns6 has a journal iff it received an IXFR.
-test -f ns6/slave.bk || tmp=1 
-test -f ns6/slave.bk.jnl && tmp=1 
+test -f ns6/slave.bk || tmp=1
+test -f ns6/slave.bk.jnl && tmp=1
 
-if test $tmp != 0 ; then echo "I:failed"; fi
+if test $tmp != 0 ; then echo_i "failed"; fi
 status=`expr $status + $tmp`
 
 n=`expr $n + 1`
-echo "I:testing ixfr-from-differences slave; (master zone)"
+echo_i "testing ixfr-from-differences slave; (master zone)"
 tmp=0
 
 # ns7 has a journal iff it generates an IXFR.
-test -f ns7/master2.db || tmp=1 
-test -f ns7/master2.db.jnl && tmp=1 
+test -f ns7/master2.db || tmp=1
+test -f ns7/master2.db.jnl && tmp=1
 
-if test $tmp != 0 ; then echo "I:failed"; fi
+if test $tmp != 0 ; then echo_i "failed"; fi
 status=`expr $status + $tmp`
 
 n=`expr $n + 1`
-echo "I:testing ixfr-from-differences slave; (slave zone)"
+echo_i "testing ixfr-from-differences slave; (slave zone)"
 tmp=0
 
 $DIG $DIGOPTS slave. \
-       @10.53.0.1 axfr -p 5300 > dig.out.ns1 || tmp=1
+       @10.53.0.1 axfr > dig.out.ns1 || tmp=1
 grep "^;" dig.out.ns1
 
 $DIG $DIGOPTS slave. \
-       @10.53.0.7 axfr -p 5300 > dig.out.ns7 || tmp=1
+       @10.53.0.7 axfr > dig.out.ns7 || tmp=1
 grep "^;" dig.out.ns1
 
 $PERL ../digcomp.pl dig.out.ns7 dig.out.ns1 || tmp=1
 
 # ns7 has a journal iff it generates an IXFR.
-test -f ns7/slave.bk || tmp=1 
-test -f ns7/slave.bk.jnl || tmp=1 
+test -f ns7/slave.bk || tmp=1
+test -f ns7/slave.bk.jnl || tmp=1
 
-if test $tmp != 0 ; then echo "I:failed"; fi
+if test $tmp != 0 ; then echo_i "failed"; fi
 status=`expr $status + $tmp`
 
-echo "I:check that a multi-message uncompressable zone transfers"
-$DIG axfr . -p 5300 @10.53.0.4 | grep SOA > axfr.out
+echo_i "check that a multi-message uncompressable zone transfers"
+$DIG axfr . -p ${PORT} @10.53.0.4 | grep SOA > axfr.out
 if test `wc -l < axfr.out` != 2
 then
-        echo "I:failed"
+        echo_i "failed"
         status=`expr $status + 1`
 fi
 
 # now we test transfers with assorted TSIG glitches
-DIGCMD="$DIG $DIGOPTS @10.53.0.4 -p 5300"
-SENDCMD="$PERL ../send.pl 10.53.0.5 5301"
-RNDCCMD="$RNDC -s 10.53.0.4 -p 9953 -c ../common/rndc.conf"
+DIGCMD="$DIG $DIGOPTS @10.53.0.4"
+SENDCMD="$PERL ../send.pl 10.53.0.5 $EXTRAPORT1"
 
-echo "I:testing that incorrectly signed transfers will fail..."
-echo "I:initial correctly-signed transfer should succeed"
+echo_i "testing that incorrectly signed transfers will fail..."
+echo_i "initial correctly-signed transfer should succeed"
 
 $SENDCMD < ans5/goodaxfr
 sleep 1
@@ -257,7 +251,7 @@ EOF
 
 cur=`awk 'END {print NR}' ns4/named.run`
 
-$RNDCCMD reload | sed 's/^/I:ns4 /'
+$RNDCCMD 10.53.0.4 reload | sed 's/^/ns4 /' | cat_i
 
 for i in 0 1 2 3 4 5 6 7 8 9
 do
@@ -267,130 +261,130 @@ do
 done
 
 sed -n "$cur,\$p" < ns4/named.run | grep "Transfer status: success" > /dev/null || {
-    echo "I: failed: expected status was not logged"
+    echo_i "failed: expected status was not logged"
     status=1
 }
 cur=`awk 'END {print NR}' ns4/named.run`
 
 $DIGCMD nil. TXT | grep 'initial AXFR' >/dev/null || {
-    echo "I:failed"
+    echo_i "failed"
     status=1
 }
 
-echo "I:unsigned transfer"
+echo_i "unsigned transfer"
 
 $SENDCMD < ans5/unsigned
 sleep 1
 
-$RNDCCMD retransfer nil | sed 's/^/I:ns4 /'
+$RNDCCMD 10.53.0.4 retransfer nil | sed 's/^/ns4 /' | cat_i
 
 sleep 2
 
 sed -n "$cur,\$p" < ns4/named.run | grep "Transfer status: expected a TSIG or SIG(0)" > /dev/null || {
-    echo "I: failed: expected status was not logged"
+    echo_i "failed: expected status was not logged"
     status=1
 }
 cur=`awk 'END {print NR}' ns4/named.run`
 
 $DIGCMD nil. TXT | grep 'unsigned AXFR' >/dev/null && {
-    echo "I:failed"
+    echo_i "failed"
     status=1
 }
 
-echo "I:bad keydata"
+echo_i "bad keydata"
 
 $SENDCMD < ans5/badkeydata
 sleep 1
 
-$RNDCCMD retransfer nil | sed 's/^/I:ns4 /'
+$RNDCCMD 10.53.0.4 retransfer nil | sed 's/^/ns4 /' | cat_i
 
 sleep 2
 
 sed -n "$cur,\$p" < ns4/named.run | grep "Transfer status: tsig verify failure" > /dev/null || {
-    echo "I: failed: expected status was not logged"
+    echo_i "failed: expected status was not logged"
     status=1
 }
 cur=`awk 'END {print NR}' ns4/named.run`
 
 $DIGCMD nil. TXT | grep 'bad keydata AXFR' >/dev/null && {
-    echo "I:failed"
+    echo_i "failed"
     status=1
 }
 
-echo "I:partially-signed transfer"
+echo_i "partially-signed transfer"
 
 $SENDCMD < ans5/partial
 sleep 1
 
-$RNDCCMD retransfer nil | sed 's/^/I:ns4 /'
+$RNDCCMD 10.53.0.4 retransfer nil | sed 's/^/ns4 /' | cat_i
 
 sleep 2
 
 sed -n "$cur,\$p" < ns4/named.run | grep "Transfer status: expected a TSIG or SIG(0)" > /dev/null || {
-    echo "I: failed: expected status was not logged"
+    echo_i "failed: expected status was not logged"
     status=1
 }
 cur=`awk 'END {print NR}' ns4/named.run`
 
 $DIGCMD nil. TXT | grep 'partially signed AXFR' >/dev/null && {
-    echo "I:failed"
+    echo_i "failed"
     status=1
 }
 
-echo "I:unknown key"
+echo_i "unknown key"
 
 $SENDCMD < ans5/unknownkey
 sleep 1
 
-$RNDCCMD retransfer nil | sed 's/^/I:ns4 /'
+$RNDCCMD 10.53.0.4 retransfer nil | sed 's/^/ns4 /' | cat_i
 
 sleep 2
 
 sed -n "$cur,\$p" < ns4/named.run | grep "tsig key 'tsig_key': key name and algorithm do not match" > /dev/null || {
-    echo "I: failed: expected status was not logged"
+    echo_i "failed: expected status was not logged"
     status=1
 }
 cur=`awk 'END {print NR}' ns4/named.run`
 
 $DIGCMD nil. TXT | grep 'unknown key AXFR' >/dev/null && {
-    echo "I:failed"
+    echo_i "failed"
     status=1
 }
 
-echo "I:incorrect key"
+echo_i "incorrect key"
 
 $SENDCMD < ans5/wrongkey
 sleep 1
 
-$RNDCCMD retransfer nil | sed 's/^/I:ns4 /'
+$RNDCCMD 10.53.0.4 retransfer nil | sed 's/^/ns4 /' | cat_i
 
 sleep 2
 
 sed -n "$cur,\$p" < ns4/named.run | grep "tsig key 'tsig_key': key name and algorithm do not match" > /dev/null || {
-    echo "I: failed: expected status was not logged"
+    echo_i "failed: expected status was not logged"
     status=1
 }
 cur=`awk 'END {print NR}' ns4/named.run`
 
 $DIGCMD nil. TXT | grep 'incorrect key AXFR' >/dev/null && {
-    echo "I:failed"
+    echo_i "failed"
     status=1
 }
 
 n=`expr $n + 1`
-echo "I:test that a zone with too many records is rejected (AXFR) ($n)"
+echo_i "test that a zone with too many records is rejected (AXFR) ($n)"
 tmp=0
 grep "'axfr-too-big/IN'.*: too many records" ns6/named.run >/dev/null || tmp=1
-if test $tmp != 0 ; then echo "I:failed"; fi
+if test $tmp != 0 ; then echo_i "failed"; fi
 status=`expr $status + $tmp`
 
 n=`expr $n + 1`
-echo "I:test that a zone with too many records is rejected (IXFR) ($n)"
+echo_i "test that a zone with too many records is rejected (IXFR) ($n)"
 tmp=0
 grep "'ixfr-too-big./IN.*: too many records" ns6/named.run >/dev/null && tmp=1
 $NSUPDATE << EOF
 zone ixfr-too-big
-server 10.53.0.1 5300
+server 10.53.0.1 ${PORT}
 update add the-31st-record.ixfr-too-big 0 TXT this is it
 send
 EOF
@@ -400,8 +394,8 @@ do
     sleep 1
 done
 grep "'ixfr-too-big/IN'.*: too many records" ns6/named.run >/dev/null || tmp=1
-if test $tmp != 0 ; then echo "I:failed"; fi
+if test $tmp != 0 ; then echo_i "failed"; fi
 status=`expr $status + $tmp`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index 905deeb763a31ff086bb5b869abc6b21ad9c9535..51241b5906dee1553d4131ada5e7556d95814080 100644 (file)
@@ -15,8 +15,6 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: clean.sh,v 1.14 2007/09/26 03:22:44 marka Exp $
-
 #
 # Clean up after zone transfer quota tests.
 #
@@ -26,4 +24,5 @@ rm -f ns2/zone*.example.bk ns2/zones.conf
 rm -f dig.out.* ns2/changing.bk
 rm -f ns1/changing.db
 rm -f */named.memstats
+rm -f */named.conf
 rm -f */named.run
similarity index 92%
rename from bin/tests/system/xferquota/ns1/named.conf
rename to bin/tests/system/xferquota/ns1/named.conf.in
index a49e790e3e280c1419dc541868795566cd85a063..424324ea7d9f664b17d78dad149eb942f678ba6a 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.21 2007/06/19 23:47:07 tbox Exp $ */
-
-controls { /* empty */ };
-
 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 92%
rename from bin/tests/system/xferquota/ns2/named.conf
rename to bin/tests/system/xferquota/ns2/named.conf.in
index 5930eeaf5d96bb19e43e772d9dba2bfeb7b308cf..5f75c44d637941ee674b8bc4c7c4f6baaaf9fd60 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.22 2007/06/19 23:47:07 tbox Exp $ */
-
-controls { /* empty */ };
-
 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; };
index 528b7d39788e6f6121c710644c68fff9aac20494..1eff1c22c4f055689541e24a6464a527827b2b7b 100644 (file)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: setup.sh,v 1.15 2007/06/19 23:47:07 tbox Exp $
-
 #
 # Set up test data for zone transfer quota tests.
 #
 
+SYSTEMTESTTOP=..
+. $SYSTEMTESTTOP/conf.sh
+
+$SHELL clean.sh
+
 $PERL setup.pl
 
 cp -f ns1/changing1.db ns1/changing.db
+
+copy_setports ns1/named.conf.in ns1/named.conf
+copy_setports ns2/named.conf.in ns2/named.conf
index 7951692c64da1c52ef0dff0c6a1ebc5ad5777fb9..90e59393027d78f2c7fe3727d98668577d2391f7 100644 (file)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id: tests.sh,v 1.25 2007/06/19 23:47:07 tbox Exp $
-
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
+DIGOPTS="+tcp +noadd +nosea +nostat +noquest +nocomm +nocmd -p ${PORT}"
+RNDCCMD="$RNDC -c $SYSTEMTESTTOP/common/rndc.conf -p ${CONTROLPORT} -s"
+
 #
 # Perform tests
 #
@@ -28,7 +29,7 @@ count=0
 ticks=0
 while [ $count != 300 ]; do
         if [ $ticks = 1 ]; then
-               echo "I:Changing test zone..."
+               echo_i "Changing test zone..."
                cp -f ns1/changing2.db ns1/changing.db
                kill -HUP `cat ns1/named.pid`
        fi
@@ -36,36 +37,32 @@ while [ $count != 300 ]; do
        ticks=`expr $ticks + 1`
        seconds=`expr $ticks \* 1`
        if [ $ticks = 360 ]; then
-               echo "I:Took too long to load zones"
+               echo_i "Took too long to load zones"
                exit 1
        fi
        count=`cat ns2/zone*.bk | grep xyzzy | wc -l`
-       echo "I:Have $count zones up in $seconds seconds"
+       echo_i "Have $count zones up in $seconds seconds"
 done
 
 status=0
 
-$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd \
-       zone000099.example. @10.53.0.1 axfr -p 5300 > dig.out.ns1 || status=1
+$DIG $DIGOPTS zone000099.example. @10.53.0.1 axfr > dig.out.ns1 || status=1
 grep ";" dig.out.ns1
 
-$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd \
-       zone000099.example. @10.53.0.2 axfr -p 5300 > dig.out.ns2 || status=1
+$DIG $DIGOPTS zone000099.example. @10.53.0.2 axfr > dig.out.ns2 || status=1
 grep ";" dig.out.ns2
 
 $PERL ../digcomp.pl dig.out.ns1 dig.out.ns2 || status=1
 
 sleep 15
 
-$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd \
-       a.changing. @10.53.0.1 a -p 5300 > dig.out.ns1 || status=1
+$DIG $DIGOPTS a.changing. @10.53.0.1 a > dig.out.ns1 || status=1
 grep ";" dig.out.ns1
 
-$DIG +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd \
-       a.changing. @10.53.0.2 a -p 5300 > dig.out.ns2 || status=1
+$DIG $DIGOPTS a.changing. @10.53.0.2 a > dig.out.ns2 || status=1
 grep ";" dig.out.ns2
 
 $PERL ../digcomp.pl dig.out.ns1 dig.out.ns2 || status=1
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index 0d0fd318f9733ece7f8128b06b718ed7174cb59a..a146acc0188457ae72bc98cda1c3ba2524946ed1 100644 (file)
@@ -24,8 +24,11 @@ use IO::Socket;
 use Net::DNS;
 use Net::DNS::Packet;
 
+my $localport = int($ENV{'PORT'});
+if (!$localport) { $localport = 5300; }
+
 my $sock = IO::Socket::INET->new(LocalAddr => "10.53.0.5",
-   LocalPort => 5300, Proto => "udp") or die "$!";
+   LocalPort => $localport, Proto => "udp") or die "$!";
 
 my $pidf = new IO::File "ans.pid", "w" or die "cannot open pid file: $!";
 print $pidf "$$\n" or die "cannot write pid file: $!";
index b246ec64df1a2e3936f0d777196f20d00b878cce..a54d9fc069778668cd6ad812e32b94e8562afc9e 100644 (file)
@@ -12,6 +12,7 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
+rm -f */named.conf
 rm -f */named.run
 rm -f */named.memstats
 rm -f ns2/example.db
similarity index 91%
rename from bin/tests/system/zero/ns1/named.conf
rename to bin/tests/system/zero/ns1/named.conf.in
index 1c8aabcca0d6681f5c1378f16dd00412494c97b3..7b56a8111089954c686010bbf26cc55940bd620f 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.15 2009/05/29 23:47:49 tbox Exp $ */
-
-controls { /* empty */ };
-
 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; };
@@ -34,4 +30,3 @@ zone "." {
        type master;
        file "root.db";
 };
-
similarity index 91%
rename from bin/tests/system/zero/ns2/named.conf
rename to bin/tests/system/zero/ns2/named.conf.in
index c1d2e6a6471bda24bfc61e1e8c547a39fae0e275..f36975f7cfd5ffb45ea67159da4c38eee62744af 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.15 2009/05/29 23:47:49 tbox Exp $ */
-
-controls { /* empty */ };
-
 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 91%
rename from bin/tests/system/zero/ns3/named.conf
rename to bin/tests/system/zero/ns3/named.conf.in
index 3af9fd9567573a184a0454c1a1c7c9446c748303..e73ee4273bc7cc90338ab0051a5d395603100f73 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.15 2009/05/29 23:47:49 tbox Exp $ */
-
-controls { /* empty */ };
-
 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; };
@@ -34,4 +30,3 @@ zone "." {
        type hint;
        file "root.hint";
 };
-
similarity index 91%
rename from bin/tests/system/zero/ns4/named.conf
rename to bin/tests/system/zero/ns4/named.conf.in
index 3cf95a59b253a7b8d1c09fbc65d0af76a0d8859e..0dbb3bc8cd607002f565396e8375b88ea129e92c 100644 (file)
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named.conf,v 1.15 2009/05/29 23:47:49 tbox Exp $ */
-
-controls { /* empty */ };
-
 options {
        query-source address 10.53.0.4;
        notify-source 10.53.0.4;
        transfer-source 10.53.0.4;
-       port 5300;
+       port @PORT@;
        pid-file "named.pid";
        listen-on { 10.53.0.4; };
        listen-on-v6 { none; };
index 9250e0ed79c993486f977257a8103a6bfa02b47f..eb1362b9f53e5df138a511220dbf2c90234673c3 100644 (file)
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
+$SHELL clean.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
+copy_setports ns4/named.conf.in ns4/named.conf
+
 $SHELL ../genzone.sh 2 4 | sed -e 's/^$TTL 3600$/$TTL 0 ; force TTL to zero/' -e 's/86400.IN SOA/0 SOA/' > ns2/example.db
index 98b43ee4a58bc10628ca0fc560bf1b78cb0ab076..4e45608618465870b46e9a52494cabe8879c2d97 100644 (file)
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
+DIGOPTS="-p ${PORT}"
+
 status=0
 n=0
 
 n=`expr $n + 1`
-echo "I:check lookups against TTL=0 records ($n)"
+echo_i "check lookups against TTL=0 records ($n)"
 i=0
 passes=10
-$DIG -p 5300 @10.53.0.2 axfr example | grep -v "^ds0" |
+$DIG $DIGOPTS @10.53.0.2 axfr example | grep -v "^ds0" |
 awk '$2 == "0" { print "-q", $1, $4; print "-q", "zzz"$1, $4;}' > query.list
 while [ $i -lt $passes ]
 do
        ret=0
-       $DIG -p 5300 @10.53.0.3 -f query.list > dig.out$i.1.test$n &
-       $DIG -p 5300 @10.53.0.3 -f query.list > dig.out$i.2.test$n &
-       $DIG -p 5300 @10.53.0.3 -f query.list > dig.out$i.3.test$n &
-       $DIG -p 5300 @10.53.0.3 -f query.list > dig.out$i.4.test$n &
-       $DIG -p 5300 @10.53.0.3 -f query.list > dig.out$i.5.test$n &
-       $DIG -p 5300 @10.53.0.3 -f query.list > dig.out$i.6.test$n &
+       $DIG $DIGOPTS @10.53.0.3 -f query.list > dig.out$i.1.test$n &
+       $DIG $DIGOPTS @10.53.0.3 -f query.list > dig.out$i.2.test$n &
+       $DIG $DIGOPTS @10.53.0.3 -f query.list > dig.out$i.3.test$n &
+       $DIG $DIGOPTS @10.53.0.3 -f query.list > dig.out$i.4.test$n &
+       $DIG $DIGOPTS @10.53.0.3 -f query.list > dig.out$i.5.test$n &
+       $DIG $DIGOPTS @10.53.0.3 -f query.list > dig.out$i.6.test$n &
        wait
        grep "status: SERVFAIL" dig.out$i.1.test$n && ret=1
        grep "status: SERVFAIL" dig.out$i.2.test$n && ret=1
@@ -42,38 +44,38 @@ do
        grep "status: SERVFAIL" dig.out$i.6.test$n && ret=1
        [ $ret = 1 ] && break
        i=`expr $i + 1`
-       echo "I: successfully completed pass $i of $passes"
+       echo_i "successfully completed pass $i of $passes"
 done
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:check repeated recursive lookups of non recurring TTL=0 responses get new values ($n)"
+echo_i "check repeated recursive lookups of non recurring TTL=0 responses get new values ($n)"
 count=`(
-$DIG +short -p 5300 @10.53.0.3 foo.increment
-$DIG +short -p 5300 @10.53.0.3 foo.increment
-$DIG +short -p 5300 @10.53.0.3 foo.increment
-$DIG +short -p 5300 @10.53.0.3 foo.increment
-$DIG +short -p 5300 @10.53.0.3 foo.increment
-$DIG +short -p 5300 @10.53.0.3 foo.increment
-$DIG +short -p 5300 @10.53.0.3 foo.increment
+$DIG $DIGOPTS +short @10.53.0.3 foo.increment
+$DIG $DIGOPTS +short @10.53.0.3 foo.increment
+$DIG $DIGOPTS +short @10.53.0.3 foo.increment
+$DIG $DIGOPTS +short @10.53.0.3 foo.increment
+$DIG $DIGOPTS +short @10.53.0.3 foo.increment
+$DIG $DIGOPTS +short @10.53.0.3 foo.increment
+$DIG $DIGOPTS +short @10.53.0.3 foo.increment
 ) | sort -u | wc -l `
-if [ $count -ne 7 ] ; then echo "I:failed (count=$count)"; ret=1; fi
+if [ $count -ne 7 ] ; then echo_i "failed (count=$count)"; ret=1; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:check lookups against TTL=1 records ($n)"
+echo_i "check lookups against TTL=1 records ($n)"
 i=0
 passes=10
 while [ $i -lt $passes ]
 do
        ret=0
-       $DIG -p 5300 @10.53.0.3 www.one.tld > dig.out$i.1.test$n
-       $DIG -p 5300 @10.53.0.3 www.one.tld > dig.out$i.2.test$n
-       $DIG -p 5300 @10.53.0.3 www.one.tld > dig.out$i.3.test$n
-       $DIG -p 5300 @10.53.0.3 www.one.tld > dig.out$i.4.test$n
-       $DIG -p 5300 @10.53.0.3 www.one.tld > dig.out$i.5.test$n
-       $DIG -p 5300 @10.53.0.3 www.one.tld > dig.out$i.6.test$n
+       $DIG $DIGOPTS @10.53.0.3 www.one.tld > dig.out$i.1.test$n
+       $DIG $DIGOPTS @10.53.0.3 www.one.tld > dig.out$i.2.test$n
+       $DIG $DIGOPTS @10.53.0.3 www.one.tld > dig.out$i.3.test$n
+       $DIG $DIGOPTS @10.53.0.3 www.one.tld > dig.out$i.4.test$n
+       $DIG $DIGOPTS @10.53.0.3 www.one.tld > dig.out$i.5.test$n
+       $DIG $DIGOPTS @10.53.0.3 www.one.tld > dig.out$i.6.test$n
        grep "status: SERVFAIL" dig.out$i.1.test$n && ret=1
        grep "status: SERVFAIL" dig.out$i.2.test$n && ret=1
        grep "status: SERVFAIL" dig.out$i.3.test$n && ret=1
@@ -82,11 +84,11 @@ do
        grep "status: SERVFAIL" dig.out$i.6.test$n && ret=1
        [ $ret = 1 ] && break
        i=`expr $i + 1`
-       echo "I: successfully completed pass $i of $passes"
+       echo_i "successfully completed pass $i of $passes"
        $PERL -e 'select(undef, undef, undef, 0.3);'
 done
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index f17551897db1d0604f5db99724d9957936d01b6f..53008d3f76b1f90f27a4f019762c947ba5887f7e 100644 (file)
@@ -16,6 +16,7 @@
 
 rm -f *.out
 rm -f */named.memstats
+rm -f */named.conf
 rm -f */named.run
 rm -f */*.db */*.db.signed */K*.key */K*.private */*.jnl */dsset-*
 rm -f rndc.out.*
similarity index 93%
rename from bin/tests/system/zonechecks/ns1/named.conf
rename to bin/tests/system/zonechecks/ns1/named.conf.in
index 85bdefda1eaacd4ee8d80aa1c6337a9c7d2c0654..82e318fe5e0573f71f6dd048f9fdc4cbd67f5a77 100644 (file)
 
 // NS1
 
-controls { /* empty */ };
-
 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; };
@@ -38,7 +36,7 @@ key rndc_key {
 };
 
 controls {
-       inet 10.53.0.1 port 9953 allow { any; } keys { rndc_key; };
+       inet 10.53.0.1 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
 };
 
 view unused {
index cf86ce6780bb8c819013a4df6a205e5bc9adf670..f25332cf77932678410ddf1230bcf58ab0398935 100644 (file)
@@ -21,6 +21,9 @@ $SHELL clean.sh
 
 test -r $RANDFILE || $GENRANDOM 400 $RANDFILE
 
+copy_setports ns1/named.conf.in ns1/named.conf
+copy_setports ns2/named.conf.in ns2/named.conf
+
 $SHELL ../genzone.sh 1 > ns1/master.db
 $SHELL ../genzone.sh 1 > ns1/duplicate.db
 cd ns1
index 4cdf00d98e6bcf9d8069ac05a6ec680d279645ea..d9c5771574d6208dff346de8cd2acc101d0520a3 100644 (file)
 SYSTEMTESTTOP=..
 . $SYSTEMTESTTOP/conf.sh
 
+DIGOPTS="-p ${PORT}"
+RNDCCMD="$RNDC -c $SYSTEMTESTTOP/common/rndc.conf -p ${CONTROLPORT} -s"
+
 status=0
 
 #
-echo "I: checking that we detect a NS which refers to a CNAME"
+echo_i "checking that we detect a NS which refers to a CNAME"
 if $CHECKZONE . cname.db > cname.out 2>&1
 then
-       echo "I:failed (status)"; status=1
+       echo_i "failed (status)"; status=1
 else
        if grep "is a CNAME" cname.out > /dev/null
        then
                :
        else
-               echo "I:failed (message)"; status=1
+               echo_i "failed (message)"; status=1
        fi
 fi
 
 #
-echo "I: checking that we detect a NS which is below a DNAME"
+echo_i "checking that we detect a NS which is below a DNAME"
 if $CHECKZONE . dname.db > dname.out 2>&1
 then
-       echo "I:failed (status)"; status=1
+       echo_i "failed (status)"; status=1
 else
        if grep "is below a DNAME" dname.out > /dev/null
        then
                :
        else
-               echo "I:failed (message)"; status=1
+               echo_i "failed (message)"; status=1
        fi
 fi
 
 #
-echo "I: checking that we detect a NS which has no address records (A/AAAA)"
+echo_i "checking that we detect a NS which has no address records (A/AAAA)"
 if $CHECKZONE . noaddress.db > noaddress.out
 then
-       echo "I:failed (status)"; status=1
+       echo_i "failed (status)"; status=1
 else
        if grep "has no address records" noaddress.out > /dev/null
        then
                :
        else
-               echo "I:failed (message)"; status=1
+               echo_i "failed (message)"; status=1
        fi
 fi
 
 #
-echo "I: checking that we detect a NS which has no records"
+echo_i "checking that we detect a NS which has no records"
 if $CHECKZONE . nxdomain.db > nxdomain.out
 then
-       echo "I:failed (status)"; status=1
+       echo_i "failed (status)"; status=1
 else
        if grep "has no address records" noaddress.out > /dev/null
        then
                :
        else
-               echo "I:failed (message)"; status=1
+               echo_i "failed (message)"; status=1
        fi
 fi
 
 #
-echo "I: checking that we detect a NS which looks like a A record (fail)"
+echo_i "checking that we detect a NS which looks like a A record (fail)"
 if $CHECKZONE -n fail . a.db > a.out 2>&1
 then
-       echo "I:failed (status)"; status=1
+       echo_i "failed (status)"; status=1
 else
        if grep "appears to be an address" a.out > /dev/null
        then
                :
        else
-               echo "I:failed (message)"; status=1
+               echo_i "failed (message)"; status=1
        fi
 fi
 
 #
-echo "I: checking that we detect a NS which looks like a A record (warn=default)"
+echo_i "checking that we detect a NS which looks like a A record (warn=default)"
 if $CHECKZONE . a.db > a.out 2>&1
 then
        if grep "appears to be an address" a.out > /dev/null
        then
                :
        else
-               echo "I:failed (message)"; status=1
+               echo_i "failed (message)"; status=1
        fi
 else
-       echo "I:failed (status)"; status=1
+       echo_i "failed (status)"; status=1
 fi
 
 #
-echo "I: checking that we detect a NS which looks like a A record (ignore)"
+echo_i "checking that we detect a NS which looks like a A record (ignore)"
 if $CHECKZONE -n ignore . a.db > a.out 2>&1
 then
        if grep "appears to be an address" a.out > /dev/null
        then
-               echo "I:failed (message)"; status=1
+               echo_i "failed (message)"; status=1
        else
                :
        fi
 else
-       echo "I:failed (status)"; status=1
+       echo_i "failed (status)"; status=1
 fi
 
 #
-echo "I: checking that we detect a NS which looks like a AAAA record (fail)"
+echo_i "checking that we detect a NS which looks like a AAAA record (fail)"
 if $CHECKZONE -n fail . aaaa.db > aaaa.out 2>&1
 then
-       echo "I:failed (status)"; status=1
+       echo_i "failed (status)"; status=1
 else
        if grep "appears to be an address" aaaa.out > /dev/null
        then
                :
        else
-               echo "I:failed (message)"; status=1
+               echo_i "failed (message)"; status=1
        fi
 fi
 
 #
-echo "I: checking that we detect a NS which looks like a AAAA record (warn=default)"
+echo_i "checking that we detect a NS which looks like a AAAA record (warn=default)"
 if $CHECKZONE . aaaa.db > aaaa.out 2>&1
 then
        if grep "appears to be an address" aaaa.out > /dev/null
        then
                :
        else
-               echo "I:failed (message)"; status=1
+               echo_i "failed (message)"; status=1
        fi
 else
-       echo "I:failed (status)"; status=1
+       echo_i "failed (status)"; status=1
 fi
 
 #
-echo "I: checking that we detect a NS which looks like a AAAA record (ignore)"
+echo_i "checking that we detect a NS which looks like a AAAA record (ignore)"
 if $CHECKZONE -n ignore . aaaa.db > aaaa.out 2>&1
 then
        if grep "appears to be an address" aaaa.out > /dev/null
        then
-               echo "I:failed (message)"; status=1
+               echo_i "failed (message)"; status=1
        else
                :
        fi
 else
-       echo "I:failed (status)"; status=1
+       echo_i "failed (status)"; status=1
 fi
 
-echo "I: checking 'rdnc zonestatus' with duplicated zone name"
+echo_i "checking 'rdnc zonestatus' with duplicated zone name"
 ret=0 
-$RNDC -c ../common/rndc.conf -s 10.53.0.1 -p 9953 reload duplicate.example > rndc.out.duplicate 2>&1
+$RNDCCMD 10.53.0.1 reload duplicate.example > rndc.out.duplicate 2>&1
 grep "zone 'duplicate.example' was found in multiple views" rndc.out.duplicate > /dev/null || ret=1
-if [ $ret != 0 ]; then echo "I:failed"; fi
+if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
-echo "I:exit status: $status"
+echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1
index 20a22595f36119b6cc02ca1c404978126eb722e1..8d10f310e740ff5c43ea4c5ef939ebe48b4a461a 100755 (executable)
--- a/configure
+++ b/configure
@@ -659,6 +659,7 @@ DLZ_DRIVER_SRCS
 DLZ_DRIVER_LIBS
 DLZ_DRIVER_INCLUDES
 CONTRIB_DLZ
+MYSQL_CONFIG
 PG_CONFIG
 SO_TARGETS
 SO_LD
@@ -940,6 +941,7 @@ infodir
 docdir
 oldincludedir
 includedir
+runstatedir
 localstatedir
 sharedstatedir
 sysconfdir
@@ -1088,6 +1090,7 @@ datadir='${datarootdir}'
 sysconfdir='${prefix}/etc'
 sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1340,6 +1343,15 @@ do
   | -silent | --silent | --silen | --sile | --sil)
     silent=yes ;;
 
+  -runstatedir | --runstatedir | --runstatedi | --runstated \
+  | --runstate | --runstat | --runsta | --runst | --runs \
+  | --run | --ru | --r)
+    ac_prev=runstatedir ;;
+  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+  | --run=* | --ru=* | --r=*)
+    runstatedir=$ac_optarg ;;
+
   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
     ac_prev=sbindir ;;
   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1477,7 +1489,7 @@ fi
 for ac_var in  exec_prefix prefix bindir sbindir libexecdir datarootdir \
                datadir sysconfdir sharedstatedir localstatedir includedir \
                oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
-               libdir localedir mandir
+               libdir localedir mandir runstatedir
 do
   eval ac_val=\$$ac_var
   # Remove trailing slashes.
@@ -1630,6 +1642,7 @@ Fine tuning of the installation directories:
   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
   --libdir=DIR            object code libraries [EPREFIX/lib]
   --includedir=DIR        C header files [PREFIX/include]
   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
@@ -20856,55 +20869,82 @@ mysql_include=""
 mysql_lib=""
 if test "$use_dlz_mysql" = "yes"
 then
-       # User did not specify a path - guess it
-       mysqldirs="/usr /usr/local /usr/local/mysql /usr/pkg"
-       for d in $mysqldirs
-       do
-               if test -f $d/include/mysql/mysql.h
-               then
-                       use_dlz_mysql=$d
-                       mysql_include=$d/include/mysql
-                       if test -d $d/lib/mysql
+       for ac_prog in mysql_config
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_MYSQL_CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$MYSQL_CONFIG"; then
+  ac_cv_prog_MYSQL_CONFIG="$MYSQL_CONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_MYSQL_CONFIG="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+MYSQL_CONFIG=$ac_cv_prog_MYSQL_CONFIG
+if test -n "$MYSQL_CONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MYSQL_CONFIG" >&5
+$as_echo "$MYSQL_CONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$MYSQL_CONFIG" && break
+done
+
+       if test -n "$MYSQL_CONFIG"
+       then
+               mysql_include=`${MYSQL_CONFIG} --include`
+               mysql_lib=`${MYSQL_CONFIG} --libs`
+               use_dlz_mysql="config"
+
+       else
+               # User did not specify a path - guess it
+               mysqldirs="/usr /usr/local /usr/local/mysql /usr/pkg"
+               for d in $mysqldirs
+               do
+                       if test -f $d/include/mysql/mysql.h
                        then
-                               mysql_lib=$d/lib/mysql
-                       else
-                               mysql_lib=$d/lib
-                       fi
-                       break
-               elif test -f $d/include/mysql.h
-               then
-                       use_dlz_mysql=$d
-                       mysql_include=$d/include
-                       if test -d $d/lib/mysql
+                               use_dlz_mysql=$d
+                               mysql_include=$d/include/mysql
+                               break
+                       elif test -f $d/include/mysql.h
                        then
-                               mysql_lib=$d/lib/mysql
-                       else
-                               mysql_lib=$d/lib
+                               use_dlz_mysql=$d
+                               mysql_include=$d/include
+                               break
                        fi
                        break
-               fi
-       done
+               done
+       fi
 elif test "$use_dlz_mysql" != "no"
 then
        d=$use_dlz_mysql
        if test -f $d/include/mysql/mysql.h
        then
                mysql_include=$d/include/mysql
-               if test -d $d/lib/mysql
-               then
-                       mysql_lib=$d/lib/mysql
-               else
-                       mysql_lib=$d/lib
-               fi
        elif test -f $d/include/mysql.h
        then
                mysql_include=$d/include
-               if test -d $d/lib/mysql
-               then
-                       mysql_lib=$d/lib/mysql
-               else
-                       mysql_lib=$d/lib
-               fi
        fi
 fi
 
@@ -20921,6 +20961,12 @@ case "$use_dlz_mysql" in
 $as_echo "no" >&6; }
                ;;
        *)
+               if test -d "$use_dlz_mysql/lib/mysql"
+               then
+                       mysql_lib="$use_dlz_mysql/lib/mysql"
+               else
+                       mysql_lib="$use_dlz_mysql/lib"
+               fi
 
        CONTRIB_DLZ="$CONTRIB_DLZ -DDLZ_MYSQL"
        for i in dlz_mysql_driver
@@ -21578,7 +21624,7 @@ ac_config_commands="$ac_config_commands chmod"
 # elsewhere if there's a good reason for doing so.
 #
 
-ac_config_files="$ac_config_files make/Makefile make/mkdep Makefile bin/Makefile bin/check/Makefile bin/confgen/Makefile bin/confgen/unix/Makefile bin/dig/Makefile bin/dnssec/Makefile bin/named/Makefile bin/named/unix/Makefile bin/nsupdate/Makefile bin/pkcs11/Makefile bin/python/Makefile bin/python/isc/Makefile bin/python/isc/utils.py bin/python/isc/tests/Makefile bin/python/dnssec-checkds.py bin/python/dnssec-coverage.py bin/python/isc/__init__.py bin/python/isc/checkds.py bin/python/isc/coverage.py bin/python/isc/dnskey.py bin/python/isc/eventlist.py bin/python/isc/keydict.py bin/python/isc/keyevent.py bin/python/isc/keyzone.py bin/python/isc/tests/dnskey_test.py bin/rndc/Makefile bin/tests/Makefile bin/tests/atomic/Makefile bin/tests/db/Makefile bin/tests/dst/Makefile bin/tests/dst/Kdh.+002+18602.key bin/tests/dst/Kdh.+002+18602.private bin/tests/dst/Kdh.+002+48957.key bin/tests/dst/Kdh.+002+48957.private bin/tests/dst/Ktest.+001+00002.key bin/tests/dst/Ktest.+001+54622.key bin/tests/dst/Ktest.+001+54622.private bin/tests/dst/Ktest.+003+23616.key bin/tests/dst/Ktest.+003+23616.private bin/tests/dst/Ktest.+003+49667.key bin/tests/dst/dst_2_data bin/tests/dst/t2_data_1 bin/tests/dst/t2_data_2 bin/tests/dst/t2_dsasig bin/tests/dst/t2_rsasig bin/tests/hashes/Makefile bin/tests/headerdep_test.sh bin/tests/master/Makefile bin/tests/mem/Makefile bin/tests/names/Makefile bin/tests/net/Makefile bin/tests/rbt/Makefile bin/tests/resolver/Makefile bin/tests/sockaddr/Makefile bin/tests/system/Makefile bin/tests/system/conf.sh bin/tests/system/dlz/prereq.sh bin/tests/system/dlzexternal/Makefile bin/tests/system/dlzexternal/ns1/named.conf bin/tests/system/inline/checkdsa.sh bin/tests/system/lwresd/Makefile bin/tests/system/rsabigexponent/Makefile bin/tests/system/tkey/Makefile bin/tests/tasks/Makefile bin/tests/timers/Makefile bin/tests/virtual-time/Makefile bin/tests/virtual-time/conf.sh bin/tools/Makefile contrib/check-secure-delegation.pl contrib/zone-edit.sh doc/Makefile doc/arm/Makefile doc/arm/noteversion.xml doc/arm/pkgversion.xml doc/arm/releaseinfo.xml doc/doxygen/Doxyfile doc/doxygen/Makefile doc/doxygen/doxygen-input-filter doc/misc/Makefile doc/tex/Makefile doc/tex/armstyle.sty doc/xsl/Makefile doc/xsl/isc-docbook-chunk.xsl doc/xsl/isc-docbook-html.xsl doc/xsl/isc-manpage.xsl doc/xsl/isc-notes-html.xsl isc-config.sh lib/Makefile lib/bind9/Makefile lib/bind9/include/Makefile lib/bind9/include/bind9/Makefile lib/dns/Makefile lib/dns/include/Makefile lib/dns/include/dns/Makefile lib/dns/include/dst/Makefile lib/dns/tests/Makefile lib/export/Makefile lib/export/dns/Makefile lib/export/dns/include/Makefile lib/export/dns/include/dns/Makefile lib/export/dns/include/dst/Makefile lib/export/irs/Makefile lib/export/irs/include/Makefile lib/export/irs/include/irs/Makefile lib/export/isc/$thread_dir/Makefile lib/export/isc/$thread_dir/include/Makefile lib/export/isc/$thread_dir/include/isc/Makefile lib/export/isc/Makefile lib/export/isc/include/Makefile lib/export/isc/include/isc/Makefile lib/export/isc/nls/Makefile lib/export/isc/unix/Makefile lib/export/isc/unix/include/Makefile lib/export/isc/unix/include/isc/Makefile lib/export/isccfg/Makefile lib/export/isccfg/include/Makefile lib/export/isccfg/include/isccfg/Makefile lib/export/samples/Makefile lib/export/samples/Makefile-postinstall lib/irs/Makefile lib/irs/include/Makefile lib/irs/include/irs/Makefile lib/irs/include/irs/netdb.h lib/irs/include/irs/platform.h lib/irs/tests/Makefile lib/isc/$arch/Makefile lib/isc/$arch/include/Makefile lib/isc/$arch/include/isc/Makefile lib/isc/$thread_dir/Makefile lib/isc/$thread_dir/include/Makefile lib/isc/$thread_dir/include/isc/Makefile lib/isc/Makefile lib/isc/include/Makefile lib/isc/include/isc/Makefile lib/isc/include/isc/platform.h lib/isc/tests/Makefile lib/isc/nls/Makefile lib/isc/unix/Makefile lib/isc/unix/include/Makefile lib/isc/unix/include/isc/Makefile lib/isccc/Makefile lib/isccc/include/Makefile lib/isccc/include/isccc/Makefile lib/isccfg/Makefile lib/isccfg/include/Makefile lib/isccfg/include/isccfg/Makefile lib/lwres/Makefile lib/lwres/include/Makefile lib/lwres/include/lwres/Makefile lib/lwres/include/lwres/netdb.h lib/lwres/include/lwres/platform.h lib/lwres/man/Makefile lib/lwres/tests/Makefile lib/lwres/unix/Makefile lib/lwres/unix/include/Makefile lib/lwres/unix/include/lwres/Makefile lib/tests/Makefile lib/tests/include/Makefile lib/tests/include/tests/Makefile unit/Makefile unit/unittest.sh"
+ac_config_files="$ac_config_files make/Makefile make/mkdep Makefile bin/Makefile bin/check/Makefile bin/confgen/Makefile bin/confgen/unix/Makefile bin/dig/Makefile bin/dnssec/Makefile bin/named/Makefile bin/named/unix/Makefile bin/nsupdate/Makefile bin/pkcs11/Makefile bin/python/Makefile bin/python/isc/Makefile bin/python/isc/utils.py bin/python/isc/tests/Makefile bin/python/dnssec-checkds.py bin/python/dnssec-coverage.py bin/python/isc/__init__.py bin/python/isc/checkds.py bin/python/isc/coverage.py bin/python/isc/dnskey.py bin/python/isc/eventlist.py bin/python/isc/keydict.py bin/python/isc/keyevent.py bin/python/isc/keyzone.py bin/python/isc/tests/dnskey_test.py bin/rndc/Makefile bin/tests/Makefile bin/tests/atomic/Makefile bin/tests/db/Makefile bin/tests/dst/Makefile bin/tests/dst/Kdh.+002+18602.key bin/tests/dst/Kdh.+002+18602.private bin/tests/dst/Kdh.+002+48957.key bin/tests/dst/Kdh.+002+48957.private bin/tests/dst/Ktest.+001+00002.key bin/tests/dst/Ktest.+001+54622.key bin/tests/dst/Ktest.+001+54622.private bin/tests/dst/Ktest.+003+23616.key bin/tests/dst/Ktest.+003+23616.private bin/tests/dst/Ktest.+003+49667.key bin/tests/dst/dst_2_data bin/tests/dst/t2_data_1 bin/tests/dst/t2_data_2 bin/tests/dst/t2_dsasig bin/tests/dst/t2_rsasig bin/tests/hashes/Makefile bin/tests/headerdep_test.sh bin/tests/master/Makefile bin/tests/mem/Makefile bin/tests/names/Makefile bin/tests/net/Makefile bin/tests/rbt/Makefile bin/tests/resolver/Makefile bin/tests/sockaddr/Makefile bin/tests/system/Makefile bin/tests/system/conf.sh bin/tests/system/dlz/prereq.sh bin/tests/system/dlzexternal/Makefile bin/tests/system/dlzexternal/ns1/dlzs.conf bin/tests/system/inline/checkdsa.sh bin/tests/system/lwresd/Makefile bin/tests/system/rsabigexponent/Makefile bin/tests/system/tkey/Makefile bin/tests/tasks/Makefile bin/tests/timers/Makefile bin/tests/virtual-time/Makefile bin/tests/virtual-time/conf.sh bin/tools/Makefile contrib/check-secure-delegation.pl contrib/zone-edit.sh doc/Makefile doc/arm/Makefile doc/arm/noteversion.xml doc/arm/pkgversion.xml doc/arm/releaseinfo.xml doc/doxygen/Doxyfile doc/doxygen/Makefile doc/doxygen/doxygen-input-filter doc/misc/Makefile doc/tex/Makefile doc/tex/armstyle.sty doc/xsl/Makefile doc/xsl/isc-docbook-chunk.xsl doc/xsl/isc-docbook-html.xsl doc/xsl/isc-manpage.xsl doc/xsl/isc-notes-html.xsl isc-config.sh lib/Makefile lib/bind9/Makefile lib/bind9/include/Makefile lib/bind9/include/bind9/Makefile lib/dns/Makefile lib/dns/include/Makefile lib/dns/include/dns/Makefile lib/dns/include/dst/Makefile lib/dns/tests/Makefile lib/export/Makefile lib/export/dns/Makefile lib/export/dns/include/Makefile lib/export/dns/include/dns/Makefile lib/export/dns/include/dst/Makefile lib/export/irs/Makefile lib/export/irs/include/Makefile lib/export/irs/include/irs/Makefile lib/export/isc/$thread_dir/Makefile lib/export/isc/$thread_dir/include/Makefile lib/export/isc/$thread_dir/include/isc/Makefile lib/export/isc/Makefile lib/export/isc/include/Makefile lib/export/isc/include/isc/Makefile lib/export/isc/nls/Makefile lib/export/isc/unix/Makefile lib/export/isc/unix/include/Makefile lib/export/isc/unix/include/isc/Makefile lib/export/isccfg/Makefile lib/export/isccfg/include/Makefile lib/export/isccfg/include/isccfg/Makefile lib/export/samples/Makefile lib/export/samples/Makefile-postinstall lib/irs/Makefile lib/irs/include/Makefile lib/irs/include/irs/Makefile lib/irs/include/irs/netdb.h lib/irs/include/irs/platform.h lib/irs/tests/Makefile lib/isc/$arch/Makefile lib/isc/$arch/include/Makefile lib/isc/$arch/include/isc/Makefile lib/isc/$thread_dir/Makefile lib/isc/$thread_dir/include/Makefile lib/isc/$thread_dir/include/isc/Makefile lib/isc/Makefile lib/isc/include/Makefile lib/isc/include/isc/Makefile lib/isc/include/isc/platform.h lib/isc/tests/Makefile lib/isc/nls/Makefile lib/isc/unix/Makefile lib/isc/unix/include/Makefile lib/isc/unix/include/isc/Makefile lib/isccc/Makefile lib/isccc/include/Makefile lib/isccc/include/isccc/Makefile lib/isccfg/Makefile lib/isccfg/include/Makefile lib/isccfg/include/isccfg/Makefile lib/lwres/Makefile lib/lwres/include/Makefile lib/lwres/include/lwres/Makefile lib/lwres/include/lwres/netdb.h lib/lwres/include/lwres/platform.h lib/lwres/man/Makefile lib/lwres/tests/Makefile lib/lwres/unix/Makefile lib/lwres/unix/include/Makefile lib/lwres/unix/include/lwres/Makefile lib/tests/Makefile lib/tests/include/Makefile lib/tests/include/tests/Makefile unit/Makefile unit/unittest.sh"
 
 
 #
@@ -22633,7 +22679,7 @@ do
     "bin/tests/system/conf.sh") CONFIG_FILES="$CONFIG_FILES bin/tests/system/conf.sh" ;;
     "bin/tests/system/dlz/prereq.sh") CONFIG_FILES="$CONFIG_FILES bin/tests/system/dlz/prereq.sh" ;;
     "bin/tests/system/dlzexternal/Makefile") CONFIG_FILES="$CONFIG_FILES bin/tests/system/dlzexternal/Makefile" ;;
-    "bin/tests/system/dlzexternal/ns1/named.conf") CONFIG_FILES="$CONFIG_FILES bin/tests/system/dlzexternal/ns1/named.conf" ;;
+    "bin/tests/system/dlzexternal/ns1/dlzs.conf") CONFIG_FILES="$CONFIG_FILES bin/tests/system/dlzexternal/ns1/dlzs.conf" ;;
     "bin/tests/system/inline/checkdsa.sh") CONFIG_FILES="$CONFIG_FILES bin/tests/system/inline/checkdsa.sh" ;;
     "bin/tests/system/lwresd/Makefile") CONFIG_FILES="$CONFIG_FILES bin/tests/system/lwresd/Makefile" ;;
     "bin/tests/system/rsabigexponent/Makefile") CONFIG_FILES="$CONFIG_FILES bin/tests/system/rsabigexponent/Makefile" ;;
index 86cb1eb03a3d1ed12ef2dabe45e38223f455a817..0033f0d70e6df7bacd20d40a4468957fe640f50a 100644 (file)
@@ -4361,7 +4361,7 @@ AC_CONFIG_FILES([
        bin/tests/system/conf.sh
        bin/tests/system/dlz/prereq.sh
        bin/tests/system/dlzexternal/Makefile
-       bin/tests/system/dlzexternal/ns1/named.conf
+       bin/tests/system/dlzexternal/ns1/dlzs.conf
        bin/tests/system/inline/checkdsa.sh
        bin/tests/system/lwresd/Makefile
        bin/tests/system/rsabigexponent/Makefile
index 2b1295a27a1057e355b16db43855e26b1260eaa2..920bfd230590ed07e824681be60090e7828a3193 100644 (file)
@@ -158,8 +158,8 @@ then
                                break
                        fi
                        break
-               fi
-       done
+               done
+       fi
 elif test "$use_dlz_mysql" != "no"
 then
        d=$use_dlz_mysql