Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests fail on Windows 11: Failed test 'lstat' ... Error resolving realpath #258

Closed
hakonhagland opened this issue Oct 17, 2022 · 2 comments

Comments

@hakonhagland
Copy link

I am trying to install this module on Windows 11 with a custom perl (see Perl/perl5#20395 for more information on how I installed this perl). See also miyagawa/cpanminus#652.

>where perl
C:\perl-debug\bin\perl.exe
>perl --version
This is perl 5, version 37, subversion 5 (v5.37.5 (v5.37.4-121-g4e362c6516)) built for MSWin32-x64-multi-thread
[...]

>where cpan
C:\perl-debug\bin\cpan.bat

>powershell "cpan Path::Tiny 2>&1 | tee cpan-path-tiny.log"
[...]
t/00-report-prereqs.t ............. ok
t/basename.t ...................... ok
t/basic.t ......................... ok
t/children.t ...................... ok
t/chmod.t ......................... ok
t/digest.t ........................ ok
t/exception.t ..................... ok
t/exports.t ....................... ok

#   Failed test 'lstat'
#   at t/filesystem.t line 348.
Error resolving realpath on '/??/C:/Users/hakon/AppData/Local/Temp/GmRhPY46Ey/foo.txt': No such file or directory at t/filesystem.t 
line 350.
# Tests were run but no plan was declared and done_testing() was not seen.
# Looks like your test exited with 2 just after 81.
t/filesystem.t .................... 
Dubious, test returned 2 (wstat 512, 0x200)
Failed 1/81 subtests 
t/input_output.t .................. ok
t/input_output_no_PU_UU.t ......... ok
[...]

The complete log is here: cpan-path-tiny.log

@xdg
Copy link
Contributor

xdg commented Oct 29, 2022

/??/C:/Users/hakon/AppData/Local/Temp/GmRhPY46Ey/foo.txt is not a valid path on Windows. As I have no way to replicate your build, there's nothing I can do. Since Path::Tiny works correctly on "normal" Windows Perls, I'm closing this ticket. If you ever find the problem and have a PR, I'll consider it.

@hakonhagland
Copy link
Author

/??/C:/Users/hakon/AppData/Local/Temp/GmRhPY46Ey/foo.txt is not a valid path on Windows

@xdg It looks like this is an issue with readlink, see Perl/perl5#20460 for more information.

hakonhagland added a commit to hakonhagland/Path-Tiny that referenced this issue Nov 19, 2022
The realpath function does not work correctly on Windows for
perl<=5.37.5.
This fixes issue dagolden#258.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants