summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2023-04-17 16:57:17 -0700
committerDan Fandrich <dan@coneharvesters.com>2023-04-18 13:18:17 -0700
commitf9e8c5f5781c85a16f1da1c55af02e0bdd688af6 (patch)
tree8e6ba09e2bf2ef973a1257d69e1e2ee1df1a4678 /tests
parent2e0b70b8bcfcc30c65caabbe5b84e17368dadf65 (diff)
downloadcurl-f9e8c5f5781c85a16f1da1c55af02e0bdd688af6.tar.gz
runtests: don't try to stop stunnel before trying again
Calling stopserver() before retrying stunnel due to an error would stop the dependent server (such as HTTP) meaning stunnel would have nothing to talk to when it came up. Don't try to force a stop when it didn't actually start. Also, don't mark the server as bad for future use when it starts up on a retry. Reported-by: eaglegai at github Tested-by: eaglegai at github Fixes #10976
Diffstat (limited to 'tests')
-rw-r--r--tests/servers.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/servers.pm b/tests/servers.pm
index f877374b1..ae0e1cd2c 100644
--- a/tests/servers.pm
+++ b/tests/servers.pm
@@ -1372,11 +1372,14 @@ sub runhttpsserver {
if($httpspid <= 0 || !pidexists($httpspid)) {
# it is NOT alive
- stopserver($server, "$pid2");
+ # don't call stopserver since that will also kill the dependent
+ # server that has already been started properly
$doesntrun{$pidfile} = 1;
$httpspid = $pid2 = 0;
next;
}
+
+ $doesntrun{$pidfile} = 0;
# we have a server!
if($verb) {
logmsg "RUN: $srvrname server is PID $httpspid port $port\n";
@@ -1586,12 +1589,14 @@ sub runsecureserver {
$port += 1 + int(rand(700));
next if exists $usedports{$port};
my $options = "$flags --accept $port";
+
my $cmd = "$perl $srcdir/secureserver.pl $options";
($protospid, $pid2) = startnew($cmd, $pidfile, 15, 0);
if($protospid <= 0 || !pidexists($protospid)) {
# it is NOT alive
- stopserver($server, "$pid2");
+ # don't call stopserver since that will also kill the dependent
+ # server that has already been started properly
$doesntrun{$pidfile} = 1;
$protospid = $pid2 = 0;
next;