1. 30 Apr, 2016 1 commit
  2. 28 Apr, 2016 1 commit
  3. 25 Mar, 2016 1 commit
  4. 29 Feb, 2016 1 commit
    • thomie's avatar
      Testsuite: check actual_prof_file only when needed · e3b9dbf4
      thomie authored
      Might be a little faster. Avoids testing for #6113 (.prof file not
      written when process is killed with any signal but SIGINT) for tests
      that don't have a .prof.sample file (which is almost all of them) when
      running the profiling ways.
      Tests that were failing because of #6113: T8089, overflow1, overflow2 and
      overflow3.
      e3b9dbf4
  5. 25 Feb, 2016 1 commit
  6. 23 Feb, 2016 1 commit
  7. 17 Feb, 2016 1 commit
  8. 16 Feb, 2016 1 commit
  9. 01 Feb, 2016 1 commit
    • Eric Seidel's avatar
      Hide the CallStack implicit parameter · 94048f9f
      Eric Seidel authored
      The implicit parameter isn't actually very relevant to the CallStack
      machinery, so we hide the implementation details behind a constraint
      alias
      
      ```
      type HasCallStack = (?callStack :: CallStack)
      ```
      
      This has a few benefits:
      
      1. No need to enable `ImplicitParams` in user code.
      2. No need to remember the `?callStack` naming convention.
      3. Gives us the option to change the implementation details in the
      future with less user-land breakage.
      
      The revised `CallStack` API is exported from `GHC.Stack` and makes no
      mention of the implicit parameter.
      
      Test Plan: ./validate
      
      Reviewers: simonpj, austin, hvr, bgamari
      
      Reviewed By: simonpj, bgamari
      
      Subscribers: thomie
      
      Projects: #ghc
      
      Differential Revision: https://phabricator.haskell.org/D1818
      94048f9f
  10. 27 Jan, 2016 1 commit
    • thomie's avatar
      Testsuite: fixup req_profiling tests (#11496) · eeb67c9b
      thomie authored
      * T2552 (#10037) is failng for all threaded opt_ways, not for WAY=prof.
      * TH_spliceE5_prof (#11495) is failing when ghc_dynamic
      * Rename ghci_dynamic to ghc_dynamic. It's the same thing.
      eeb67c9b
  11. 29 Dec, 2015 2 commits
  12. 24 Dec, 2015 2 commits
    • thomie's avatar
      Don't drop last char of file if -osuf contains dot · 48db13d2
      thomie authored
      Given:
       * `file = "foo.a.b"`
       * `osuf = ".a.b"`  -- Note the initial dot.
       * `new_osuf = "c"`
      
      Before (bad, the last character of the filename is dropped):
        `dropTail (length osuf + 1) file <.> new_osuf == "fo.c"`
      After (good):
        `stripExtension osuf file <.> new_osuf` == "foo.c"
      
      This regression was introduced in commit c489af73 (#5554). That commit
      fixed a similar but different bug, and care has been taken to not
      reintroduce it (using the the newly introduced
      `System.Filepath.stripExtension`).
      
      Given:
       * `file = "foo.a.b"`
       * `osuf = "a.b"`
       * `new_osuf = "c"`
      
      Before c489af73 (bad, the full suffix should get replaced):
        `replaceExtension file new_osuf == "foo.a.c"`
      After c489af73 (good):
        `dropTail (length osuf + 1) file <.> new_osuf == "foo.c"`
      After this commit (still good):
        `stripExtension osuf file <.> new_osuf == "foo.c"`
      
      Reviewed by: bgamari
      
      Differential Revision: https://phabricator.haskell.org/D1692
      
      GHC Trac Issues: #9760
      48db13d2
    • Erik de Castro Lopo's avatar
      Fix normalisation of TyCon representations · e3383767
      Erik de Castro Lopo authored
      Test Plan: run tests on powerpc and x86_64
      
      Reviewers: hvr, austin, thomie, bgamari
      
      Reviewed By: thomie, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1694
      e3383767
  13. 23 Dec, 2015 1 commit
  14. 17 Dec, 2015 2 commits
    • Ben Gamari's avatar
      TcTypeable: Don't use bogus fingerprints when suppress-uniques is enabled · 786d528e
      Ben Gamari authored
      Previously the Typeable implementation would intentionally create TyCon
      representations with bogus fingerprints to avoid fingerprints (which may
      change often) from leaking into test output. As pointed out by Richard
      in #10376 this is very bad as simply enabling a debug flag,
      `-dsuppress-uniques`, completely breaks the soundness of `Typeable`!
      
      This patch removes this behavior and replaces it with logic in the
      testsuite driver to filter out spurious changes due to Typeable
      representations.
      
      Test Plan: Validate
      
      Reviewers: austin, simonpj, goldfire
      
      Reviewed By: goldfire
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1629
      
      GHC Trac Issues: #10376
      786d528e
    • Simon Marlow's avatar
      Remote GHCi, -fexternal-interpreter · 4905b83a
      Simon Marlow authored
      Summary:
      (Apologies for the size of this patch, I couldn't make a smaller one
      that was validate-clean and also made sense independently)
      
      (Some of this code is derived from GHCJS.)
      
      This commit adds support for running interpreted code (for GHCi and
      TemplateHaskell) in a separate process.  The functionality is
      experimental, so for now it is off by default and enabled by the flag
      -fexternal-interpreter.
      
      Reaosns we want this:
      
      * compiling Template Haskell code with -prof does not require
        building the code without -prof first
      
      * when GHC itself is profiled, it can interpret unprofiled code, and
        the same applies to dynamic linking.  We would no longer need to
        force -dynamic-too with TemplateHaskell, and we can load ordinary
        objects into a dynamically-linked GHCi (and vice versa).
      
      * An unprofiled GHCi can load and run profiled code, which means it
        can use the stack-trace functionality provided by profiling without
        taking the performance hit on the compiler that profiling would
        entail.
      
      Amongst other things; see
      https://ghc.haskell.org/trac/ghc/wiki/RemoteGHCi for more details.
      
      Notes on the implementation are in Note [Remote GHCi] in the new
      module compiler/ghci/GHCi.hs.  It probably needs more documenting,
      feel free to suggest things I could elaborate on.
      
      Things that are not currently implemented for -fexternal-interpreter:
      
      * The GHCi debugger
      * :set prog, :set args in GHCi
      * `recover` in Template Haskell
      * Redirecting stdin/stdout for the external process
      
      These are all doable, I just wanted to get to a working validate-clean
      patch first.
      
      I also haven't done any benchmarking yet.  I expect there to be slight hit
      to link times for byte code and some penalty due to having to
      serialize/deserialize TH syntax, but I don't expect it to be a serious
      problem.  There's also lots of low-hanging fruit in the byte code
      generator/linker that we could exploit to speed things up.
      
      Test Plan:
      * validate
      * I've run parts of the test suite with
      EXTRA_HC_OPTS=-fexternal-interpreter, notably tests/ghci and tests/th.
      There are a few failures due to the things not currently implemented
      (see above).
      
      Reviewers: simonpj, goldfire, ezyang, austin, alanz, hvr, niteria, bgamari, gibiansky, luite
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1562
      4905b83a
  15. 24 Nov, 2015 1 commit
    • elaforge's avatar
      Rearrange error msgs and add section markers (Trac #11014). · c05fddde
      elaforge authored
      This puts the "Relevant bindings" section at the end.
      
      It uses a TcErrors.Report Monoid to divide messages by importance and
      then mappends them together.  This is not the most efficient way since
      there are various intermediate Reports and list appends, but it probably
      doesn't matter since error messages shouldn't get that large, and are
      usually prepended.  In practice, everything is `important` except
      `relevantBindings`, which is `supplementary`.
      
      ErrMsg's errMsgShortDoc and errMsgExtraInfo were extracted into ErrDoc,
      which has important, context, and suppelementary fields.  Each of those
      three sections is marked with a bullet character, '•' on unicode
      terminals and '*' on ascii terminals.  Since this breaks tons of tests,
      I also modified testlib.normalise_errmsg to strip out '•'s.
      
      --- Additional notes:
      
      To avoid prepending * to an empty doc, I needed to filter empty docs.
      This seemed less error-prone than trying to modify everyone who produces
      SDoc to instead produce Maybe SDoc.  So I added `Outputable.isEmpty`.
      Unfortunately it needs a DynFlags, which is kind of bogus, but otherwise
      I think I'd need another Empty case for SDoc, and then it couldn't be a
      newtype any more.
      
      ErrMsg's errMsgShortString is only used by the Show instance, which is
      in turn only used by Show HscTypes.SourceError, which is in turn only
      needed for the Exception instance.  So it's probably possible to get rid
      of errMsgShortString, but that would a be an unrelated cleanup.
      
      Fixes #11014.
      
      Test Plan: see above
      
      Reviewers: austin, simonpj, thomie, bgamari
      
      Reviewed By: thomie, bgamari
      
      Subscribers: simonpj, nomeata, thomie
      
      Differential Revision: https://phabricator.haskell.org/D1427
      
      GHC Trac Issues: #11014
      c05fddde
  16. 29 Oct, 2015 1 commit
    • thomie's avatar
      Testsuite: report and error out on unfound tests · 032be43b
      thomie authored
      Users are sometimes confused why their test doesn't run. It is usually
      because of a misspelled testname, for example using 'TEST=1234' instead
      of 'TEST=T1234'. After this patch it is hopefully more clear what the
      problem is, showing:
      
          ERROR: tests not found: ['1234']
      
      Instead of:
      
          0 total tests, which gave rise to
          0 test cases, of which
          0 were skipped
      
      Reviewed by: austin, bgamari
      
      Differential Revision: https://phabricator.haskell.org/D1388
      032be43b
  17. 05 Oct, 2015 1 commit
  18. 22 Sep, 2015 1 commit
  19. 20 Sep, 2015 1 commit
    • Edward Z. Yang's avatar
      Always run explicitly requested ways (extra_ways) for fast runs. · b89c4913
      Edward Z. Yang authored
      
      
      To keep validates fast, we only one run one way.  But I think that
      it's important for some tests to run them a few ways, just to
      make sure functionality, e.g. the profiler, is working.  This commit
      changes the logic so that any way specified in extra_ways is always
      run for fast.  The big changes is now profiling tests are run on
      validate.
      
      I also made it so the G1 garbage collector tests only run on slow.
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      
      Test Plan: validate
      
      Reviewers: austin, thomie, bgamari
      
      Reviewed By: austin, thomie, bgamari
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D1251
      b89c4913
  20. 12 Sep, 2015 1 commit
  21. 03 Sep, 2015 2 commits
  22. 02 Sep, 2015 3 commits
    • thomie's avatar
      Testsuite: delete dead code · bd16e0bc
      thomie authored
      bd16e0bc
    • thomie's avatar
      Testsuite: by default run all tests for a single way · c43c8e2c
      thomie authored
      `make test` now runs all tests for a single way only. Use `make slowtest` to
      get the previous behaviour (i.e. run all tests for all ways).
      
      The intention is to use this new `make test` setting for Phabricator, as
      a reasonable compromise between `make fasttest` (what it previously
      used) and a fullblown `make slowtest` (which runs all tests for all
      ways).
      
      See Note [validate and testsuite speed] in toplevel Makefile.
      
      Differential Revision: https://phabricator.haskell.org/D1178
      c43c8e2c
    • thomie's avatar
      Testsuite: refactoring only · ad26c54b
      thomie authored
      * Rename `platform_wordsize_qualify` to `find_expected_file`, and make
        it return a filename instead of an (absolute) filepath.
      
      * Replace most usages of `qualify` by `in_testdir`. Others usage sites
        will be deleted in a later commit.
      
      These changes will be useful in a later commit, when we'll distinguish
      between files in the source directory and those in a (newly created)
      test directory.
      
      Reviewed by: austin, bgamari
      
      Differential Revision: https://phabricator.haskell.org/D1186
      ad26c54b
  23. 15 Aug, 2015 1 commit
  24. 14 Jul, 2015 2 commits
  25. 13 Jul, 2015 2 commits
  26. 30 Jun, 2015 1 commit
  27. 15 Jun, 2015 1 commit
  28. 12 Jun, 2015 3 commits
    • thomie's avatar
      Testsuite: add function compile_timeout_multiplier (#10345) · 6e542a62
      thomie authored
      And rename timeout_multiplier to run_timeout_multiplier.
      
      timeout_multiplier was added in commit
      a0038979. The name suggested that it
      would affect any test, but it actually only affected tests that had a
      run component, and only that run component (as needed by test T367).
      
      Differential Revision: https://phabricator.haskell.org/D982
      6e542a62
    • thomie's avatar
      Testsuite: diff non-whitespace normalised output (#10152) · 5ddd9041
      thomie authored
      On a test failure, we show a diff between the expected and the actual
      output. The method of how we do this has changed a couple of times:
      
      * In 2007: 9951189c
        "On failure, diff the normalised test outputs"
      
      * In 2011: 3019b1e4
        "When the output files differ, present the diffs between the *actual*
        output, not the normalised output. The latter may have newlines
        removed, making the diff unreadable."
      
      * In 2015 (now): do something in between.
        - Do apply the normalisers again, to make the diff smaller (only
          showing the actual problem).
        - But don't apply normalise_whitespace, as it indeed makes the diff
          unreadable.
      
      Differential Revision: https://phabricator.haskell.org/D984
      5ddd9041
    • thomie's avatar
      Testsuite: fix the little known CHECK_FILES_WRITTEN=1 · c14bd017
      thomie authored
      The testsuite driver has a little known feature to check which files
      each test writes to, whether there are tests that write to same file,
      and whether the tests leave any files behind when CLEANUP=1. It uses
      strace under the hood.
      
      This commit fixes some bitrot, and filters out some more strace lines
      that we're not interested in (and are shown as framework failures
      otherwise).
      
      Differential Revision: https://phabricator.haskell.org/D979
      c14bd017
  29. 11 Jun, 2015 2 commits
    • thomie's avatar
      Testsuite: change some expect_fail tests to expect_broken · 5e66a698
      thomie authored
      Change the following tests from expect_fail to expect_broken: and list
      the ticket number:
      
          * driver/sigof03m/sigof03 (#9252)
          * driver/static001 (#8127)
          * partial-sigs/should_compile/EqualityConstraint (#9478)
          * partial-sigs/should_compile/ExtraNumAMROn (#9478)
          * partial-sigs/should_compile/PatBind2 (#9478)
          * partial-sigs/should_fail/TidyClash2 (#9478)
          * simplCore/should_compile/T8832 (#8832)
      
      The following tests are still marked as expect_fail, but it is not
      clearly documented why so:
      
          * gadt/lazypatok
          * indexed-types/should_fail/SkolemOccursLoop
      
      All other expect_fail tests are only expected to fail on either a
      certain platform/os or for a certain way only.
      
      Differential Revision: https://phabricator.haskell.org/D966
      5e66a698
    • thomie's avatar
      Testsuite Windows: fix T8172 (#8172) · da84fd54
      thomie authored
      Use the new function `normalise_drive_letter` to change D:\ to C:\
      before comparing outputs.
      da84fd54