Simplify start/stop helper func in system tests

The system test should never attempt to start or stop any other server
than those that belong to that system test. Therefore, it is not
necessary to specify the system test name in function calls.

Additionally, this makes it possible to run the test inside a
differently named directory, as its name is automatically detected with
the $SYSTESTDIR variable. This enables running the system tests inside a
temporary directory.

Direct use of stop.pl was replaced with a more systematic approach to
use stop_servers helper function.

(cherry picked from commit c100308b7d)
This commit is contained in:
Tom Krizek
2022-11-24 17:42:43 +01:00
parent 2c4054a2f7
commit 34eda91697
23 changed files with 98 additions and 98 deletions

View File

@@ -2165,7 +2165,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
start_server --noclean --restart --port "$PORT" dnssec ns4
start_server --noclean --restart --port "$PORT" ns4
then
echo_i "restarted server ns4"
else
@@ -2231,7 +2231,7 @@ echo "secure.example. regular $future" > ns4/_default.nta
start=$($PERL -e 'print time()."\n";')
if
start_server --noclean --restart --port "$PORT" dnssec ns4
start_server --noclean --restart --port "$PORT" ns4
then
echo_i "restarted server ns4"
else
@@ -2287,7 +2287,7 @@ echo "secure.example. forced $future" > ns4/_default.nta
start=$($PERL -e 'print time()."\n";')
if
start_server --noclean --restart --port "$PORT" dnssec ns4
start_server --noclean --restart --port "$PORT" ns4
then
echo_i "restarted server ns4"
else
@@ -2335,7 +2335,7 @@ echo "secure.example. forced $future" > ns4/_default.nta
added=$($PERL -e 'print time()."\n";')
if
start_server --noclean --restart --port "$PORT" dnssec ns4
start_server --noclean --restart --port "$PORT" ns4
then
echo_i "restarted server ns4"
else
@@ -3883,9 +3883,9 @@ ret=0
dig_with_opts . dnskey +ednsopt=KEY-TAG:fffe +ednsopt=KEY-TAG:fffd @10.53.0.1 > dig.out.ns1.test$n || ret=1
grep "trust-anchor-telemetry './IN' from .* 65534" ns1/named.run > /dev/null || ret=1
grep "trust-anchor-telemetry './IN' from .* 65533" ns1/named.run > /dev/null && ret=1
$PERL ../stop.pl dnssec ns1 || ret=1
stop_server ns1 || ret=1
nextpart ns1/named.run > /dev/null
start_server --noclean --restart --port ${PORT} dnssec ns1 || ret=1
start_server --noclean --restart --port ${PORT} ns1 || ret=1
n=$(($n+1))
test "$ret" -eq 0 || echo_i "failed"
status=$((status+ret))