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.
This commit is contained in:
Tom Krizek
2022-11-24 17:42:43 +01:00
parent 6678f672ab
commit c100308b7d
23 changed files with 98 additions and 98 deletions

View File

@@ -157,8 +157,8 @@ done
status=`expr $status + $ret`
echo_i "stop and restart secondary"
$PERL ../stop.pl unknown ns2
start_server --noclean --restart --port ${PORT} unknown ns2
stop_server ns2
start_server --noclean --restart --port ${PORT} ns2
# server may be answering queries before zones are loaded,
# so retry a few times if this query fails
@@ -183,8 +183,8 @@ diff large.out dig.out.test$n > /dev/null || { ret=1 ; echo_i "diff failed"; }
status=`expr $status + $ret`
echo_i "stop and restart inline secondary"
$PERL ../stop.pl unknown ns3
start_server --noclean --restart --port ${PORT} unknown ns3
stop_server ns3
start_server --noclean --restart --port ${PORT} ns3
# server may be answering queries before zones are loaded,
# so retry a few times if this query fails