diff --git a/bin/tests/system/addzone/tests.sh b/bin/tests/system/addzone/tests.sh index 334d0200c3..5350ccf81a 100755 --- a/bin/tests/system/addzone/tests.sh +++ b/bin/tests/system/addzone/tests.sh @@ -467,7 +467,7 @@ if [ $ret != 0 ]; then echo_i "failed"; fi status=`expr $status + $ret` echo_i "reconfiguring server with multiple views" -rm -f ns2/named.conf +rm -f ns2/named.conf copy_setports ns2/named2.conf.in ns2/named.conf $RNDCCMD 10.53.0.2 reconfig 2>&1 | sed 's/^/I:ns2 /' sleep 5 @@ -696,7 +696,7 @@ ret=0 $RNDCCMD 10.53.0.3 addzone "test4.baz" '{ type master; file "e.db"; };' > /dev/null 2>&1 || ret=1 $RNDCCMD 10.53.0.3 addzone "test5.baz" '{ type master; file "e.db"; };' > /dev/null 2>&1 || ret=1 $PERL $SYSTEMTESTTOP/stop.pl . ns3 -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . ns3 || ret=1 +$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} addzone ns3 || ret=1 $DIG $DIGOPTS @10.53.0.3 version.bind txt ch > dig.out.test$n || ret=1 grep "status: NOERROR" dig.out.test$n > /dev/null || ret=1 n=`expr $n + 1` diff --git a/bin/tests/system/dnssec/tests.sh b/bin/tests/system/dnssec/tests.sh index 6e2369f696..6fcc264ed3 100644 --- a/bin/tests/system/dnssec/tests.sh +++ b/bin/tests/system/dnssec/tests.sh @@ -1989,7 +1989,7 @@ echo_i "waiting till 14s have passed since NTAs were added before restarting ns4 $PERL -e 'my $delay = '$start' + 14 - time(); select(undef, undef, undef, $delay) if ($delay > 0);' if - $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . ns4 + $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} dnssec ns4 then echo_i "restarted server ns4" else @@ -2057,7 +2057,7 @@ echo "secure.example. regular $future" > ns4/_default.nta start=`$PERL -e 'print time()."\n";'` if - $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . ns4 + $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} dnssec ns4 then echo_i "restarted server ns4" else @@ -2114,7 +2114,7 @@ echo "secure.example. forced $future" > ns4/_default.nta start=`$PERL -e 'print time()."\n";'` if - $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . ns4 + $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} dnssec ns4 then echo_i "restarted server ns4" else @@ -2163,7 +2163,7 @@ echo "secure.example. forced $future" > ns4/_default.nta added=`$PERL -e 'print time()."\n";'` if - $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . ns4 + $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} dnssec ns4 then echo_i "restarted server ns4" else diff --git a/bin/tests/system/forward/tests.sh b/bin/tests/system/forward/tests.sh index f23cde1751..abb3fd5628 100644 --- a/bin/tests/system/forward/tests.sh +++ b/bin/tests/system/forward/tests.sh @@ -91,7 +91,7 @@ grep "status: NXDOMAIN" dig.out.f2 > /dev/null || ret=1 $PERL ../stop.pl . ns4 || 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 --port ${PORT} . ns4 || ret=1 +$PERL ../start.pl --restart --noclean --port ${PORT} forward ns4 || ret=1 if [ $ret != 0 ]; then echo_i "failed"; fi status=`expr $status + $ret` diff --git a/bin/tests/system/inline/tests.sh b/bin/tests/system/inline/tests.sh index 1c27043608..bba37e0442 100755 --- a/bin/tests/system/inline/tests.sh +++ b/bin/tests/system/inline/tests.sh @@ -438,7 +438,7 @@ EOF [ -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 +do ans=0 $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 @@ -462,7 +462,7 @@ status=`expr $status + $ret` n=`expr $n + 1` echo_i "restart bump in the wire signer server ($n)" ret=0 -$PERL ../start.pl --noclean --restart --port ${PORT} . ns3 || ret=1 +$PERL ../start.pl --noclean --restart --port ${PORT} inline ns3 || ret=1 if [ $ret != 0 ]; then echo_i "failed"; fi status=`expr $status + $ret` @@ -880,7 +880,7 @@ rm ns3/master.db.jnl n=`expr $n + 1` echo_i "restart bump in the wire signer server ($n)" ret=0 -$PERL ../start.pl --noclean --restart --port ${PORT} . ns3 || ret=1 +$PERL ../start.pl --noclean --restart --port ${PORT} inline ns3 || ret=1 if [ $ret != 0 ]; then echo_i "failed"; fi status=`expr $status + $ret` @@ -1325,7 +1325,7 @@ if [ $ans != 0 ]; then ret=1; fi # flushed upon shutdown since we specifically want to avoid it. $PERL $SYSTEMTESTTOP/stop.pl --use-rndc --halt --port ${CONTROLPORT} . ns3 ensure_sigs_only_in_journal delayedkeys ns3/delayedkeys.db.signed -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . ns3 +$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} inline ns3 # At this point, the raw zone journal will not have a source serial set. Upon # server startup, receive_secure_serial() will rectify that, update SOA, resign # it, and schedule its future resign. This will cause "rndc zonestatus" to @@ -1334,7 +1334,7 @@ $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . ns3 # receive_secure_serial() should refrain from introducing any zone changes. $PERL $SYSTEMTESTTOP/stop.pl --use-rndc --halt --port ${CONTROLPORT} . ns3 ensure_sigs_only_in_journal delayedkeys ns3/delayedkeys.db.signed -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . ns3 +$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} inline ns3 # We can now test whether the secure zone journal was correctly processed: # unless the records contained in it were scheduled for resigning, no resigning # event will be scheduled at all since the secure zone master file contains no diff --git a/bin/tests/system/legacy/tests.sh b/bin/tests/system/legacy/tests.sh index 1f860bcd29..b5cde50596 100755 --- a/bin/tests/system/legacy/tests.sh +++ b/bin/tests/system/legacy/tests.sh @@ -200,7 +200,7 @@ $PERL $SYSTEMTESTTOP/stop.pl . ns1 copy_setports ns1/named2.conf.in ns1/named.conf -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . ns1 +$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} legacy ns1 n=`expr $n + 1` echo_i "checking recursive lookup to edns 512 + no tcp + trust anchor fails ($n)" diff --git a/bin/tests/system/masterformat/tests.sh b/bin/tests/system/masterformat/tests.sh index 14d90d5517..6443a89aa9 100755 --- a/bin/tests/system/masterformat/tests.sh +++ b/bin/tests/system/masterformat/tests.sh @@ -42,7 +42,7 @@ rawversion () { read(STDIN, $input, 8); if (length($input) < 8) { print "not raw\n"; exit 0; }; ($style, $version) = unpack("NN", $input); - print ($style == 2 || $style == 3 ? "$version\n" : + print ($style == 2 || $style == 3 ? "$version\n" : "not raw or map\n");' < $1 } @@ -50,7 +50,7 @@ sourceserial () { $PERL -e 'binmode STDIN; read(STDIN, $input, 20); if (length($input) < 20) { print "UNSET\n"; exit; }; - ($format, $version, $dumptime, $flags, $sourceserial) = + ($format, $version, $dumptime, $flags, $sourceserial) = unpack("NNNNN", $input); if ($format != 2 || $version < 1) { print "UNSET\n"; exit; }; if ($flags & 02) { @@ -72,7 +72,7 @@ stomp () { restart () { sleep 1 - (cd ..; $PERL start.pl --noclean --restart --port ${PORT} masterformat ns3) + $PERL "$SYSTEMTESTTOP/start.pl" --noclean --restart --port ${PORT} masterformat ns3 } DIGOPTS="+tcp +noauth +noadd +nosea +nostat +noquest +nocomm +nocmd -p ${PORT}" diff --git a/bin/tests/system/mirror/tests.sh b/bin/tests/system/mirror/tests.sh index 8411857d0d..324cca0586 100644 --- a/bin/tests/system/mirror/tests.sh +++ b/bin/tests/system/mirror/tests.sh @@ -168,7 +168,7 @@ ret=0 $PERL $SYSTEMTESTTOP/stop.pl --use-rndc --port ${CONTROLPORT} . ns3 cat ns2/verify-load.db.good.signed > ns3/verify-load.db.mirror nextpart ns3/named.run > /dev/null -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . ns3 +$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} mirror ns3 wait_for_load verify-load ${UPDATED_SERIAL_GOOD} ns3/named.run $DIG $DIGOPTS @10.53.0.3 +norec verify-load SOA > dig.out.ns3.test$n 2>&1 || ret=1 grep "${UPDATED_SERIAL_GOOD}.*; serial" dig.out.ns3.test$n > /dev/null || ret=1 @@ -182,7 +182,7 @@ $PERL $SYSTEMTESTTOP/stop.pl --use-rndc --port ${CONTROLPORT} . ns3 cp ns3/verify-journal.db.mirror ns3/verify-ixfr.db.mirror cp ns3/verify-journal.db.bad.mirror.jnl ns3/verify-ixfr.db.mirror.jnl nextpart ns3/named.run > /dev/null -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . ns3 +$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} mirror ns3 wait_for_load verify-ixfr ${UPDATED_SERIAL_BAD} ns3/named.run $DIG $DIGOPTS @10.53.0.3 +norec verify-ixfr SOA > dig.out.ns3.test$n 2>&1 || ret=1 grep "${UPDATED_SERIAL_BAD}.*; serial" dig.out.ns3.test$n > /dev/null && ret=1 @@ -197,7 +197,7 @@ $PERL $SYSTEMTESTTOP/stop.pl --use-rndc --port ${CONTROLPORT} . ns3 cp ns3/verify-journal.db.mirror ns3/verify-ixfr.db.mirror cp ns3/verify-journal.db.good.mirror.jnl ns3/verify-ixfr.db.mirror.jnl nextpart ns3/named.run > /dev/null -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . ns3 +$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} mirror ns3 wait_for_load verify-ixfr ${UPDATED_SERIAL_GOOD} ns3/named.run $DIG $DIGOPTS @10.53.0.3 +norec verify-ixfr SOA > dig.out.ns3.test$n 2>&1 || ret=1 grep "${UPDATED_SERIAL_GOOD}.*; serial" dig.out.ns3.test$n > /dev/null || ret=1 @@ -332,7 +332,7 @@ $RNDCCMD 10.53.0.2 reconfig > /dev/null 2>&1 $PERL $SYSTEMTESTTOP/stop.pl --use-rndc --port ${CONTROLPORT} . ns3 touch -t 200001010000 ns3/initially-unavailable.db.mirror nextpart ns3/named.run > /dev/null -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . ns3 +$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} mirror ns3 # Ensure named attempts to retransfer the zone due to its expiry. wait_for_transfer initially-unavailable nextpart ns3/named.run | grep "initially-unavailable.*expired" > /dev/null || ret=1 diff --git a/bin/tests/system/mkeys/tests.sh b/bin/tests/system/mkeys/tests.sh index 4709e19a16..080879af4c 100644 --- a/bin/tests/system/mkeys/tests.sh +++ b/bin/tests/system/mkeys/tests.sh @@ -137,13 +137,13 @@ mkeys_loadkeys_on 1 mkeys_refresh_on 2 mkeys_status_on 2 > rndc.out.$n 2>&1 # there should be two keys listed now -count=`grep -c "keyid: " rndc.out.$n` +count=`grep -c "keyid: " rndc.out.$n` [ "$count" -eq 2 ] || ret=1 # two lines indicating trust status -count=`grep -c "trust" rndc.out.$n` +count=`grep -c "trust" rndc.out.$n` [ "$count" -eq 2 ] || ret=1 # one indicates current trust -count=`grep -c "trusted since" rndc.out.$n` +count=`grep -c "trusted since" rndc.out.$n` [ "$count" -eq 1 ] || ret=1 # one indicates pending trust count=`grep -c "trust pending" rndc.out.$n` @@ -157,10 +157,10 @@ ret=0 mkeys_refresh_on 3 mkeys_status_on 3 > rndc.out.$n 2>&1 # there should be one key listed now -count=`grep -c "keyid: " rndc.out.$n` +count=`grep -c "keyid: " rndc.out.$n` [ "$count" -eq 1 ] || ret=1 # one line indicating trust status -count=`grep -c "trust" rndc.out.$n` +count=`grep -c "trust" rndc.out.$n` [ "$count" -eq 1 ] || ret=1 # ... and the key is not trusted count=`grep -c "no trust" rndc.out.$n` @@ -205,10 +205,10 @@ mkeys_refresh_on 2 mkeys_sync_on 2 mkeys_status_on 2 > rndc.out.$n 2>&1 # two keys listed -count=`grep -c "keyid: " rndc.out.$n` +count=`grep -c "keyid: " rndc.out.$n` [ "$count" -eq 2 ] || ret=1 # two lines indicating trust status -count=`grep -c "trust" rndc.out.$n` +count=`grep -c "trust" rndc.out.$n` [ "$count" -eq 2 ] || ret=1 # trust is revoked count=`grep -c "trust revoked" rndc.out.$n` @@ -239,10 +239,10 @@ mkeys_refresh_on 2 mkeys_sync_on 2 mkeys_status_on 2 > rndc.out.$n 2>&1 # two keys listed -count=`grep -c "keyid: " rndc.out.$n` +count=`grep -c "keyid: " rndc.out.$n` [ "$count" -eq 2 ] || ret=1 # two lines indicating trust status -count=`grep -c "trust" rndc.out.$n` +count=`grep -c "trust" rndc.out.$n` [ "$count" -eq 2 ] || ret=1 # trust is revoked count=`grep -c "trust revoked" rndc.out.$n` @@ -277,10 +277,10 @@ mkeys_refresh_on 2 mkeys_sync_on 2 mkeys_status_on 2 > rndc.out.$n 2>&1 # two keys listed -count=`grep -c "keyid: " rndc.out.$n` +count=`grep -c "keyid: " rndc.out.$n` [ "$count" -eq 2 ] || ret=1 # two lines indicating trust status -count=`grep -c "trust" rndc.out.$n` +count=`grep -c "trust" rndc.out.$n` [ "$count" -eq 2 ] || ret=1 # trust is revoked count=`grep -c "trust revoked" rndc.out.$n` @@ -303,7 +303,7 @@ $PERL $SYSTEMTESTTOP/stop.pl --use-rndc --port ${CONTROLPORT} . ns2 rm -f ns2/managed-keys.bind* keyfile_to_managed_keys ns1/$original ns1/$standby1 > ns2/managed.conf nextpart ns2/named.run > /dev/null -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . ns2 +$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} mkeys ns2 n=`expr $n + 1` echo_i "check that no key from bind.keys is marked as an initializing key ($n)" @@ -319,7 +319,7 @@ $PERL $SYSTEMTESTTOP/stop.pl --use-rndc --port ${CONTROLPORT} . ns2 rm -f ns2/managed-keys.bind* mv ns2/managed1.conf ns2/managed.conf nextpart ns2/named.run > /dev/null -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . ns2 +$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} mkeys ns2 n=`expr $n + 1` echo_i "check that standby key is now trusted ($n)" @@ -327,13 +327,13 @@ ret=0 wait_for_log "Returned from key fetch in keyfetch_done()" ns2/named.run mkeys_status_on 2 > rndc.out.$n 2>&1 # two keys listed -count=`grep -c "keyid: " rndc.out.$n` +count=`grep -c "keyid: " rndc.out.$n` [ "$count" -eq 2 ] || ret=1 # two lines indicating trust status -count=`grep -c "trust" rndc.out.$n` +count=`grep -c "trust" rndc.out.$n` [ "$count" -eq 2 ] || ret=1 # both indicate current trust -count=`grep -c "trusted since" rndc.out.$n` +count=`grep -c "trusted since" rndc.out.$n` [ "$count" -eq 2 ] || ret=1 if [ $ret != 0 ]; then echo_i "failed"; fi status=`expr $status + $ret` @@ -347,22 +347,22 @@ mkeys_loadkeys_on 1 mkeys_refresh_on 2 mkeys_status_on 2 > rndc.out.$n 2>&1 # three keys listed -count=`grep -c "keyid: " rndc.out.$n` +count=`grep -c "keyid: " rndc.out.$n` [ "$count" -eq 3 ] || ret=1 # one is revoked -count=`grep -c "REVOKE" rndc.out.$n` +count=`grep -c "REVOKE" rndc.out.$n` [ "$count" -eq 1 ] || ret=1 # three lines indicating trust status -count=`grep -c "trust" rndc.out.$n` +count=`grep -c "trust" rndc.out.$n` [ "$count" -eq 3 ] || ret=1 # one indicates current trust -count=`grep -c "trusted since" rndc.out.$n` +count=`grep -c "trusted since" rndc.out.$n` [ "$count" -eq 1 ] || ret=1 # one indicates revoked trust -count=`grep -c "trust revoked" rndc.out.$n` +count=`grep -c "trust revoked" rndc.out.$n` [ "$count" -eq 1 ] || ret=1 # one indicates trust pending -count=`grep -c "trust pending" rndc.out.$n` +count=`grep -c "trust pending" rndc.out.$n` [ "$count" -eq 1 ] || ret=1 # removal scheduled count=`grep -c "remove at" rndc.out.$n` @@ -378,26 +378,26 @@ mkeys_loadkeys_on 1 mkeys_refresh_on 2 mkeys_status_on 2 > rndc.out.a.$n 2>&1 # four keys listed -count=`grep -c "keyid: " rndc.out.a.$n` +count=`grep -c "keyid: " rndc.out.a.$n` [ "$count" -eq 4 ] || { echo "keyid: count ($count) != 4"; ret=1; } # one revoked -count=`grep -c "trust revoked" rndc.out.a.$n` +count=`grep -c "trust revoked" rndc.out.a.$n` [ "$count" -eq 1 ] || { echo "trust revoked count ($count) != 1"; ret=1; } # two pending -count=`grep -c "trust pending" rndc.out.a.$n` +count=`grep -c "trust pending" rndc.out.a.$n` [ "$count" -eq 2 ] || { echo "trust pending count ($count) != 2"; ret=1; } $SETTIME -R now -K ns1 $standby3 > /dev/null mkeys_loadkeys_on 1 mkeys_refresh_on 2 mkeys_status_on 2 > rndc.out.b.$n 2>&1 # now three keys listed -count=`grep -c "keyid: " rndc.out.b.$n` +count=`grep -c "keyid: " rndc.out.b.$n` [ "$count" -eq 3 ] || { echo "keyid: count ($count) != 3"; ret=1; } # one revoked -count=`grep -c "trust revoked" rndc.out.b.$n` +count=`grep -c "trust revoked" rndc.out.b.$n` [ "$count" -eq 1 ] || { echo "trust revoked count ($count) != 1"; ret=1; } # one pending -count=`grep -c "trust pending" rndc.out.b.$n` +count=`grep -c "trust pending" rndc.out.b.$n` [ "$count" -eq 1 ] || { echo "trust pending count ($count) != 1"; ret=1; } $SETTIME -D now -K ns1 $standby3 > /dev/null mkeys_loadkeys_on 1 @@ -411,16 +411,16 @@ sleep 20 mkeys_refresh_on 2 mkeys_status_on 2 > rndc.out.$n 2>&1 # two keys listed -count=`grep -c "keyid: " rndc.out.$n` +count=`grep -c "keyid: " rndc.out.$n` [ "$count" -eq 2 ] || ret=1 # none revoked -count=`grep -c "REVOKE" rndc.out.$n` +count=`grep -c "REVOKE" rndc.out.$n` [ "$count" -eq 0 ] || ret=1 # two lines indicating trust status -count=`grep -c "trust" rndc.out.$n` +count=`grep -c "trust" rndc.out.$n` [ "$count" -eq 2 ] || ret=1 # both indicate current trust -count=`grep -c "trusted since" rndc.out.$n` +count=`grep -c "trusted since" rndc.out.$n` [ "$count" -eq 2 ] || ret=1 if [ $ret != 0 ]; then echo_i "failed"; fi status=`expr $status + $ret` @@ -435,16 +435,16 @@ mkeys_loadkeys_on 1 mkeys_refresh_on 2 mkeys_status_on 2 > rndc.out.$n 2>&1 # two keys listed -count=`grep -c "keyid: " rndc.out.$n` +count=`grep -c "keyid: " rndc.out.$n` [ "$count" -eq 2 ] || ret=1 # both revoked -count=`grep -c "REVOKE" rndc.out.$n` +count=`grep -c "REVOKE" rndc.out.$n` [ "$count" -eq 2 ] || ret=1 # two lines indicating trust status -count=`grep -c "trust" rndc.out.$n` +count=`grep -c "trust" rndc.out.$n` [ "$count" -eq 2 ] || ret=1 # both indicate trust revoked -count=`grep -c "trust revoked" rndc.out.$n` +count=`grep -c "trust revoked" rndc.out.$n` [ "$count" -eq 2 ] || ret=1 # both have removal scheduled count=`grep -c "remove at" rndc.out.$n` @@ -476,7 +476,7 @@ echo_i "reinitialize trust anchors" $PERL $SYSTEMTESTTOP/stop.pl --use-rndc --port ${CONTROLPORT} . ns2 rm -f ns2/managed-keys.bind* nextpart ns2/named.run > /dev/null -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . ns2 +$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} mkeys ns2 n=`expr $n + 1` echo_i "check positive validation ($n)" @@ -513,18 +513,18 @@ mkeys_reload_on 1 mkeys_refresh_on 2 mkeys_status_on 2 > rndc.out.$n 2>&1 # one key listed -count=`grep -c "keyid: " rndc.out.$n` +count=`grep -c "keyid: " rndc.out.$n` [ "$count" -eq 1 ] || { echo "'keyid:' count ($count) != 1"; ret=1; } # it's the original key id -count=`grep -c "keyid: $originalid" rndc.out.$n` +count=`grep -c "keyid: $originalid" rndc.out.$n` [ "$count" -eq 1 ] || { echo "'keyid: $originalid' count ($count) != 1"; ret=1; } # not revoked -count=`grep -c "REVOKE" rndc.out.$n` +count=`grep -c "REVOKE" rndc.out.$n` [ "$count" -eq 0 ] || { echo "'REVOKE' count ($count) != 0"; ret=1; } # trust is still current -count=`grep -c "trust" rndc.out.$n` +count=`grep -c "trust" rndc.out.$n` [ "$count" -eq 1 ] || { echo "'trust' count != 1"; ret=1; } -count=`grep -c "trusted since" rndc.out.$n` +count=`grep -c "trusted since" rndc.out.$n` [ "$count" -eq 1 ] || { echo "'trusted since' count != 1"; ret=1; } if [ $ret != 0 ]; then echo_i "failed"; fi status=`expr $status + $ret` @@ -576,23 +576,23 @@ $PERL $SYSTEMTESTTOP/stop.pl --use-rndc --port ${CONTROLPORT} . ns1 rm -f ns1/root.db.signed.jnl cp ns1/root.db ns1/root.db.signed nextpart ns1/named.run > /dev/null -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . ns1 +$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} mkeys ns1 wait_for_log "loaded serial" ns1/named.run mkeys_refresh_on 2 mkeys_status_on 2 > rndc.out.$n 2>&1 # one key listed -count=`grep -c "keyid: " rndc.out.$n` +count=`grep -c "keyid: " rndc.out.$n` [ "$count" -eq 1 ] || ret=1 # it's the original key id -count=`grep -c "keyid: $originalid" rndc.out.$n` +count=`grep -c "keyid: $originalid" rndc.out.$n` [ "$count" -eq 1 ] || ret=1 # not revoked -count=`grep -c "REVOKE" rndc.out.$n` +count=`grep -c "REVOKE" rndc.out.$n` [ "$count" -eq 0 ] || ret=1 # trust is still current -count=`grep -c "trust" rndc.out.$n` +count=`grep -c "trust" rndc.out.$n` [ "$count" -eq 1 ] || ret=1 -count=`grep -c "trusted since" rndc.out.$n` +count=`grep -c "trusted since" rndc.out.$n` [ "$count" -eq 1 ] || ret=1 t2=`grep 'next refresh:' rndc.out.$n` [ "$t1" = "$t2" ] && ret=1 @@ -610,7 +610,7 @@ $PERL $SYSTEMTESTTOP/stop.pl --use-rndc --port ${CONTROLPORT} . ns1 rm -f ns1/root.db.signed.jnl cat ns1/K*.key >> ns1/root.db.signed nextpart ns1/named.run > /dev/null -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . ns1 +$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} mkeys ns1 wait_for_log "loaded serial" ns1/named.run # Less than a second may have passed since the last time ns2 received a # ./DNSKEY response from ns1. Ensure keys are refreshed at a different @@ -619,18 +619,18 @@ sleep 1 mkeys_refresh_on 2 mkeys_status_on 2 > rndc.out.$n 2>&1 # one key listed -count=`grep -c "keyid: " rndc.out.$n` +count=`grep -c "keyid: " rndc.out.$n` [ "$count" -eq 1 ] || ret=1 # it's the original key id -count=`grep -c "keyid: $originalid" rndc.out.$n` +count=`grep -c "keyid: $originalid" rndc.out.$n` [ "$count" -eq 1 ] || ret=1 # not revoked -count=`grep -c "REVOKE" rndc.out.$n` +count=`grep -c "REVOKE" rndc.out.$n` [ "$count" -eq 0 ] || ret=1 # trust is still current -count=`grep -c "trust" rndc.out.$n` +count=`grep -c "trust" rndc.out.$n` [ "$count" -eq 1 ] || ret=1 -count=`grep -c "trusted since" rndc.out.$n` +count=`grep -c "trusted since" rndc.out.$n` [ "$count" -eq 1 ] || ret=1 t2=`grep 'next refresh:' rndc.out.$n` [ "$t1" = "$t2" ] && ret=1 @@ -710,7 +710,7 @@ ret=0 # between the next scheduled key refresh time and startup time of restarted ns5. $PERL $SYSTEMTESTTOP/stop.pl --use-rndc --port ${CONTROLPORT} . ns5 nextpart ns5/named.run > /dev/null -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . ns5 +$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} mkeys ns5 wait_for_log "Returned from key fetch in keyfetch_done()" ns5/named.run # ns5/named.run will contain logs from both the old instance and the new # instance. In order for the test to pass, both must attempt a fetch. @@ -729,7 +729,7 @@ rm -f ns5/managed-keys.bind* # an "hour" until keys are refreshed again after initial failure cp ns5/named2.args ns5/named.args nextpart ns5/named.run > /dev/null -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . ns5 +$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} mkeys ns5 wait_for_log "Returned from key fetch in keyfetch_done() for '.': failure" ns5/named.run mkeys_secroots_on 5 grep '; initializing managed' ns5/named.secroots > /dev/null 2>&1 || ret=1 diff --git a/bin/tests/system/notify/tests.sh b/bin/tests/system/notify/tests.sh index ad20e3eaca..9c104bdde1 100644 --- a/bin/tests/system/notify/tests.sh +++ b/bin/tests/system/notify/tests.sh @@ -120,7 +120,7 @@ $PERL $SYSTEMTESTTOP/stop.pl . ns2 rm -f ns2/example.db cp -f ns2/example4.db ns2/example.db -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . ns2 +$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} notify ns2 try=0 while test $try -lt 45 diff --git a/bin/tests/system/nsupdate/tests.sh b/bin/tests/system/nsupdate/tests.sh index cb71a50237..14ea2a23a4 100755 --- a/bin/tests/system/nsupdate/tests.sh +++ b/bin/tests/system/nsupdate/tests.sh @@ -338,7 +338,7 @@ rm named.pid cd .. sleep 10 if - $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . ns1 + $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} nsupdate ns1 then echo_i "restarted server ns1" else @@ -511,7 +511,7 @@ $PERL $SYSTEMTESTTOP/stop.pl --use-rndc --port ${CONTROLPORT} . ns1 # 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 --port ${PORT} . ns1 +$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} nsupdate ns1 $DIG $DIGOPTS +tcp +noadd +nosea +nostat +noquest +nocomm +nocmd updated4.example.nil.\ @10.53.0.1 a > dig.out.ns1 || status=1 digcomp knowngood.ns1.afterstop dig.out.ns1 || ret=1 diff --git a/bin/tests/system/nzd2nzf/tests.sh b/bin/tests/system/nzd2nzf/tests.sh index 139ffef20b..0e400415cb 100644 --- a/bin/tests/system/nzd2nzf/tests.sh +++ b/bin/tests/system/nzd2nzf/tests.sh @@ -57,7 +57,7 @@ echo_i "deleting _default.nzd database" rm -f ns1/_default.nzd echo_i "starting ns1 which should migrate the .nzf to .nzd" -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . ns1 +$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} nzd2nzf ns1 n=`expr $n + 1` echo_i "querying for zone data from migrated zone config ($n)" diff --git a/bin/tests/system/rpz/tests.sh b/bin/tests/system/rpz/tests.sh index 5d5bb1d867..7e5c96660f 100644 --- a/bin/tests/system/rpz/tests.sh +++ b/bin/tests/system/rpz/tests.sh @@ -206,7 +206,7 @@ restart () { cp -f ns$1/base.db $NM done fi - $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . ns$1 + $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} rpz ns$1 load_db dnsrps_loaded } @@ -445,7 +445,7 @@ for mode in native dnsrps; do continue else echo_i "running DNSRPS sub-test" - $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . + $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} rpz fi ;; esac diff --git a/bin/tests/system/rpzrecurse/tests.sh b/bin/tests/system/rpzrecurse/tests.sh index 15bb3942b4..5ed78ae5b4 100644 --- a/bin/tests/system/rpzrecurse/tests.sh +++ b/bin/tests/system/rpzrecurse/tests.sh @@ -52,7 +52,7 @@ run_server() { echo_i "starting resolver using named.$TESTNAME.conf" cp -f ns2/named.$TESTNAME.conf ns2/named.conf - $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . ns2 + $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} rpzrecurse ns2 sleep 3 } @@ -134,7 +134,7 @@ for mode in native dnsrps; do continue else echo_i "running DNSRPS sub-test" - $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . + $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} rpzrecurse fi ;; esac diff --git a/bin/tests/system/rrsetorder/tests.sh b/bin/tests/system/rrsetorder/tests.sh index 7755a87e5e..5ff9541a38 100644 --- a/bin/tests/system/rrsetorder/tests.sh +++ b/bin/tests/system/rrsetorder/tests.sh @@ -251,7 +251,7 @@ fi echo_i "Re-starting slave" -(cd ..; $PERL start.pl --noclean --port ${PORT} rrsetorder ns2 ) +$PERL $SYSTEMTESTTOP/start.pl --noclean --port ${PORT} rrsetorder ns2 # # diff --git a/bin/tests/system/start.sh b/bin/tests/system/start.sh old mode 100644 new mode 100755 index 78fb0443d7..c5661c52eb --- a/bin/tests/system/start.sh +++ b/bin/tests/system/start.sh @@ -9,5 +9,9 @@ # See the COPYRIGHT file distributed with this work for additional # information regarding copyright ownership. -. ./conf.sh -$PERL start.pl "$@" +SYSTEMTESTTOP="$(realpath "$(dirname "$0")")" +# shellcheck source=conf.sh +. "$SYSTEMTESTTOP/conf.sh" +export SYSTEMTESTTOP + +$PERL "$SYSTEMTESTTOP/start.pl" "$@" diff --git a/bin/tests/system/stub/tests.sh b/bin/tests/system/stub/tests.sh index 3c51aec173..ed3d62e492 100644 --- a/bin/tests/system/stub/tests.sh +++ b/bin/tests/system/stub/tests.sh @@ -56,7 +56,7 @@ digcomp knowngood.dig.out.rec dig.out.ns3 || ret=1 $PERL $SYSTEMTESTTOP/stop.pl . ns3 echo_i "re-starting stub server" - $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . ns3 + $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} stub ns3 } done diff --git a/bin/tests/system/unknown/tests.sh b/bin/tests/system/unknown/tests.sh index 7fbec3f71e..7c3a244da2 100644 --- a/bin/tests/system/unknown/tests.sh +++ b/bin/tests/system/unknown/tests.sh @@ -137,7 +137,7 @@ status=`expr $status + $ret` echo_i "stop and restart slave" $PERL $SYSTEMTESTTOP/stop.pl . ns2 -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . ns2 +$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} unknown ns2 echo_i "checking large unknown record loading on slave" ret=0 @@ -155,7 +155,7 @@ status=`expr $status + $ret` echo_i "stop and restart inline slave" $PERL $SYSTEMTESTTOP/stop.pl . ns3 -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . ns3 +$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} unknown ns3 echo_i "checking large unknown record loading on inline slave" ret=0 diff --git a/bin/tests/system/xfer/tests.sh b/bin/tests/system/xfer/tests.sh index 91b23b3edb..cb1cd3ea00 100755 --- a/bin/tests/system/xfer/tests.sh +++ b/bin/tests/system/xfer/tests.sh @@ -430,7 +430,7 @@ tmp=0 $DIG -p ${PORT} txt mapped @10.53.0.3 > dig.out.1.$n grep "status: NOERROR," dig.out.1.$n > /dev/null || tmp=1 $PERL $SYSTEMTESTTOP/stop.pl . ns3 -$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} . ns3 +$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} xfer ns3 $DIG -p ${PORT} txt mapped @10.53.0.3 > dig.out.2.$n grep "status: NOERROR," dig.out.2.$n > /dev/null || tmp=1 $DIG -p ${PORT} axfr mapped @10.53.0.3 > dig.out.3.$n