Skip to content

Windows: unittest hangs on Cygwin, test should support MSYS2 #170

Closed

Description

@afbjorklund

Apparently the test suite hangs on Cygwin, due to missing symlink support.

Need to expand on the _WIN32 used for some test cases.

We should also support "MSYS" as a synonym for Cygwin, in the uname -s

This is used by the MSYS2 project: http://www.msys2.org/

Activity

  1. afbjorklund commented on Apr 2, 2017

    @afbjorklund
    ContributorAuthor

    Also, we probably need to create an "official" Windows test build (using Appveyor).

    As was suggested in:

    Not possible to test all of these issues with Travis, also need to run them on Windows.

  2. added
    issue: bug
    os: windows
    on Jul 19, 2017
  3. afbjorklund commented on Apr 29, 2018

    @afbjorklund
    ContributorAuthor

    Fixed on 3.4-maint and master (7951573)

    Oops: the "lockfile" fix was still missing there...

  4. added
    help wanted
    on Jul 21, 2019
  5. afbjorklund commented on Jul 21, 2019

    @afbjorklund
    ContributorAuthor

    I suppose this should be rebased, and then tried on a real Windows computer.

    Using MSYS2: https://www.msys2.org/

    Have access to Windows 7, but would be nice if it could be tested on Windows 10.

    Run this: ./misc/build.sh unittest

    You might have to install the needed packages for the mandatory zstd support:

    pacman -Sy && pacman -S libzstd-devel

  6. added
    issue: portability
    and removed
    os: windows
    on Jul 21, 2019
  7. afbjorklund commented on Jul 21, 2019

    @afbjorklund
    ContributorAuthor

    I removed the "windows" label, because this is not really _WIN32 but POSIX.

  8. afbjorklund commented on Jul 21, 2019

    @afbjorklund
    ContributorAuthor

    Tested again, on Windows 7 MSYS2. Still the same issues (unittest hangs), plus a new gperf problem...

    It was not possible to build from git, since it complained about the %% construct for some reason ("junk")

    add_confitems_numbers = \
        perl -pae '$$$$s = 1 if /^%%/; s/ITEM/$$$$n++ . ", ITEM"/e if $$$$s == 1'
    
    $(eval $(call generate_gperf_lookup,confitems,$(add_confitems_numbers)))
    $(eval $(call generate_gperf_lookup,envtoconfitems,cat))
    

    Building from ccache-3.7.2.tar.gz hangs forever, due to the assumption that symlinks work everywhere.

  9. changed the title [-]Windows: quicktest hangs on Cygwin, test should support MSYS2[/-] [+]Windows: unittest hangs on Cygwin, test should support MSYS2[/+] on Jul 21, 2019
  10. afbjorklund commented on Jul 21, 2019

    @afbjorklund
    ContributorAuthor

    Apparently there is a gperf fix in #443

  11. afbjorklund commented on Jul 21, 2019

    @afbjorklund
    ContributorAuthor

    Checking for symlink support in configure would probably be better than using platform macros...

    But the fixes in #246 should be able to make it run. Looks like the file-based locks are broken, though ?

    Maybe there should be a special "symlink" define ?

    Then we could verify the functionality, also on Linux

  12. peterbud commented on Jul 21, 2019

    @peterbud
    Contributor

    It was not possible to build from git, since it complained about the %% construct for some reason ("junk")

    The reason is that the git by default will use CRLF instead of LF for all source files, and the MSYS2 version of gperf unfortunately is not handling inputs with CRLFs properly. Once you save the gperf files as *nix files (using simple LF and NOT CRLF, ie using unix2dos or similar) one can build ccache.

    However the unitest indeed hangs - I have tried on WIn10 with latest MSYS2. I recall that earlier versions were nicely running all tests.

  13. afbjorklund commented on Jul 21, 2019

    @afbjorklund
    ContributorAuthor

    Oh, that line ending thing can probably be done by the sed/perl post processing as well then.

  14. peterbud commented on Jul 21, 2019

    @peterbud
    Contributor

    So this is the latest I have managed to run using MSYS2:
    PASSED: 3563 assertions, 112 tests, 12 suites

    $ sh ../test/run
    Compiler:         gcc (/usr/bin/gcc)
    Compiler version: gcc (GCC) 9.1.0
    CUDA compiler:    not available
    
    Running test suite base................................................................
    Running test suite nocpp2................................................................
    Running test suite cpp1.
    Skipped test suite multi_arch [multiple -arch options not supported on MSYS_NT-10.0-18362]
    Skipped test suite serialize_diagnostics [--serialize-diagnostics not supported by compiler]
    Skipped test suite sanitize_blacklist [-fsanitize-blacklist not supported by compiler]
    Running test suite debug_prefix_map.
    Running test suite split_dwarf....
    Running test suite masquerading.
    Running test suite hardlink....
    Skipped test suite fileclone [file system doesn't support file cloning]
    Running test suite direct..........................................
    Running test suite direct_gcc.....
    Running test suite depend......
    Running test suite basedir.....
    Running test suite no_compression...
    Running test suite readonly...
    Running test suite readonly_direct..
    Running test suite cleanup..........
    Running test suite pch.....................
    Running test suite upgrade.
    Running test suite input_charset.
    Skipped test suite nvcc [nvcc is not available]
    Skipped test suite nvcc_direct [nvcc is not available]
    Skipped test suite nvcc_ldir [nvcc is not available]
    Skipped test suite nvcc_nocpp2 [nvcc is not available]
    PASSED
    
    
  15. added this to the 3.8 milestone on Jul 28, 2019
  16. afbjorklund commented on Jul 28, 2019

    @afbjorklund
    ContributorAuthor

    Confirmed that the new master runs the tests OK, on Windows 7 MSYS2.

    When building from git, the current workaround is doing:

    dos2unix src/*.gperf

    Can do a small PR, in order to remove any '\r' characters...

  17. Kreijstal commented on Mar 10, 2024

    @Kreijstal
    Contributor

    #1412 this happened again on master branch, by this I mean the MSYS2 enviroment, (not the MINGW/UCRT) one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedissue: bugissue: portability

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions