mirror of
https://github.com/curl/curl.git
synced 2025-10-01 00:16:48 +03:00
Temporary change to better debug startup failures
of test suite ssh and socks servers.
This commit is contained in:
parent
8d3964782a
commit
d59841618d
|
@ -1116,6 +1116,9 @@ sub runsocksserver {
|
||||||
# it is NOT alive
|
# it is NOT alive
|
||||||
logmsg "RUN: failed to start the SOCKS server\n";
|
logmsg "RUN: failed to start the SOCKS server\n";
|
||||||
# failed to talk to it properly. Kill the server and return failure
|
# failed to talk to it properly. Kill the server and return failure
|
||||||
|
logmsg "=== Start of file log/ssh.log\n";
|
||||||
|
displaylogcontent("log/ssh.log");
|
||||||
|
logmsg "=== End of file log/ssh.log\n";
|
||||||
logmsg "TRACESSH:runsocksserver: calling stopserver with sshpid: $sshpid pid2: $pid2\n";
|
logmsg "TRACESSH:runsocksserver: calling stopserver with sshpid: $sshpid pid2: $pid2\n";
|
||||||
stopserver("$sshpid $pid2");
|
stopserver("$sshpid $pid2");
|
||||||
$doesntrun{$pidfile} = 1;
|
$doesntrun{$pidfile} = 1;
|
||||||
|
|
|
@ -13,6 +13,7 @@ use strict;
|
||||||
use File::Spec;
|
use File::Spec;
|
||||||
|
|
||||||
my $verbose=0; # set to 1 for debugging
|
my $verbose=0; # set to 1 for debugging
|
||||||
|
my $showfiles=0;
|
||||||
|
|
||||||
my $port = 8999; # just our default, weird enough
|
my $port = 8999; # just our default, weird enough
|
||||||
my $listenaddr = "127.0.0.1"; # address on which to listen
|
my $listenaddr = "127.0.0.1"; # address on which to listen
|
||||||
|
@ -136,12 +137,18 @@ chomp($tmpstr = qx($sshd -V 2>&1 | grep OpenSSH));
|
||||||
if ($tmpstr =~ /OpenSSH[_-](\d+)\.(\d+)(\.(\d+))*/) {
|
if ($tmpstr =~ /OpenSSH[_-](\d+)\.(\d+)(\.(\d+))*/) {
|
||||||
($ssh_ver_major, $ssh_ver_minor, $ssh_ver_patch) = ($1, $2, $4);
|
($ssh_ver_major, $ssh_ver_minor, $ssh_ver_patch) = ($1, $2, $4);
|
||||||
$ssh_daemon = 'OpenSSH';
|
$ssh_daemon = 'OpenSSH';
|
||||||
|
if(10 * $ssh_ver_major + $ssh_ver_minor == 36) {
|
||||||
|
$showfiles=1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(!$ssh_daemon) {
|
if(!$ssh_daemon) {
|
||||||
chomp($tmpstr = qx($sshd -V 2>&1 | grep Sun_SSH));
|
chomp($tmpstr = qx($sshd -V 2>&1 | grep Sun_SSH));
|
||||||
if($tmpstr =~ /Sun[_-]SSH[_-](\d+)\.(\d+)/) {
|
if($tmpstr =~ /Sun[_-]SSH[_-](\d+)\.(\d+)/) {
|
||||||
($ssh_ver_major, $ssh_ver_minor) = ($1, $2);
|
($ssh_ver_major, $ssh_ver_minor) = ($1, $2);
|
||||||
$ssh_daemon = 'SunSSH';
|
$ssh_daemon = 'SunSSH';
|
||||||
|
if(10 * $ssh_ver_major + $ssh_ver_minor == 11) {
|
||||||
|
$showfiles=1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($verbose) {
|
if ($verbose) {
|
||||||
|
@ -322,6 +329,11 @@ elsif ($verbose && ($cmdretval >> 8)) {
|
||||||
printf("$sshd exited with %d \n", $cmdretval >> 8);
|
printf("$sshd exited with %d \n", $cmdretval >> 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($showfiles) {
|
||||||
|
displayfile("log/sshd.log");
|
||||||
|
displayfile("$conffile");
|
||||||
|
}
|
||||||
|
|
||||||
unlink $conffile;
|
unlink $conffile;
|
||||||
|
|
||||||
exit $cmdretval >> 8;
|
exit $cmdretval >> 8;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user