my $listonly; # only list the tests
my $postmortem; # display detailed info about failed tests
-my %run; # running server
+my %run; # running server
+my %doesntrun; # servers that don't work, identified by pidfile
# torture test variables
my $torture;
$nameext="-ipv6";
}
+ # don't retry if the server doesn't work
+ if ($doesntrun{$pidfile}) {
+ return (0,0);
+ }
+
$pid = checkserver($pidfile);
if($pid > 0) {
if($httppid <= 0 || !kill(0, $httppid)) {
# it is NOT alive
logmsg "RUN: failed to start the HTTP$nameext server\n";
+ $doesntrun{$pidfile} = 1;
return (0,0);
}
logmsg "RUN: HTTP$nameext server failed verification\n";
# failed to talk to it properly. Kill the server and return failure
stopserver("$httppid $pid2");
+ $doesntrun{$pidfile} = 1;
return (0,0);
}
my $STATUS;
my $RUNNING;
my $ip = $HOSTIP;
+ my $pidfile = $HTTPSPIDFILE;
if(!$stunnel) {
return 0;
$ip = $HOST6IP;
}
- my $pid=checkserver($HTTPSPIDFILE);
+ # don't retry if the server doesn't work
+ if ($doesntrun{$pidfile}) {
+ return (0,0);
+ }
+
+ my $pid=checkserver($pidfile);
if($pid > 0) {
# kill previous stunnel!
my $flag=$debugprotocol?"-v ":"";
my $cmd="$perl $srcdir/httpsserver.pl $flag -p https -s \"$stunnel\" -d $srcdir -r $HTTPPORT $HTTPSPORT";
- my ($httpspid, $pid2) = startnew($cmd, $HTTPSPIDFILE,0);
+ my ($httpspid, $pid2) = startnew($cmd, $pidfile,0);
if($httpspid <= 0 || !kill(0, $httpspid)) {
# it is NOT alive
logmsg "RUN: failed to start the HTTPS server\n";
stopservers($verbose);
+ $doesntrun{$pidfile} = 1;
return(0,0);
}
logmsg "RUN: HTTPS server failed verification\n";
# failed to talk to it properly. Kill the server and return failure
stopserver("$httpspid $pid2");
+ $doesntrun{$pidfile} = 1;
return (0,0);
}
$nameext="-ipv6";
}
+ # don't retry if the server doesn't work
+ if ($doesntrun{$pidfile}) {
+ return (0,0);
+ }
+
my $pid = checkserver($pidfile);
if($pid >= 0) {
stopserver($pid);
if($ftppid <= 0 || !kill(0, $ftppid)) {
# it is NOT alive
logmsg "RUN: failed to start the FTP$id$nameext server\n";
- return -1;
+ $doesntrun{$pidfile} = 1;
+ return (0,0);
}
# Server is up. Verify that we can speak to it.
logmsg "RUN: FTP$id$nameext server failed verification\n";
# failed to talk to it properly. Kill the server and return failure
stopserver("$ftppid $pid2");
+ $doesntrun{$pidfile} = 1;
return (0,0);
}
my $STATUS;
my $RUNNING;
my $ip = $HOSTIP;
+ my $pidfile = $FTPSPIDFILE;
if(!$stunnel) {
return 0;
$ip = $HOST6IP;
}
- my $pid=checkserver($FTPSPIDFILE);
+ # don't retry if the server doesn't work
+ if ($doesntrun{$pidfile}) {
+ return (0,0);
+ }
+
+ my $pid=checkserver($pidfile);
if($pid > 0) {
# kill previous stunnel!
my $flag=$debugprotocol?"-v ":"";
my $cmd="$perl $srcdir/httpsserver.pl $flag -p ftps -s \"$stunnel\" -d $srcdir -r $FTPPORT $FTPSPORT";
- my ($ftpspid, $pid2) = startnew($cmd, $FTPSPIDFILE,0);
+ my ($ftpspid, $pid2) = startnew($cmd, $pidfile,0);
if($ftpspid <= 0 || !kill(0, $ftpspid)) {
# it is NOT alive
logmsg "RUN: failed to start the FTPS server\n";
stopservers($verbose);
+ $doesntrun{$pidfile} = 1;
return(0,0);
}
logmsg "RUN: FTPS server failed verification\n";
# failed to talk to it properly. Kill the server and return failure
stopserver("$ftpspid $pid2");
+ $doesntrun{$pidfile} = 1;
return (0,0);
}
$nameext="-ipv6";
}
+ # don't retry if the server doesn't work
+ if ($doesntrun{$pidfile}) {
+ return (0,0);
+ }
+
my $pid = checkserver($pidfile);
if($pid >= 0) {
stopserver($pid);
if($tftppid <= 0 || !kill(0, $tftppid)) {
# it is NOT alive
- logmsg "RUN: failed to start the FTP$id$nameext server\n";
- return -1;
+ logmsg "RUN: failed to start the TFTP$id$nameext server\n";
+ $doesntrun{$pidfile} = 1;
+ return (0,0);
}
# Server is up. Verify that we can speak to it.
logmsg "RUN: TFTP$id$nameext server failed verification\n";
# failed to talk to it properly. Kill the server and return failure
stopserver("$tftppid $pid2");
+ $doesntrun{$pidfile} = 1;
return (0,0);
}
my $port = $SSHPORT;
my $pidfile = $SSHPIDFILE;
+ # don't retry if the server doesn't work
+ if ($doesntrun{$pidfile}) {
+ return (0,0);
+ }
+
my $pid = checkserver($pidfile);
if($pid > 0) {
stopserver($pid);
logmsg "RUN: failed to start the SSH server\n";
# failed to talk to it properly. Kill the server and return failure
stopserver("$sshpid $pid2");
- return -1;
+ $doesntrun{$pidfile} = 1;
+ return (0,0);
}
if (!verifyserver('ssh',$ip,$port)) {
logmsg "RUN: SSH server failed verification\n";
+ $doesntrun{$pidfile} = 1;
return (0,0);
}
if($verbose) {
my $port = $SOCKSPORT;
my $pidfile = $SOCKSPIDFILE;
+ # don't retry if the server doesn't work
+ if ($doesntrun{$pidfile}) {
+ return (0,0);
+ }
+
my $flag=$debugprotocol?"-v ":"";
my $cmd="ssh -D ${HOSTIP}:$SOCKSPORT -N -F curl_ssh_config ${USER}\@${HOSTIP} -p ${SSHPORT} -vv >log/ssh.log 2>&1";
my ($sshpid, $pid2) =
logmsg "RUN: failed to start the SOCKS server\n";
# failed to talk to it properly. Kill the server and return failure
stopserver("$sshpid $pid2");
+ $doesntrun{$pidfile} = 1;
return (0,0);
}
# Ugly hack but ssh doesn't support pid files
if (!verifyserver('socks',$ip,$port)) {
logmsg "RUN: SOCKS server failed verification\n";
+ $doesntrun{$pidfile} = 1;
return (0,0);
}
if($verbose) {