From: Daniel Stenberg Date: Tue, 14 Jun 2022 21:58:26 +0000 (+0200) Subject: runtests: skip starting the ssh server if user name is lacking X-Git-Tag: curl-7_84_0~36 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f0f587d3471c8efe8687186e5749a4e88498d53f;p=thirdparty%2Fcurl.git runtests: skip starting the ssh server if user name is lacking Because the ssh server startup script *requires* a user name there's no point in invoking it if no name was found. Reported-by: Ricardo M. Correia Ref: #9007 Closes #9013 --- diff --git a/tests/runtests.pl b/tests/runtests.pl index dcf0f965a1..97f6e612e1 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -2195,6 +2195,11 @@ sub runsshserver { my $logfile; my $port = 20000; # no lower port + if(!$USER) { + logmsg "Can't start ssh server due to lack of USER name"; + return (0,0,0); + } + $server = servername_id($proto, $ipvnum, $idnum); $pidfile = $serverpidfile{$server};