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

One t-test fails, Perl 5.38 on Windows 10 #2105

Open
PhilterPaper opened this issue Sep 17, 2023 · 8 comments
Open

One t-test fails, Perl 5.38 on Windows 10 #2105

PhilterPaper opened this issue Sep 17, 2023 · 8 comments
Labels

Comments

@PhilterPaper
Copy link

PhilterPaper commented Sep 17, 2023

  • Mojolicious version: 9.34
  • Perl version: 5.38.0.1
  • Operating system: Windows 10

Steps to reproduce the behavior

Installation via 'cpan' to update from CPAN

Expected behavior

Expect clean install

Actual behavior

Failed one t-test: t/mojo/file.t 'right file' (several occurrences listed at 285, 288, 293, 299, 308)

t/mojo/file.t .............................. 1/?
    #   Failed test 'right files'
    #   at t/mojo/file.t line 285.
    #     Structures begin differing at:
    #          $got->[0] = 'C:\Strawberry\cpan\build\Mojolicious-9.34-0\t\mojo\lib\Mojo'
    #     $expected->[0] = 'C:\Strawberry\cpan\build\Mojolicious-9.34-0\t\mojo\lib\Mojo\.hidden.txt'

    #   Failed test 'right files'
    #   at t/mojo/file.t line 288.
    #     Structures begin differing at:
    #          $got->[0] = Does not exist
    #     $expected->[0] = C:\Strawberry\cpan\build\Mojolicious-9.34-0\t\mojo\lib\Mojo\DeprecationTest.pm

    #   Failed test 'right files'
    #   at t/mojo/file.t line 293.
    #     Structures begin differing at:
    #          $got->[0] = 'C:\Strawberry\cpan\build\Mojolicious-9.34-0\t\mojo\lib\Mojo'
    #     $expected->[0] = 'C:\Strawberry\cpan\build\Mojolicious-9.34-0\t\mojo\lib\Mojo\BaseTest'

    #   Failed test 'right files'
    #   at t/mojo/file.t line 299.
    #     Structures begin differing at:
    #          $got->[0] = Does not exist
    #     $expected->[0] = C:\Strawberry\cpan\build\Mojolicious-9.34-0\t\mojo\lib\Mojo\BaseTest\Base1.pm

    #   Failed test 'right files'
    #   at t/mojo/file.t line 308.
    #     Structures begin differing at:
    #          $got->[0] = 'C:\Strawberry\cpan\build\Mojolicious-9.34-0\t\mojo\lib\Mojo'
    #     $expected->[0] = 'C:\Strawberry\cpan\build\Mojolicious-9.34-0\t\mojo\lib\Mojo\.hidden.txt'
    # Looks like you failed 5 tests of 15.

#   Failed test 'list/list_tree'
#   at t/mojo/file.t line 310.
# Looks like you failed 1 test of 31.
t/mojo/file.t .............................. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/31 subtests
        (less 2 skipped subtests: 28 okay)
@PhilterPaper
Copy link
Author

If it matters, this is the new Strawberry Perl build ("portable" version). I took a quick look in file.t (list/list_tree), and there were many places mentioning "right files", so I'm not sure which was failing.

@kraih
Copy link
Member

kraih commented Sep 18, 2023

I took a quick look in file.t (list/list_tree), and there were many places mentioning "right files", so I'm not sure which was failing.

It tells you the lines right in the fail messages. 😄

And we test with Strawberry Perl in our GitHub Actions. Everything looks fine there.

@PhilterPaper
Copy link
Author

PhilterPaper commented Sep 19, 2023

And we test with Strawberry Perl in our GitHub Actions. Everything looks fine there.

Well, I see that CPAN Testers failed exactly the same way on the same Perl and Windows level, so perhaps it would be a good idea to look at it again. If you don't have a Strawberry Perl to install on (not the GitHub Actions version), I would be happy to try installing an instrumented version of Mojolicious, or force an install and try running file.t and other debug on it, and report back the results to you. Let me know.

Update: I have found GitHub Actions to be buggy and unreliable. My advice is not to rely on it as the Gospel Truth of whether your package runs OK on a given platform. If you don't have access to that platform to test on, it's better than nothing, but be sure to periodically check the Testers Matrix on CPAN to see what has happened on a wide variety of platforms. For instance, some of my packages were failing t-tests because some platforms had installed extended precision Perl floating point math packages (I had to round down FP results to single precision in t-tests). Also, I can't test some parts of my packages on GA because they can't or won't install some necessary libraries and packages.

@PhilterPaper
Copy link
Author

9.35 fails on the same test. CPAN testers report same problem.

Since the Mojolicious developer(s) apparently don't have a Windows/Strawberry Perl 5.38 system to test on, please feel free to contact me if I can be of any help in testing for you.

@PhilterPaper
Copy link
Author

PhilterPaper commented Mar 10, 2024

Ditto release 9.36. CPAN testers apparently haven't gotten to it yet.

Update: fails on CPAN Testers Windows when 5.34 and up.

@kraih kraih added the bug label Mar 10, 2024
@dcsjulio
Copy link

dcsjulio commented Jun 4, 2024

Same here. Build fails using strawberry perl.

I suspect that the reason for that is that File::Find works with slashes, while canonpath returns backslashes on windows.

So when doing the delete of the current directory on the new sub, it fails because that key does not exist.

@PhilterPaper
Copy link
Author

That would be quite a "gotcha" (using backslash \ on one hand and slash / on the other). Should be a simple fix, if it is. Note that in Windows, only the command line interpreter requires backslashes, while slashes can normally be used elsewhere.

@PhilterPaper
Copy link
Author

Latest release (9.38) same failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants