From: Yang Tse Date: Wed, 31 Aug 2011 16:16:14 +0000 (+0200) Subject: test harness: fix detection of test harness host and client key files X-Git-Tag: upstream/7.37.1~3775 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=38fff918f93408ed71e16bc8cdb5fd45251470bb;p=platform%2Fupstream%2Fcurl.git test harness: fix detection of test harness host and client key files Regenerate curl's tests host and client key files also when, somehow, any of these files are empty. --- diff --git a/tests/sshserver.pl b/tests/sshserver.pl index b439015..5fda35f 100755 --- a/tests/sshserver.pl +++ b/tests/sshserver.pl @@ -362,8 +362,10 @@ if((($sshid =~ /OpenSSH/) && ($sshvernum < 299)) || #*************************************************************************** # Generate host and client key files for curl's tests # -if((! -e $hstprvkeyf) || (! -e $hstpubkeyf) || - (! -e $cliprvkeyf) || (! -e $clipubkeyf)) { +if((! -e $hstprvkeyf) || (! -s $hstprvkeyf) || + (! -e $hstpubkeyf) || (! -s $hstpubkeyf) || + (! -e $cliprvkeyf) || (! -s $cliprvkeyf) || + (! -e $clipubkeyf) || (! -s $clipubkeyf)) { # Make sure all files are gone so ssh-keygen doesn't complain unlink($hstprvkeyf, $hstpubkeyf, $cliprvkeyf, $clipubkeyf); logmsg 'generating host keys...' if($verbose);