}
my $verified;
- for(1 .. 5) {
+ for(1 .. 10) {
# verify that our server is up and running:
my $data=`$CURL --silent -i $HOSTIP:$HOSTPORT/verifiedserver 2>/dev/null`;
last;
}
else {
- sleep(1);
+ if($verbose) {
+ print STDERR "RUN: Retrying HTTP server existence in 3 sec\n";
+ }
+ sleep(3);
next;
}
}
my $verbose = $_[0];
my $STATUS;
my $RUNNING;
- my $pid=checkserver($HTTPSPIDFILE );
if(!$stunnel) {
return 0;
}
+ my $pid=checkserver($HTTPSPIDFILE );
+
if($pid > 0) {
# kill previous stunnel!
if($verbose) {
print "CMD: $cmd\n";
}
sleep(1);
- $pid=checkserver($HTTPSPIDFILE);
+
+ for(1 .. 10) {
+ $pid=checkserver($HTTPSPIDFILE);
+
+ if($pid <= 0) {
+ if($verbose) {
+ print STDERR "RUN: waiting 3 sec for HTTPS server\n";
+ }
+ sleep(3);
+ }
+ else {
+ last;
+ }
+ }
return $pid;
}
system($cmd);
my $verified;
- for(1 .. 5) {
+ for(1 .. 10) {
# verify that our server is up and running:
my $data=`$CURL --silent -i ftp://$HOSTIP:$FTPPORT/verifiedserver 2>/dev/null`;
}
else {
if($verbose) {
- print STDERR "RUN: Retrying FTP server existance in 1 sec\n";
+ print STDERR "RUN: Retrying FTP server existence in 3 sec\n";
}
- sleep(1);
+ sleep(3);
next;
}
}
my $verbose = $_[0];
my $STATUS;
my $RUNNING;
- my $pid=checkserver($FTPSPIDFILE );
if(!$stunnel) {
return 0;
}
+ my $pid=checkserver($FTPSPIDFILE );
if($pid > 0) {
# kill previous stunnel!
}
sleep(1);
- $pid=checkserver($FTPSPIDFILE );
+ for(1 .. 10) {
+
+ $pid=checkserver($FTPSPIDFILE );
+
+ if($pid <= 0) {
+ if($verbose) {
+ print STDERR "RUN: waiting 3 sec for FTPS server\n";
+ }
+ sleep(3);
+ }
+ else {
+ last;
+ }
+ }
return $pid;
}
}
}
- $why = "lacks $f";
+ $why = "curl lacks $f support";
$serverproblem = 15; # set it here
last;
}
# set above, a lacking prereq
}
elsif($serverproblem == 1) {
- $why = "no SSL-capable server";
+ $why = "no HTTPS server";
+ }
+ elsif($serverproblem == 3) {
+ $why = "no FTPS server";
}
else {
$why = "unfulfilled requirements";
}
elsif($what eq "ftps") {
if(!$stunnel || !$ssl_version) {
- # we can't run https tests without stunnel
+ # we can't run ftps tests without stunnel
# or if libcurl is SSL-less
- return 1;
+ return 3;
}
if(!$run{'ftp'}) {
$pid = runftpserver($verbose);
# Returns:
# 100 if this is not a test case
# 99 if this test case has no servers specified
+# 3 if this test is skipped due to no FTPS server
# 2 if one of the required servers couldn't be started
-# 1 if this test is skipped due to unfulfilled SSL/stunnel-requirements
+# 1 if this test is skipped due to no HTTPS server
sub serverfortest {
my ($testnum)=@_;