mirror of
https://github.com/isc-projects/bind9.git
synced 2026-03-04 22:40:41 -05:00
Correctly invoke stop.pl when start.pl fails
MR !1141 broke the way stop.pl is invoked when start.pl fails: - start.pl changes the working directory to $testdir/$server before attempting to start $server, - commit27ee629e6bcauses the $testdir variable in stop.pl to be determined using the $SYSTEMTESTTOP environment variable, which is set to ".." by all tests.sh scripts, - commite227815af5makes start.pl pass $test (the test's name) rather than $testdir (the path to the test's directory) to stop.pl when a given server fails to start. Thus, when a server is restarted from within a tests.sh script and such a restart fails, stop.pl attempts to look for the server directory in a nonexistent location ($testdir/$server/../$test, i.e. $testdir/$test, instead of $testdir/../$test). Fix the issue by changing the working directory before stop.pl is invoked in the scenario described above. (cherry picked from commit4afad2a047)
This commit is contained in:
parent
707b2349b8
commit
ebedeffa25
1 changed files with 1 additions and 0 deletions
|
|
@ -213,6 +213,7 @@ sub start_server {
|
|||
print "I:$test:Couldn't start server $command (pid=$child)\n";
|
||||
print "I:$test:failed\n";
|
||||
system "kill -9 $child" if ("$child" ne "");
|
||||
chdir "$testdir";
|
||||
system "$PERL $topdir/stop.pl $test";
|
||||
exit 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue