1. 20 Oct, 2015 1 commit
    • thomie's avatar
      Testsuite Windows: don't use forward slashes in topdir path · ae4acbd1
      thomie authored
      Changing backwards slashes to forward slashes apparently confuses
      msys2/mingw magic path handling. I don't quite understand why, but this
      fixes it.
      Test Plan: on Windows, make sure PATH does not contain
      'inplace/mingw/bin' (let the testsuite driver add it), then run: make
      TEST='ghcilink003 ghcilink006'. Before this patch, it would fail.
      Reviewed by: Phyx, bgamari, austin
      Differential Revision: https://phabricator.haskell.org/D1343
  2. 03 Oct, 2015 1 commit
    • Tamar Christina's avatar
      Make Windows linker more robust to unknown sections · 620fc6f9
      Tamar Christina authored
      The Windows Linker has 3 main parts that this patch changes.
      1) Identification and classification of sections
      2) Adding of symbols to the symbols tables
      3) Reallocation of sections
      Previously section identification used to be done on a whitelisted
      basis. It was also exclusively being done based on the names of the
      sections. This meant that there was a bit of a cat and mouse game
      between `GCC` and `GHC`. Every time `GCC` added new sections there was a
      good chance `GHC` would break. Luckily this hasn't happened much in the
      past because the `GCC` versions `GHC` used were largely unchanged.
      The new code instead treats all new section as `CODE` or `DATA`
      sections, and changes the classifications based on the `Characteristics`
      flag in the PE header. By doing so we no longer have the fragility of
      changing section names. The one exception to this is the `.ctors`
      section, which has no differentiating flag in the PE header, but we know
      we need to treat it as initialization data.
      The check to see if the sections are aligned by `4` has been removed.
      The reason is that debug sections often time are `1 aligned` but do have
      relocation symbols. In order to support relocations of `.debug` sections
      this check needs to be gone. Crucially this assumption doesn't seem to
      be in the rest of the code. We only check if there are at least 4 bytes
      to realign further down the road.
      The second loop is iterating of all the symbols in the file and trying
      to add them to the symbols table. Because the classification of the
      sections we did previously are (currently) not available in this phase
      we still have to exclude the sections by hand. If they don't we will
      load in symbols from sections we've explicitly ignored the in # 1. This
      whole part should rewritten to avoid this. But didn't want to do it in
      this commit.
      Finally the sections are relocated. But for some reason the PE files
      contain a Linux relocation constant in them `0x0011` This constant as
      far as I can tell does not come from GHC (or I couldn't find where it's
      being set). I believe this is probably a bug in GAS. But because the
      constant is in the output we have to handle it. I am thus mapping it to
      the constant I think it should be `0x0003`.
      Finally, static linking *should* work, but won't. At least not if you
      want to statically link `libgcc` with exceptions support. Doing so would
      require you to link `libgcc` and `libstd++` but also `libmingwex`. The
      problem is that `libmingwex` also defines a lot of symbols that the RTS
      automatically injects into the symbol table. Presumably because they're
      symbols that it needs. like `coshf`. The these symbols are not in a
      section that is declared with weak symbols support. So if we ever want
      to get this working, we should either a) Ask mingw to declare the
      section as such, or b) treat all a imported symbols as being weak.
      Though this doesn't seem like it's a good idea..
      Test Plan:
      Running ./validate for both x86 and x86_64
      Also running the specific test case for #10672
      make TESTS="T10672_x86 T10672_x64"
      Reviewed By: ezyang, thomie, austin
      Differential Revision: https://phabricator.haskell.org/D1244
      GHC Trac Issues: #9907, #10672, #10563
  3. 11 Jun, 2015 1 commit
  4. 04 Jun, 2015 1 commit
    • thomie's avatar
      Make validate more quiet · d0063e89
      thomie authored
        * By default use V=0, and call the testsuite with VERBOSE=2, which we
          did before only with validate --quiet. This disables printing the
          test commands it runs.
        * When --quiet is used, call the testsuite with VERBOSE=1. This
          disables printing the '====> Scanning' lines, and doesn't print
          which test is being run. So it only prints something when a test
          accidentally prints to stdout or when it fails.
          Don't set this option on Travis, as Travis will cancel a build if it
          doesn't see any output for more than 10 minutes.
        * When --quiet is used, set the new test option NO_PRINT_SUMMARY,
          which skips printing the test summary. Only the list of unexpected
          failures is printed, if there are any. Note that the full summary
          can still be found in testsuite_summary.txt
        * When --quiet is used, don't pass the `-v` flag to `ghc-pkg check`
        * When --quiet is used, don't print the Oops! header. It shoud be
          clear from the list of failing tests that something is wrong.
      This is all done to get the most out of 30 lines of logfile. These changes can
      be disabled later by simply not passing the --quiet flag to validate.
      Differential Revision: https://phabricator.haskell.org/D942
  5. 28 May, 2015 2 commits
    • thomie's avatar
      Testdriver: do not interfer with MinGW path magic (#10449) · ce166a3a
      thomie authored
      This should fix the testsuite driver on Windows using the MinGW tools
      with a native build of Python.
      MinGW automagically converts MinGW-style paths (e.g.
      '/c/programs/ghc/bin/ghc') into ordinary Windows paths (e.g.
      'C:/programs/ghc/bin/ghc') when a native Windows program is invoked. But
      it doesn't do so when those paths are wrapped with a pair of escaped
      double quotes.
      The fix is to not call `eval` on the paths in Python, which let's us use
      one less pair of quotes, and makes MinGW happy.
      Reviewers: Rufflewind, austin
      Differential Revision: https://phabricator.haskell.org/D911
    • Rufflewind's avatar
      Testdriver: don't use os.popen in config/ghc · ef904660
      Rufflewind authored
      Rewrite config/ghc to use getStdout (which use subprocess.Popen) instead
      of os.popen, which is deprecated; this also avoids the use of shell
      * Move getStdout to driver/testutil.py so both config/ghc and
        driver/runtests.py can use it
      * Remove support for Python below 2.4, which doesn't have subprocess
      Reviewed By: thomie
      Differential Revision: https://phabricator.haskell.org/D908
  6. 19 Oct, 2014 1 commit
    • Krzysztof Gogolewski's avatar
      Python 3 support, second attempt (Trac #9184) · d576fc38
      Krzysztof Gogolewski authored
      This is a fixup of https://phabricator.haskell.org/D233
      The only difference is in findTFiles (first commit), which
      previously broke Windows runner; now I translated literally
      instead attempting to improve it, and checked it works.
      Test Plan:
      I used validate under 2,3 on Linux and under 2 on msys2.
      On Windows I've seen a large number of failures, but they don't
      seem to be connected with the patch.
      Reviewers: hvr, simonmar, thomie, austin
      Reviewed By: austin
      Subscribers: thomie, carter, ezyang, simonmar
      Differential Revision: https://phabricator.haskell.org/D310
      GHC Trac Issues: #9184
  7. 11 Oct, 2014 2 commits
    • gintas's avatar
      Extend windows detection in testsuite to recognize MSYS target · 034b2035
      gintas authored
      Currently, the detection recognizes the following `uname -s` strings:
       - `CYGWIN_NT-6.3`
       - `MINGW32_NT-6.3`
       - `MINGW64_NT_6.3`
      However, MSYS2 provides an additional target, in which case `uname -s`
      returns a string such as `MSYS_NT-6.3`. In all these cases, the system
      ought to be recognized as being a `windows` os by the testsuite runner.
      See also #9604
    • gintas's avatar
      Fallback to `ctypes.cdll` if `ctypes.windll` unavailable · 1032554a
      gintas authored
      On Windows, we may be using a native build of Python or a mingw/msys build. The
      former exports `ctypes.windll`, the latter exports `cdll`. Previously the code
      threw an exception when using the msys Python because it expected `windll` to
      always be available on Windows.
      Differential Revision: https://phabricator.haskell.org/D308
  8. 03 Oct, 2014 1 commit
  9. 01 Oct, 2014 1 commit
    • Krzysztof Gogolewski's avatar
      Basic Python 3 support for testsuite driver (Trac #9184) · 084d241b
      Krzysztof Gogolewski authored
      Most of the changes is adaptation of old Python 2 only code.
      My priority was not breaking Python 2, and so I avoided bigger
      changes to the driver. In particular, under Python 3 the output
      is a str and buffering cannot be disabled.
      To test, define PYTHON=python3 in testsuite/mk/boilerplate.mk.
      Thanks to aspidites <emarshall85@gmail.com> who provided the initial patch.
      Test Plan: validate under 2 and 3
      Reviewers: hvr, simonmar, thomie, austin
      Reviewed By: thomie, austin
      Subscribers: aspidites, thomie, simonmar, ezyang, carter
      Differential Revision: https://phabricator.haskell.org/D233
      GHC Trac Issues: #9184
  10. 01 Sep, 2014 2 commits
  11. 14 Jul, 2014 1 commit
  12. 12 Nov, 2013 1 commit
  13. 05 Oct, 2013 1 commit
  14. 20 Sep, 2013 2 commits
  15. 11 Feb, 2013 3 commits
  16. 07 Feb, 2013 1 commit
    • ian@well-typed.com's avatar
      Pass the test name to the test options · effc8af9
      ian@well-typed.com authored
      This allows them to give framework failures.
      I also had to change how setTestOpts works. Now, rather than applying
      the options to the directory's "default options", it just stores the
      options to be applied for each test (i.e. once we know the test name).
  17. 02 Feb, 2013 1 commit
  18. 25 Jan, 2013 1 commit
  19. 24 Jan, 2013 1 commit
  20. 11 Oct, 2012 1 commit
  21. 22 May, 2012 1 commit
  22. 01 May, 2012 1 commit
  23. 06 Mar, 2012 1 commit
  24. 15 Nov, 2011 1 commit
  25. 05 Oct, 2011 1 commit
  26. 07 Aug, 2011 1 commit
    • Ian Lynagh's avatar
      Add support for checking whether files are written by more than one test · 5f12b5e3
      Ian Lynagh authored
      Work in progress, but largely works. Known issues:
      * only supported when using the timeout program
      * 'test.strace' files aren't cleaned, as they end up in the root
        directory rather than the test's directory
      * Doesn't yet track what the current directory is, so finds several
        files like "A.o" being written by multiple tests (and conversely,
        may be missing writes to the same file from different directories)
      * Lots of tests write to $HOME/.ghc/ghci_history. We should probably
        be passing ghci a flag to stop this from happening.
      * Some .strace lines aren't understood yet, causing framework failures
      * One .strace file can cause muiltiple framework failures, if it
        contains lots of lines that aren't understood
      Threads       fast testsuite time     fast testsuite time with checks
      1             16:36.14                25:16.07
      5              5:33.95                 8:04.05
  27. 23 Jun, 2011 1 commit
    • Ian Lynagh's avatar
      Expect 4006 to fail on msys · cbc8f104
      Ian Lynagh authored
      In the 65001 codepage, we can't even cat the expected output on msys:
      $ cat 4006.stdout
      It works here
      cat: write error: Permission denied
  28. 15 Sep, 2010 1 commit
  29. 18 May, 2010 1 commit
  30. 03 May, 2010 2 commits
  31. 12 Apr, 2010 1 commit
    • Ian Lynagh's avatar
      Fix running the testsuite on msys · 729c9963
      Ian Lynagh authored
      I'm not entirely sure if the cygwin code is actually right (i.e. I'm
      not sure what calling convention it uses), but it seems to work.
  32. 19 Mar, 2010 1 commit
  33. 28 Nov, 2009 1 commit