1. 03 May, 2018 2 commits
    • niteria's avatar
      Correctly add unwinding info in manifestSp and makeFixupBlocks · 6132d7c5
      niteria authored
      In `manifestSp` the unwind info was before the relevant instruction, not
      after.  I added some notes to establish semantics.  Also removes
      redundant annotation in stg_catch_frame.
      
      For `makeFixupBlocks` it looks like we were off by `wORD_SIZE dflags`.
      I'm not sure why, but it lines up with `manifestSp`.  In fact it lines
      up so well so that I can consolidate the Sp unwind logic in
      `maybeAddUnwind`.  I detected the problems with `makeFixupBlocks` by
      running T14779b after patching D4559.
      
      Test Plan: added a new test
      
      Reviewers: bgamari, scpmw, simonmar, erikd
      
      Reviewed By: bgamari
      
      Subscribers: thomie, carter
      
      GHC Trac Issues: #14999
      
      Differential Revision: https://phabricator.haskell.org/D4606
      6132d7c5
    • Matthew Pickering's avatar
      Don't shadow "result" in JUnit driver · 107d2cb7
      Matthew Pickering authored
      Reviewers: bgamari
      
      Reviewed By: bgamari
      
      Subscribers: thomie, carter
      
      GHC Trac Issues: #15093
      
      Differential Revision: https://phabricator.haskell.org/D4645
      107d2cb7
  2. 31 Mar, 2018 1 commit
  3. 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
      27b7b4db
  4. 18 Dec, 2017 1 commit
  5. 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.
      abd5db60
  6. 12 Sep, 2017 1 commit
  7. 05 Sep, 2017 1 commit
  8. 28 Jul, 2017 3 commits
  9. 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
      c9c762dc
  10. 11 Jul, 2017 2 commits
  11. 12 May, 2017 1 commit
  12. 24 Apr, 2017 1 commit
  13. 03 Apr, 2017 2 commits
  14. 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
      6421c6f2
  15. 26 Feb, 2017 4 commits
  16. 23 Feb, 2017 1 commit
  17. 17 Feb, 2017 2 commits
    • Edward Z. Yang's avatar
      Fix recompilation tracking on signatures. · 22dba98f
      Edward Z. Yang authored
      Summary:
      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
      22dba98f
    • Edward Z. Yang's avatar
      Fix a Backpack recompilation avoidance bug when signatures change. · ca543154
      Edward Z. Yang authored
      Summary:
      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
      ca543154
  18. 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
      da493897
  19. 28 Jan, 2017 1 commit
    • Tamar Christina's avatar
      Add delete retry loop. [ci skip] · 1f366b8d
      Tamar Christina authored
      Summary:
      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
      http://www.sqlite.org/src/info/89f1848d7f
      
      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
      1f366b8d
  20. 26 Jan, 2017 1 commit
    • Alan Zimmerman's avatar
      Make type import/export API Annotation friendly · 0d1cb157
      Alan Zimmerman authored
      Summary:
      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
      0d1cb157
  21. 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
      f9ccad23
  22. 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
      38f289fa
  23. 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
      35a5b603
  24. 28 Dec, 2016 1 commit
    • Tamar Christina's avatar
      Fix various issues with testsuite code on Windows · a3704409
      Tamar Christina authored
      Summary:
      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
      a3704409
  25. 22 Dec, 2016 1 commit
  26. 21 Dec, 2016 3 commits
    • Edward Z. Yang's avatar
      Support for abi-depends for computing shadowing. · ee4e1654
      Edward Z. Yang authored
      Summary:
      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
      ee4e1654
    • Gabor Greif's avatar
      Fix typos (not test relevant) · 1771da25
      Gabor Greif authored
      1771da25
    • 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
      368
      9a29b65b
  27. 18 Dec, 2016 1 commit
  28. 13 Dec, 2016 1 commit
  29. 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
      ca593c7d