mirror of
https://github.com/curl/curl.git
synced 2025-04-12 16:20:35 +08:00
runtests: fix SSH server not starting in cases, re-ignore failing vcpkg CI jobs
Replace `Cwd::abs_path()` with `File::Spec->rel2abs()`. The former requires the file to exist, but in some cases, it's missing. Seen in MSVC vcpkg jobs using Chocolatey OpenSSH v8.0.0.1 ending up with `$path=/d/a/curl/curl/bld/tests/log/3/server/ssh_server.pid`, which does not exist while converting to an absolute path (the path is already absolute, but the conversion is done unconditionally): ``` Use of uninitialized value in subroutine entry at D:/a/curl/curl/tests/pathhelp.pm line 128. can't convert empty path at D:/a/curl/curl/tests/pathhelp.pm line 128. ``` Ref: https://github.com/curl/curl/actions/runs/13747741797/job/38444844173#step:14:1233 (master) Ref: https://github.com/curl/curl/actions/runs/13751862952/job/38453816737#step:14:3185 (trace) Also ignore 3 new libssh2 jobs failing due to memleak. Partial revert of 1bd5ac998bbc943dbf812b2824ad0f532201734c #16570 Closes #16636
This commit is contained in:
parent
5681628e2d
commit
61d30615e4
9
.github/workflows/windows.yml
vendored
9
.github/workflows/windows.yml
vendored
@ -922,6 +922,15 @@ jobs:
|
||||
export CURL_DIRSUFFIX='${{ matrix.type }}'
|
||||
export TFLAGS='-j8 ${{ matrix.tflags }}'
|
||||
TFLAGS+=' ~2310' # flaky
|
||||
TFLAGS+=' ~SCP' # 601 603 612 617 619 621 641 665 2004 3022
|
||||
TFLAGS+=' ~612' # SFTP
|
||||
if [[ '${{ matrix.install }}' = *'libssh2[core,zlib]'* ]]; then
|
||||
TFLAGS+=' ~SFTP'
|
||||
elif [[ '${{ matrix.install }}' = *'libssh2'* ]]; then
|
||||
TFLAGS+=' ~615 ~616 ~618 ~620 ~622' # Leak detected: memory still allocated: 22 bytes, allocated by D:/a/curl/curl/lib/vssh/libssh2.c:2006, sshc->homedir = strdup(sshp->readdir_filename);
|
||||
elif [[ '${{ matrix.install }}' = *'libssh '* ]]; then
|
||||
TFLAGS+=' ~614' # 'SFTP pre-quote chmod' SFTP, pre-quote, directory
|
||||
fi
|
||||
PATH="$PWD/bld/lib/${{ matrix.type }}:$PATH:/c/Program Files (x86)/stunnel/bin:/c/Program Files/OpenSSH-Win64"
|
||||
PATH="/c/msys64/usr/bin:$PATH"
|
||||
cmake --build bld --config '${{ matrix.type }}' --target test-ci
|
||||
|
@ -51,7 +51,7 @@ package pathhelp;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Cwd 'abs_path';
|
||||
use File::Spec;
|
||||
|
||||
BEGIN {
|
||||
use base qw(Exporter);
|
||||
@ -118,20 +118,20 @@ sub sys_native_abs_path {
|
||||
my ($path) = @_;
|
||||
|
||||
# Return untouched on non-Windows platforms.
|
||||
return Cwd::abs_path($path) if !os_is_win();
|
||||
return File::Spec->rel2abs($path) if !os_is_win();
|
||||
|
||||
# Do not process empty path.
|
||||
return $path if ($path eq '');
|
||||
|
||||
my $res;
|
||||
if($^O eq 'msys' || $^O eq 'cygwin') {
|
||||
$res = Cygwin::posix_to_win_path(Cwd::abs_path($path));
|
||||
$res = Cygwin::posix_to_win_path(File::Spec->rel2abs($path));
|
||||
}
|
||||
elsif($path =~ m{^/(cygdrive/)?([a-z])/(.*)}) {
|
||||
$res = uc($2) . ":/" . $3;
|
||||
}
|
||||
else {
|
||||
$res = Cwd::abs_path($path);
|
||||
$res = File::Spec->rel2abs($path);
|
||||
}
|
||||
|
||||
$res =~ s{[/\\]+}{/}g;
|
||||
@ -147,14 +147,14 @@ sub build_sys_abs_path {
|
||||
my ($path) = @_;
|
||||
|
||||
# Return untouched on non-Windows platforms.
|
||||
return Cwd::abs_path($path) if !os_is_win();
|
||||
return File::Spec->rel2abs($path) if !os_is_win();
|
||||
|
||||
my $res;
|
||||
if($^O eq 'msys' || $^O eq 'cygwin') {
|
||||
$res = Cygwin::win_to_posix_path($path, 1);
|
||||
}
|
||||
else {
|
||||
$res = Cwd::abs_path($path);
|
||||
$res = File::Spec->rel2abs($path);
|
||||
|
||||
if($res =~ m{^([A-Za-z]):(.*)}) {
|
||||
$res = "/" . lc($1) . $2;
|
||||
|
Loading…
x
Reference in New Issue
Block a user