From: Daniel Stenberg Date: Sun, 13 Feb 2022 10:12:56 +0000 (+0100) Subject: runtests: set 'oldlibssh' for libssh versions before 0.9.6 X-Git-Tag: curl-7_82_0~75 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c140f6b2d90975629ba81a23acbef4363a3e6fe;p=thirdparty%2Fcurl.git runtests: set 'oldlibssh' for libssh versions before 0.9.6 ... and make test 1459 check for the different return code then. Closes #8444 --- diff --git a/tests/FILEFORMAT.md b/tests/FILEFORMAT.md index c50d0fe595..c1fbc5705b 100644 --- a/tests/FILEFORMAT.md +++ b/tests/FILEFORMAT.md @@ -395,6 +395,7 @@ Features testable here are: - `ld_preload` - `libssh2` - `libssh` +- `oldlibssh` (versions before 0.9.6) - `libz` - `manual` - `Mime` diff --git a/tests/data/test1459 b/tests/data/test1459 index fde8bf1d60..08fae3378d 100644 --- a/tests/data/test1459 +++ b/tests/data/test1459 @@ -35,8 +35,13 @@ CURL_HOME=%PWD/log/test%TESTNUMBER.dir # Verify data after the test has been "shot" +# old libssh installs return the wrong thing +%if oldlibssh +67 +%else 60 +%endif disable diff --git a/tests/runtests.pl b/tests/runtests.pl index f726d223ba..8c7dbd62c9 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -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;