runtests: set 'oldlibssh' for libssh versions before 0.9.6

... and make test 1459 check for the different return code then.

Closes #8444
This commit is contained in:
Daniel Stenberg 2022-02-13 11:12:56 +01:00
parent 30b6896058
commit 7c140f6b2d
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
3 changed files with 16 additions and 1 deletions

View File

@ -395,6 +395,7 @@ Features testable here are:
- `ld_preload`
- `libssh2`
- `libssh`
- `oldlibssh` (versions before 0.9.6)
- `libz`
- `manual`
- `Mime`

View File

@ -35,8 +35,13 @@ CURL_HOME=%PWD/log/test%TESTNUMBER.dir
# Verify data after the test has been "shot"
<verify>
# old libssh installs return the wrong thing
<errorcode>
%if oldlibssh
67
%else
60
%endif
</errorcode>
<valgrind>
disable

View File

@ -271,6 +271,7 @@ my $has_mingw; # set if built with MinGW (as opposed to MinGW-w64)
my $has_hyper = 0; # set if built with Hyper
my $has_libssh2; # set if built with libssh2
my $has_libssh; # set if built with libssh
my $has_oldlibssh; # set if built with libssh < 0.9.6
my $has_wolfssh; # set if built with wolfssh
my $has_unicode; # set if libcurl is built with Unicode support
@ -2883,6 +2884,7 @@ sub setupfeatures {
$feature{"libz"} = $has_libz;
$feature{"libssh2"} = $has_libssh2;
$feature{"libssh"} = $has_libssh;
$feature{"oldlibssh"} = $has_oldlibssh;
$feature{"rustls"} = $has_rustls;
$feature{"wolfssh"} = $has_wolfssh;
$feature{"wolfssl"} = $has_wolfssl;
@ -3041,8 +3043,15 @@ sub checksystem {
if ($libcurl =~ /libssh2/i) {
$has_libssh2=1;
}
if ($libcurl =~ /libssh\//i) {
if ($libcurl =~ /libssh\/([0-9.]*)\//i) {
$has_libssh=1;
if($1 =~ /(\d+)\.(\d+).(\d+)/) {
my $v = $1 * 100 + $2 * 10 + $3;
if($v < 96) {
# before 0.9.6
$has_oldlibssh = 1;
}
}
}
if ($libcurl =~ /wolfssh/i) {
$has_wolfssh=1;