1. 31 Mar, 2018 1 commit
  2. 02 Jan, 2018 1 commit
    • Tamar Christina's avatar
      Windows: fix all failing tests. · 27b7b4db
      Tamar Christina authored
      This makes the testsuite pass clean on Windows again.
      It also fixes the `libstdc++-6.dll` error harbormaster
      was showing.
      I'm marking some tests as isolated tests to reduce their
      flakiness (mostly concurrency tests) when the test system
      is under heavy load.
      Updates process submodule.
      Test Plan: ./validate
      Reviewers: hvr, bgamari, erikd, simonmar
      Reviewed By: bgamari
      Subscribers: rwbarton, thomie, carter
      Differential Revision: https://phabricator.haskell.org/D4277
  3. 18 Dec, 2017 1 commit
  4. 11 Dec, 2017 1 commit
    • Gabor Greif's avatar
      Only look for locales of the form LL.VV · abd5db60
      Gabor Greif authored
      Because in recent RHEL7 suddenly locales like `bokmål` pop up, which
      screw up reading-in of ASCII strings a line later. This additional
      criterion reliably eliminates those unicode characters.
  5. 12 Sep, 2017 1 commit
  6. 05 Sep, 2017 1 commit
  7. 28 Jul, 2017 3 commits
  8. 20 Jul, 2017 1 commit
    • Ben Gamari's avatar
      testsuite: Pipe stdin directly to process · c9c762dc
      Ben Gamari authored
      Previously the driver would read the stdin content from the source file
      and then write it to the subprocess' stdin. We now simply open the stdin
      file and provide that handle to the subprocess as its stdin
      Test Plan: Validate
      Reviewers: austin
      Subscribers: rwbarton, thomie, goldfire
      Differential Revision: https://phabricator.haskell.org/D3735
  9. 11 Jul, 2017 2 commits
  10. 12 May, 2017 1 commit
  11. 24 Apr, 2017 1 commit
  12. 03 Apr, 2017 2 commits
  13. 03 Mar, 2017 1 commit
    • rwbarton's avatar
      testsuite: Move echoing commands in make invocations to VERBOSE=5 · 6421c6f2
      rwbarton authored
      D2894 added a new verbosity level VERBOSE=4 to strip -s/--silent
      flags from make invocations in test commands. This will probably
      cause the test to fail of course, but is useful for seeing what
      a test that's already failing is doing.
      However there was already an undocumented meaning of VERBOSE=4,
      added in commit cfeededf, that causes the results of performance
      tests to be printed unconditionally (even when they are within the
      expected range). nomeata's ghc builder uses these figures to
      collect historical data on performance test figures. The new
      meaning of VERBOSE=4 added in D2894 means that any test that uses
      make now fails on the builder.
      This commit moves the new behavior of D2894 to the level VERBOSE=5
      so that nomeata's ghc builder again produces useful results on
      failing tests. It also adds documentation for both settings.
      Test Plan: did some manual testing
      Reviewers: austin, bgamari, Phyx, nomeata
      Reviewed By: bgamari, Phyx
      Subscribers: nomeata, thomie, Phyx
      Differential Revision: https://phabricator.haskell.org/D3141
  14. 26 Feb, 2017 4 commits
  15. 23 Feb, 2017 1 commit
  16. 17 Feb, 2017 2 commits
    • Edward Z. Yang's avatar
      Fix recompilation tracking on signatures. · 22dba98f
      Edward Z. Yang authored
      Previously we weren't tracking these dependencies at all,
      because we couldn't "find" the interface for {A.H}.  Now
      we've associated hole names to the correct module identity
      so we will pick them up.
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      Test Plan: validate
      Reviewers: bgamari, austin
      Subscribers: thomie, snowleopard
      Differential Revision: https://phabricator.haskell.org/D3131
    • Edward Z. Yang's avatar
      Fix a Backpack recompilation avoidance bug when signatures change. · ca543154
      Edward Z. Yang authored
      Recompilation avoidance checks if -this-unit-id has changed by relying
      on the "wanted module" check in readIface ("Something is amiss...").
      Unfortunately, this check didn't check if the instantiation made
      sense, which meant that if you changed the signatures of a Backpack
      package, we'd still treat the old signatures as up-to-date.
      The way I fixed this was by having findAndReadIface take in a 'Module'
      representing the /actual/ module we were intending to lookup.  We
      convert this into the 'Module' we expect to see in 'mi_module' and
      now do a more elaborate check that will also verify that instantiations
      make sense.
      Along the way, I robustified the logging infrastructure for
      recompilation checking, and folded wrongIfaceModErr (which
      was dead code) into the error message.
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      Test Plan: validate
      Reviewers: bgamari, austin
      Subscribers: thomie, snowleopard
      Differential Revision: https://phabricator.haskell.org/D3130
  17. 14 Feb, 2017 1 commit
    • Adam Gundry's avatar
      Implement HasField constraint solving and modify OverloadedLabels · da493897
      Adam Gundry authored
      This implements automatic constraint solving for the new HasField class
      and modifies the existing OverloadedLabels extension, as described in
      the GHC proposal
      (https://github.com/ghc-proposals/ghc-proposals/pull/6). Per the current
      form of the proposal, it does *not* currently introduce a separate
      `OverloadedRecordFields` extension.
      This replaces D1687.
      The users guide documentation still needs to be written, but I'll do
      that after the implementation is merged, in case there are further
      design changes.
      Test Plan: new and modified tests in overloadedrecflds
      Reviewers: simonpj, goldfire, dfeuer, bgamari, austin, hvr
      Reviewed By: bgamari
      Subscribers: maninalift, dfeuer, ysangkok, thomie, mpickering
      Differential Revision: https://phabricator.haskell.org/D2708
  18. 28 Jan, 2017 1 commit
    • Tamar Christina's avatar
      Add delete retry loop. [ci skip] · 1f366b8d
      Tamar Christina authored
      On Windows we have to retry the delete a couple of times.
      The reason for this is that a `FileDelete` command just marks a
      file for deletion. The file is really only removed when the last
      handle to the file is closed. Unfortunately there are a lot of
      system services that can have a file temporarily opened using a shared
      readonly lock, such as the built in AV and search indexer.
      We can't really guarantee that these are all off, so what we can do is
      whenever after a `rmtree` the folder still exists to try again and wait a bit.
      Based on what I've seen from the tests on CI server, is that this is relatively rare.
      So overall we won't be retrying a lot. If after a reasonable amount of time the folder is
      still locked then abort the current test by throwing an exception, this so it won't fail
      with an even more cryptic error.
      The issue is that these services often open a file using `FILE_SHARE_DELETE` permissions.
      So they can seemingly be removed, and for most intended purposes they are, but recreating
      the file with the same name will fail as the FS will prevent data loss.
      The MSDN docs for `DeleteFile` says:
      The DeleteFile function marks a file for deletion on close.
      Therefore, the file deletion does not occur until the last handle
      to the file is closed. Subsequent calls to CreateFile to open the
      file fail with ERROR_ACCESS_DENIED.
      Retrying seems to be a common pattern, SQLite has it in their driver
      The only way to avoid this is to run each way of a test in it's own folder.
      This would also have the added bonus of increased parallelism.
      Reviewers: austin, bgamari
      Reviewed By: bgamari
      Subscribers: thomie, #ghc_windows_task_force
      Differential Revision: https://phabricator.haskell.org/D2936
      GHC Trac Issues: #12661, #13162
  19. 26 Jan, 2017 1 commit
    • Alan Zimmerman's avatar
      Make type import/export API Annotation friendly · 0d1cb157
      Alan Zimmerman authored
      At the moment an export of the form
         type C(..)
      is parsed by the rule
        |  'type' oqtycon           {% amms (mkTypeImpExp (sLL $1 $> (unLoc $2)))
                                           [mj AnnType $1,mj AnnVal $2] }
      This means that the origiinal oqtycon loses its location which is then retained
      in the AnnVal annotation.
      The problem is if the oqtycon has its own annotations, these get lost.
      e.g. in
        type (?)(..)
      the parens annotations for (?) get lost.
      This patch adds a wrapper around the name in the IE type to
      (a) provide a distinct location for the adornment annotation and
      (b) identify the specific adornment, for use in the pretty printer rather than
      occName magic.
      Updates haddock submodule
      Test Plan: ./validate
      Reviewers: mpickering, dfeuer, bgamari, austin
      Reviewed By: dfeuer
      Subscribers: dfeuer, thomie, mpickering
      Differential Revision: https://phabricator.haskell.org/D3016
      GHC Trac Issues: #13163
  20. 21 Jan, 2017 1 commit
    • niteria's avatar
      Always use -Xlinker for -rpath · f9ccad23
      niteria authored
      Currently we use `-Wl` which takes a list of
      comma-separated options. Unfortunately that
      breaks when you use it with `-rpath` and
      a path that has commas in them.
      Buck, the build system, produces paths with
      commas in them.
      `-Xlinker` doesn't have this disadvantage
      and as far as I can tell is supported by
      both `gcc` and `clang`. Anecdotally `nvcc`
      supports `-Xlinker`, but not `-Wl`.
      Test Plan: ./validate, harbourmaster
      Reviewers: nomeata, simonmar, austin, bgamari, hvr
      Reviewed By: simonmar, bgamari
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D2971
  21. 17 Jan, 2017 1 commit
    • Alan Zimmerman's avatar
      Fix API Annotations for unboxed sums · 38f289fa
      Alan Zimmerman authored
      An unboxed tuple such as
          (# | b | | | | | #)
      Ends up in the parser via `tup_exprs` as
          Sum 2 7 lexp
      where `lexp` is a `LHsExpr`
      From an API annotation perspective, the 5 `AnnVbar`s after the `b` were attached
      to `lexp`, but the leading `AnnVbar`s did not have a home.
      This patch attaches them all to the the parent tuple expression. The first (alt
      - 1) of them come before `lexp`, and the remaining (arity - alt) come after.
      Test Plan: ./validate
      Reviewers: osa1, austin, bgamari
      Subscribers: thomie, mpickering
      Differential Revision: https://phabricator.haskell.org/D2968
      GHC Trac Issues: #12417
  22. 10 Jan, 2017 1 commit
    • rwbarton's avatar
      testsuite driver: don't append to existing output files · 35a5b603
      rwbarton authored
      If you happen to have a T1234.run.stdout file lying aroud (probably
      from before the move to running tests in temporary subdirectories)
      it gets symlinked into the T1234.run directory since its name starts
      with T1234; and then program output gets appended to the existing
      file (through the symlink). We should open the file for writing
      instead, to replace the symlink with a new file.
      Test Plan: tested locally, + harbormaster
      Reviewers: austin, Phyx, bgamari
      Reviewed By: Phyx, bgamari
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D2946
  23. 28 Dec, 2016 1 commit
    • Tamar Christina's avatar
      Fix various issues with testsuite code on Windows · a3704409
      Tamar Christina authored
      Previously we would make direct calls to `diff` using `os.system`.
      On Windows `os.system` is implemented using the standard
      idiom `CreateProcess .. WaitForSingleObject ..`.
      This again runs afoul with the `_exec` behaviour on Windows. So we ran
      into some trouble where sometimes `diff` would return before it's done.
      On tests which run multiple ways, such as `8086` what happens is that
      we think the diff is done and continue. The next way tries to set things
      up again by removing any previous directory. This would then fail with
      and error saying the directory can't be removed. Which is true, because
      the previous diff code/child is still running.
      We shouldn't make any external calls to anything using `os.system`.
      Instead just use `runCmd` which uses `timeout`. This also ensures that if
      we hit the cygwin bug where diff or any other utility hangs, we kill it and
      continue and not hang the entire test and leave hanging processes.
      Further more we also:
      Ignore error lines from `removeFile` from tools in the testsuite. This is a rather large
      hammer to work around the fact that `hsc2hs` often tries to remove it's own file too early.
      When this is patched the workaround can be removed. See Trac #9775
      We mark `prog003` as skip. Since this test randomly fails and passes. For stability it's disabled
      but it is a genuine bug which we should find. It's something with interface files being
      overwritten. See Trac #11317
      when `rmtree` hits a readonly file, the `onerror` handler is raised afterwards but not
      during the tree walk. It doesn't allow you to recover and continue as we thought.
      Instead you have to explicitly start again. This is why sometimes even though we
      call `cleanup` before `os.mkdirs`, it would sometimes fail with an error that the
      folder already exists. So we now do a second walk.
      A new verbosity level (4) will strip the silent flags from `MAKE` invocations so you can actually
      see what's going on.
      Test Plan: ./validate on build bots.
      Reviewers: bgamari, austin
      Reviewed By: bgamari
      Subscribers: mpickering, thomie, #ghc_windows_task_force
      Differential Revision: https://phabricator.haskell.org/D2894
      GHC Trac Issues: #12661, #11317, #9775
  24. 22 Dec, 2016 1 commit
  25. 21 Dec, 2016 3 commits
    • Edward Z. Yang's avatar
      Support for abi-depends for computing shadowing. · ee4e1654
      Edward Z. Yang authored
      This is a complete fix based off of
      ed7af26606b3a605a4511065ca1a43b1c0f3b51d for handling
      shadowing and out-of-order -package-db flags simultaneously.
      The general strategy is we first put all databases together,
      overriding packages as necessary.  Once this is done, we successfully
      prune out broken packages, including packages which depend on a package
      whose ABI differs from the ABI we need.
      Our check gracefully degrades in the absence of abi-depends, as
      we only check deps which are recorded in abi-depends.
      Contains time and Cabal submodule update.
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      Test Plan: validate
      Reviewers: niteria, austin, bgamari
      Subscribers: thomie
      Differential Revision: https://phabricator.haskell.org/D2846
      GHC Trac Issues: #12485
    • Gabor Greif's avatar
      Fix typos (not test relevant) · 1771da25
      Gabor Greif authored
    • Gabor Greif's avatar
      Suppress duplicate .T files · 9a29b65b
      Gabor Greif authored
      As per http://stackoverflow.com/questions/7961363/removing-duplicates-in-lists
      use the set() function to zap duplicates from the obtained list of .T files.
      I am using
      $ python3 --version
      Python 3.5.1
      and strangely findTFiles() returns some .T files twice:
      -- BEFORE
      Found 376 .T files...
      ====> Scanning ../../libraries/array/tests/all.T
      ====> Scanning ../../libraries/array/tests/all.T
      *** framework failure for T2120(duplicate) There are multiple tests with this name
      *** framework failure for largeArray(duplicate) There are multiple tests with this name
      *** framework failure for array001(duplicate) There are multiple tests with this name
      *** framework failure for T9220(duplicate) There are multiple tests with this name
      *** framework failure for T229(duplicate) There are multiple tests with this name
      -- AFTER
      Found 365 .T files...
      ====> Scanning ../../libraries/array/tests/all.T
      Even more strangely 'find' begs to differ:
      $ find libraries testsuite/tests -name "*.T" | sort | uniq | wc -l
  26. 18 Dec, 2016 1 commit
  27. 13 Dec, 2016 1 commit
  28. 09 Dec, 2016 1 commit
    • Rufflewind's avatar
      testsuite: make tests respond to SIGINT properly · ca593c7d
      Rufflewind authored
      The `std*_buffer` need to be bytes to avoid breaking Python 3.
      Also, using a blanket `except` in Python without specifying the
      exception types will catch special exceptions such as
      `KeyboardInterrupt`, which can prevent the program from being
      interrupted properly.
      Test Plan: validate
      Reviewers: thomie, austin, bgamari
      Reviewed By: bgamari
      Differential Revision: https://phabricator.haskell.org/D2805
  29. 01 Dec, 2016 1 commit
  30. 30 Nov, 2016 1 commit
    • Ben Gamari's avatar
      testsuite: Use python3 by default · 605bb9b4
      Ben Gamari authored
      It turns out that Phyx's fix for #12554 (D2684) still fails with mingw-w64
      python 2.7. However, Python 3 (both msys2 and mingw-w64) work fine. Given that
      supporting Python 2 has already become rather tiresome (as @thomie warned it
      would), let's just move to python3 by default.
      Test Plan: Validate
      Reviewers: austin, Phyx
      Reviewed By: Phyx
      Subscribers: Phyx, thomie
      Differential Revision: https://phabricator.haskell.org/D2766
      GHC Trac Issues: #12554