summaryrefslogtreecommitdiff
path: root/testsuite/config
Commit message (Collapse)AuthorAgeFilesLines
* JS: replace "js" architecture with "javascript"Sylvain Henry2023-02-061-2/+2
| | | | | | | | | | | | | | | Despite Cabal supporting any architecture name, `cabal --check` only supports a few built-in ones. Sadly `cabal --check` is used by Hackage hence using any non built-in name in a package (e.g. `arch(js)`) is rejected and the package is prevented from being uploaded on Hackage. Luckily built-in support for the `javascript` architecture was added for GHCJS a while ago. In order to allow newer `base` to be uploaded on Hackage we make the switch from `js` to `javascript` architecture. Fixes #22740. Co-authored-by: Ben Gamari <ben@smart-cactus.org>
* testsuite: Introduce threaded2_sanity wayBen Gamari2023-01-271-1/+3
| | | | | Incredibly, we previously did not have a single way which would test the threaded RTS with multiple capabilities and the sanity-checker enabled.
* testsuite: req_smp --> req_target_smp, req_ghc_smpSylvain Henry2023-01-181-13/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See #22630 and !9552 This commit: - splits req_smp into req_target_smp and req_ghc_smp - changes the testsuite driver to calculate req_ghc_smp - changes a handful of tests to use req_target_smp instead of req_smp - changes a handful of tests to use req_host_smp when needed The problem: - the problem this solves is the ambiguity surrounding req_smp - on master req_smp was used to express the constraint that the program being compiled supports smp _and_ that the host RTS (i.e., the RTS used to compile the program) supported smp. Normally that is fine, but in cross compilation this is not always the case as was discovered in #22630. The solution: - Differentiate the two constraints: - use req_target_smp to say the RTS the compiled program is linked with (and the platform) supports smp - use req_host_smp to say the RTS the host is linked with supports smp WIP: fix req_smp (target vs ghc) add flag to separate bootstrapper split req_smp -> req_target_smp and req_ghc_smp update tests smp flags cleanup and add some docstrings only set ghc_with_smp to bootstrapper on S1 or CC Only set ghc_with_smp to bootstrapperWithSMP of when testing stage 1 and cross compiling test the RTS in config/ghc not hadrian re-add ghc_with_smp fix and align req names fix T11760 to use req_host_smp test the rts directly, avoid python 3.5 limitation test the compiler in a try block align out of tree and in tree withSMP flags mark failing tests as host req smp testsuite: req_host_smp --> req_ghc_smp Fix ghc vs host, fix ghc_with_smp leftover
* Add Javascript backendSylvain Henry2022-11-291-12/+17
| | | | | | | | | | | | | | | Add JS backend adapted from the GHCJS project by Luite Stegeman. Some features haven't been ported or implemented yet. Tests for these features have been disabled with an associated gitlab ticket. Bump array submodule Work funded by IOG. Co-authored-by: Jeffrey Young <jeffrey.young@iohk.io> Co-authored-by: Luite Stegeman <stegeman@gmail.com> Co-authored-by: Josh Meredith <joshmeredith2008@gmail.com>
* testsuite: Fix typo when setting llvm_waysMatthew Pickering2022-10-171-2/+1
| | | | | | | Since 2014 llvm_ways has been set to [] so none of the tests which use only_ways(llvm_ways) have worked as expected. Hopefully the tests still pass with this typo fix!
* testsuite: introduce nonmoving_thread_sanity wayBen Gamari2022-07-251-0/+4
| | | | (cherry picked from commit 19f8fce3659de3d72046bea9c61d1a82904bc4ae)
* testsuite: Use system-cxx-std-lib instead of config.stdcxx_implBen Gamari2022-07-161-1/+0
|
* testsuite: Hide output from test compilations with verbosity==2Ben Gamari2022-06-271-1/+1
| | | | | | | | | Previously the output from test compilations used to determine whether, e.g., profiling libraries are available was shown with verbosity levels >= 2. However, the default level is 2, meaning that most users were often spammed with confusing errors. Fix this by bumping the verbosity threshold for this output to >=3. Fixes #21760.
* Enable eventlog support in all ways by defaultBen Gamari2022-04-271-1/+1
| | | | | | | | | | | | | | | | | Here we deprecate the eventlogging RTS ways and instead enable eventlog support in the remaining ways. This simplifies packaging and reduces GHC compilation times (as we can eliminate two whole compilations of the RTS) while simplifying the end-user story. The trade-off is a small increase in binary sizes in the case that the user does not want eventlogging support, but we think that this is a fine trade-off. This also revealed a latent RTS bug: some files which included `Cmm.h` also assumed that it defined various macros which were in fact defined by `Config.h`, which `Cmm.h` did not include. Fixing this in turn revealed that `StgMiscClosures.cmm` failed to import various spinlock statistics counters, as evidenced by the failed unregisterised build. Closes #18948.
* testsuite: More robust library way detectionBen Gamari2022-04-251-7/+34
| | | | | | | | | | | | | | | | | | Previously `test.mk` would try to determine whether the dynamic, profiling, and vanilla library ways are available by searching for `PrimOpWrappers.{,dyn_,p_}hi` in directory reported by `ghc-pkg field ghc-prim library-dirs`. However, this is extremely fragile as there is no guarantee that there is only one library directory. To handle the case of multiple `library-dirs` correct we would have to carry out the delicate task of tokenising the directory list (in shell, no less). Since this isn't a task that I am eager to solve, I have rather moved the detection logic into the testsuite driver and instead perform a test compilation in each of the ways. This should be more robust than the previous approach. I stumbled upon this while fixing #20579.
* testsuite: Clean up tests depending on C++ std libBen Gamari2022-04-061-0/+1
|
* testsuite: Run testsuite dependency calculation before GHC is builtMatthew Pickering2022-02-041-25/+2
| | | | | | | | | | | | | | | | | | | | The main motivation for this patch is to allow tests to be added to the testsuite which test things about the source tree without needing to build GHC. In particular the notes linter can easily start failing and by integrating it into the testsuite the process of observing these changes is caught by normal validation procedures rather than having to run the linter specially. With this patch I can run ``` ./hadrian/build test --flavour=devel2 --only="uniques" ``` In a clean tree to run the checkUniques linter without having to build GHC. Fixes #21029
* Remove ghc_plugin_wayMatthew Pickering2022-02-031-3/+0
| | | | | | Using ghc_plugin_way had the unintended effect of meaning certain tests weren't run at all when ghc_dynamic=true, if you delete this modifier then the tests work in both the static and dynamic cases.
* testsuite: Clean up dynlib support predicatesBen Gamari2021-10-121-3/+4
| | | | | | | | | | | | | | | | | | Previously it was unclear whether req_shared_libs should require: * that the platform supports dynamic library loading, * that GHC supports dynamic linking of Haskell code, or * that the dyn way libraries were built Clarify by splitting the predicate into two: * `req_dynamic_lib_support` demands that the platform support dynamic linking * `req_dynamic_hs` demands that the GHC support dynamic linking of Haskell code on the target platform Naturally `req_dynamic_hs` cannot be true unless `req_dynamic_lib_support` is also true.
* Optimize Info Table Provenance Entries (IPEs) Map creation and lookupSven Tennie2021-08-111-0/+3
| | | | | | | | | | | | | | | Using a hash map reduces the complexity of lookupIPE(), making it non linear. On registration each IPE list is added to a temporary IPE lists buffer, reducing registration time. The hash map is built lazily on first lookup. IPE event output to stderr is added with tests. For details, please see Note [The Info Table Provenance Entry (IPE) Map]. A performance test for IPE registration and lookup can be found here: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/5724#note_370806
* Remove dynamic-by-default (#16782)Sylvain Henry2021-04-071-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dynamic-by-default was a mechanism to automatically select the -dynamic way for some targets. It was implemented in a convoluted way: it was defined as a flavour option, hence it couldn't be passed as a global settings (which are produced by `configure` before considering flavours), so a build system rule was used to pass -DDYNAMIC_BY_DEFAULT to the C compiler so that deriveConstants could infer it. * Make build system has it disabled for 8 years (951e28c0625ece7e0db6ac9d4a1e61e2737b10de) * It has never been implemented in Hadrian * Last time someone tried to enable it 1 year ago it didn't work (!2436) * Having this as a global constant impedes making GHC multi-target (see !5427) This commit fully removes support for dynamic-by-default. If someone wants to reimplement something like this, it would probably need to move the logic in the compiler. (Doing this would probably need some refactoring of the way the compiler handles DynFlags: DynFlags are used to store and to pass enabled ways to many parts of the compiler. It can be set by command-line flags, GHC API, global settings. In multi-target GHC, we will use DynFlags to load the target platform and its constants: but at this point with the current DynFlags implementation we can't easily update the existing DynFlags with target-specific options such as dynamic-by-default without overriding ways previously set by the user.)
* Deprecate -h flagMatthew Pickering2021-01-271-1/+1
| | | | | | | | | | It is confusing that it defaults to two different things depending on whether we are in the profiling way or not. Use -hc if you have a profiling build Use -hT if you have a normal build Fixes #19031
* testsuite: Only run llvm ways if llc is availableBen Gamari2020-08-181-4/+11
| | | | | | | | | As noted in #18560, we previously would always run the LLVM ways since `configure` would set `SettingsLlcCommand` to something non-null when it otherwise couldn't find the `llc` executable. Now we rather probe for the existence of the `llc` executable in the testsuite driver. Fixes #18560.
* testsuite: Add winio and winio_threaded wayswip/winioBen Gamari2020-07-151-0/+12
| | | | Reverts many of the testsuite changes
* Fix CNF handling in compacting GCÖmer Sinan Ağacan2020-04-091-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #17937 Previously compacting GC simply ignored CNFs. This is mostly fine as most (see "What about small compacts?" below) CNF objects don't have outgoing pointers, and are "large" (allocated in large blocks) and large objects are not moved or compacted. However if we do GC *during* sharing-preserving compaction then the CNF will have a hash table mapping objects that have been moved to the CNF to their location in the CNF, to be able to preserve sharing. This case is handled in the copying collector, in `scavenge_compact`, where we evacuate hash table entries and then rehash the table. Compacting GC ignored this case. We now visit CNFs in all generations when threading pointers to the compacted heap and thread hash table keys. A visited CNF is added to the list `nfdata_chain`. After compaction is done, we re-visit the CNFs in that list and rehash the tables. The overhead is minimal: the list is static in `Compact.c`, and link field is added to `StgCompactNFData` closure. Programs that don't use CNFs should not be affected. To test this CNF tests are now also run in a new way 'compacting_gc', which just passes `-c` to the RTS, enabling compacting GC for the oldest generation. Before this patch the result would be: Unexpected failures: compact_gc.run compact_gc [bad exit code (139)] (compacting_gc) compact_huge_array.run compact_huge_array [bad exit code (1)] (compacting_gc) With this patch all tests pass. I can also pass `-c -DS` without any failures. What about small compacts? Small CNFs are still not handled by the compacting GC. However so far I'm unable to write a test that triggers a runtime panic ("update_fwd: unknown/strange object") by allocating a small CNF in a compated heap. It's possible that I'm missing something and it's not possible to have a small CNF. NoFib Results: -------------------------------------------------------------------------------- Program Size Allocs Instrs Reads Writes -------------------------------------------------------------------------------- CS +0.1% 0.0% 0.0% +0.0% +0.0% CSD +0.1% 0.0% 0.0% 0.0% 0.0% FS +0.1% 0.0% 0.0% 0.0% 0.0% S +0.1% 0.0% 0.0% 0.0% 0.0% VS +0.1% 0.0% 0.0% 0.0% 0.0% VSD +0.1% 0.0% +0.0% +0.0% -0.0% VSM +0.1% 0.0% +0.0% -0.0% 0.0% anna +0.0% 0.0% -0.0% -0.0% -0.0% ansi +0.1% 0.0% +0.0% +0.0% +0.0% atom +0.1% 0.0% +0.0% +0.0% +0.0% awards +0.1% 0.0% +0.0% +0.0% +0.0% banner +0.1% 0.0% +0.0% +0.0% +0.0% bernouilli +0.1% 0.0% 0.0% -0.0% +0.0% binary-trees +0.1% 0.0% -0.0% -0.0% 0.0% boyer +0.1% 0.0% +0.0% +0.0% +0.0% boyer2 +0.1% 0.0% +0.0% +0.0% +0.0% bspt +0.1% 0.0% -0.0% -0.0% -0.0% cacheprof +0.1% 0.0% -0.0% -0.0% -0.0% calendar +0.1% 0.0% +0.0% +0.0% +0.0% cichelli +0.1% 0.0% +0.0% +0.0% +0.0% circsim +0.1% 0.0% +0.0% +0.0% +0.0% clausify +0.1% 0.0% -0.0% +0.0% +0.0% comp_lab_zift +0.1% 0.0% +0.0% +0.0% +0.0% compress +0.1% 0.0% +0.0% +0.0% 0.0% compress2 +0.1% 0.0% -0.0% 0.0% 0.0% constraints +0.1% 0.0% +0.0% +0.0% +0.0% cryptarithm1 +0.1% 0.0% +0.0% +0.0% +0.0% cryptarithm2 +0.1% 0.0% +0.0% +0.0% +0.0% cse +0.1% 0.0% +0.0% +0.0% +0.0% digits-of-e1 +0.1% 0.0% +0.0% -0.0% -0.0% digits-of-e2 +0.1% 0.0% -0.0% -0.0% -0.0% dom-lt +0.1% 0.0% +0.0% +0.0% +0.0% eliza +0.1% 0.0% +0.0% +0.0% +0.0% event +0.1% 0.0% +0.0% +0.0% +0.0% exact-reals +0.1% 0.0% +0.0% +0.0% +0.0% exp3_8 +0.1% 0.0% +0.0% -0.0% 0.0% expert +0.1% 0.0% +0.0% +0.0% +0.0% fannkuch-redux +0.1% 0.0% -0.0% 0.0% 0.0% fasta +0.1% 0.0% -0.0% +0.0% +0.0% fem +0.1% 0.0% -0.0% +0.0% 0.0% fft +0.1% 0.0% -0.0% +0.0% +0.0% fft2 +0.1% 0.0% +0.0% +0.0% +0.0% fibheaps +0.1% 0.0% +0.0% +0.0% +0.0% fish +0.1% 0.0% +0.0% +0.0% +0.0% fluid +0.0% 0.0% +0.0% +0.0% +0.0% fulsom +0.1% 0.0% -0.0% +0.0% 0.0% gamteb +0.1% 0.0% +0.0% +0.0% 0.0% gcd +0.1% 0.0% +0.0% +0.0% +0.0% gen_regexps +0.1% 0.0% -0.0% +0.0% 0.0% genfft +0.1% 0.0% +0.0% +0.0% +0.0% gg +0.1% 0.0% 0.0% +0.0% +0.0% grep +0.1% 0.0% -0.0% +0.0% +0.0% hidden +0.1% 0.0% +0.0% -0.0% 0.0% hpg +0.1% 0.0% -0.0% -0.0% -0.0% ida +0.1% 0.0% +0.0% +0.0% +0.0% infer +0.1% 0.0% +0.0% 0.0% -0.0% integer +0.1% 0.0% +0.0% +0.0% +0.0% integrate +0.1% 0.0% -0.0% -0.0% -0.0% k-nucleotide +0.1% 0.0% +0.0% +0.0% 0.0% kahan +0.1% 0.0% +0.0% +0.0% +0.0% knights +0.1% 0.0% -0.0% -0.0% -0.0% lambda +0.1% 0.0% +0.0% +0.0% -0.0% last-piece +0.1% 0.0% +0.0% 0.0% 0.0% lcss +0.1% 0.0% +0.0% +0.0% 0.0% life +0.1% 0.0% -0.0% +0.0% +0.0% lift +0.1% 0.0% +0.0% +0.0% +0.0% linear +0.1% 0.0% -0.0% +0.0% 0.0% listcompr +0.1% 0.0% +0.0% +0.0% +0.0% listcopy +0.1% 0.0% +0.0% +0.0% +0.0% maillist +0.1% 0.0% +0.0% -0.0% -0.0% mandel +0.1% 0.0% +0.0% +0.0% 0.0% mandel2 +0.1% 0.0% +0.0% +0.0% +0.0% mate +0.1% 0.0% +0.0% 0.0% +0.0% minimax +0.1% 0.0% -0.0% 0.0% -0.0% mkhprog +0.1% 0.0% +0.0% +0.0% +0.0% multiplier +0.1% 0.0% +0.0% 0.0% 0.0% n-body +0.1% 0.0% +0.0% +0.0% +0.0% nucleic2 +0.1% 0.0% +0.0% +0.0% +0.0% para +0.1% 0.0% 0.0% +0.0% +0.0% paraffins +0.1% 0.0% +0.0% -0.0% 0.0% parser +0.1% 0.0% -0.0% -0.0% -0.0% parstof +0.1% 0.0% +0.0% +0.0% +0.0% pic +0.1% 0.0% -0.0% -0.0% 0.0% pidigits +0.1% 0.0% +0.0% -0.0% -0.0% power +0.1% 0.0% +0.0% +0.0% +0.0% pretty +0.1% 0.0% -0.0% -0.0% -0.1% primes +0.1% 0.0% -0.0% -0.0% -0.0% primetest +0.1% 0.0% -0.0% -0.0% -0.0% prolog +0.1% 0.0% -0.0% -0.0% -0.0% puzzle +0.1% 0.0% -0.0% -0.0% -0.0% queens +0.1% 0.0% +0.0% +0.0% +0.0% reptile +0.1% 0.0% -0.0% -0.0% +0.0% reverse-complem +0.1% 0.0% +0.0% 0.0% -0.0% rewrite +0.1% 0.0% -0.0% -0.0% -0.0% rfib +0.1% 0.0% +0.0% +0.0% +0.0% rsa +0.1% 0.0% -0.0% +0.0% -0.0% scc +0.1% 0.0% -0.0% -0.0% -0.1% sched +0.1% 0.0% +0.0% +0.0% +0.0% scs +0.1% 0.0% +0.0% +0.0% +0.0% simple +0.1% 0.0% -0.0% -0.0% -0.0% solid +0.1% 0.0% +0.0% +0.0% +0.0% sorting +0.1% 0.0% -0.0% -0.0% -0.0% spectral-norm +0.1% 0.0% +0.0% +0.0% +0.0% sphere +0.1% 0.0% -0.0% -0.0% -0.0% symalg +0.1% 0.0% -0.0% -0.0% -0.0% tak +0.1% 0.0% +0.0% +0.0% +0.0% transform +0.1% 0.0% +0.0% +0.0% +0.0% treejoin +0.1% 0.0% +0.0% -0.0% -0.0% typecheck +0.1% 0.0% +0.0% +0.0% +0.0% veritas +0.0% 0.0% +0.0% +0.0% +0.0% wang +0.1% 0.0% 0.0% +0.0% +0.0% wave4main +0.1% 0.0% +0.0% +0.0% +0.0% wheel-sieve1 +0.1% 0.0% +0.0% +0.0% +0.0% wheel-sieve2 +0.1% 0.0% +0.0% +0.0% +0.0% x2n1 +0.1% 0.0% +0.0% +0.0% +0.0% -------------------------------------------------------------------------------- Min +0.0% 0.0% -0.0% -0.0% -0.1% Max +0.1% 0.0% +0.0% +0.0% +0.0% Geometric Mean +0.1% -0.0% -0.0% -0.0% -0.0% Bumping numbers of nonsensical perf tests: Metric Increase: T12150 T12234 T12425 T13035 T5837 T6048 It's simply not possible for this patch to increase allocations, and I've wasted enough time on these test in the past (see #17686). I think these tests should not be perf tests, but for now I'll bump the numbers.
* testsuite: Make ghc_built_by_llvm check more preciseBen Gamari2019-12-171-0/+10
| | | | | | | | | | Previously it would hackily look at the flavour name to determine whether LLVM was used to build stage2 ghc. However, this didn't work at all with Hadrian and would miss cases like ARM where we use the LLVM backend by default. See #16087 for the motivation for why ghc_built_by_llvm is needed at all. This should catch one of the ARMv7 failures described in #17555.
* testsuite: Run tests in nonmoving_thr in speed==slowBen Gamari2019-11-081-0/+2
|
* testsuite: Add nonmoving_thr_ghc wayBen Gamari2019-10-221-1/+4
| | | | This uses the nonmoving collector when compiling the testcases.
* testsuite: Add nonmoving_thr wayBen Gamari2019-10-221-3/+6
|
* testsuite: Add nonmoving WAYBen Gamari2019-10-201-2/+5
| | | | | This simply runs the compile_and_run tests with `-xn`, enabling the nonmoving oldest generation.
* testsuite: Assert that testsuite ways are knownBen Gamari2019-10-171-0/+1
| | | | | This ensures that all testsuite way names given to `omit_ways`, `only_ways`, etc. are known ways.
* testsuite: check for RTS linkerPeter Trommler2019-09-111-0/+1
| | | | Fixes #16833
* testsuite: Fix req_thBen Gamari2019-07-181-0/+2
|
* testsuite: Introduce concurrent_ways setBen Gamari2019-06-151-2/+7
| | | | | | Previously we just tested for the threaded2 when determining whether to skip tests which are fragile under concurrent execution. However, this isn't the only way which is concurrent.
* Introduce NCG config flag and add helperGabor Greif2018-12-301-0/+2
| | | | | | | ... for testing presence of NCG This commit adds a criterion for checking whether we can expect sensible output from --ddump-asm.
* Fix GhostScript detection (Trac #15856)Krzysztof Gogolewski2018-11-221-7/+0
| | | | | | | | | | | | | | | | | | | | | | | The option `confdir` (used in GhostScript test) was set correctly via `--config` in `test.mk` and incorrectly via `config/ghc`. AFAICT, some time ago this was working because the incorrect assignment was done first, and later it broke. Hardian doesn't pass `confdir`. I removed `confdir` and use `config.top` to determine the directory of the `good.ps` and `bad.ps` files. This is simpler. I also removed some redundant assignments in `config/ghc`. Test Plan: manually set config.have_profiling and make test Reviewers: bgamari Subscribers: rwbarton, carter GHC Trac Issues: #15856 Differential Revision: https://phabricator.haskell.org/D5298
* plugins: search for .a files if necessarysheaf2018-10-281-19/+2
| | | | | | | | | | | | | | | | | | Summary: on windows, plugins are loaded via .a files, but those paths were not being searched when loading plugins Test Plan: ./validate Reviewers: Phyx, bgamari Reviewed By: Phyx Subscribers: RyanGlScott, rwbarton, carter GHC Trac Issues: #15700 Differential Revision: https://phabricator.haskell.org/D5253
* Fix plugin tests requirementsTamar Christina2018-10-151-3/+20
| | | | | | | | | | | | | | | | | | | | Unfortunately the implementation has confused the ability to make dynamic libraries with dynamic way. This constraint is only true for systems that require `-fPIC` for shared libraries. Since the implementation has this implicit assumption, mark the tests as requiring dynway. Test Plan: ./validate Reviewers: bgamari Reviewed By: bgamari Subscribers: simonpj, rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5174
* Simplify testsuite driver, part 2Krzysztof Gogolewski2018-08-121-7/+7
| | | | | | | | | | | | | | | | | | Summary: - Avoid import *; this helps tools such as pyflakes. The last occurrence in runtests.py is not easy to remove as it's used by .T files. - Use False/True instead of 0/1. Test Plan: validate Reviewers: bgamari, thomie, simonmar Reviewed By: thomie Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5062
* Testsuite driver: fix encoding issue when calling ghc-pkgKrzysztof Gogolewski2018-08-061-2/+2
| | | | | | | | | | | | | | | | Summary: In Python 3, subprocess.communicate() returns a pair of bytes, which need to be decoded. In runtests.py, we were just calling str() instead, which converts b'x' to "b'x'". As a result, the loop that was checking pkginfo for lines starting with 'library-dirs' couldn't work. Reviewers: bgamari, thomie, Phyx Reviewed By: thomie Subscribers: Phyx, rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5046
* Disable -fghci-leak-check in DEBUG modeRichard Eisenberg2018-07-141-1/+1
| | | | | The DEBUG compiler's GHCi still leaks. This commit suppresses testsuite failures due to this leak. See #15372.
* Add -fghci-leak-check to check for space leaksSimon Marlow2018-05-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: (re-applying this patch now that D4659 is committed) Space leaks in GHCi emerge from time to time and tend to come back again after they get fixed. This is an attempt to limit regressions by * adding a reliable detection for some classes of space leaks in GHCi * turning on leak checking for all GHCi tests in the test suite, so that we'll notice if the leak appears again. The idea for detecting space leaks is quite simple: * find some data that we expect to be GC'd later, make a weak pointer to it * when we expect the data to be dead, do a `performGC` and then check the status of the weak pointer. It would be nice to apply this trick to lots of things in GHC, e.g. ensuring that HsSyn is not retained after the desugarer, or ensuring that CoreSyn from the previous simplifier pass is not retained. Test Plan: validate Reviewers: bgamari, simonpj, erikd, niteria Subscribers: thomie, carter GHC Trac Issues: #15111
* Revert "Add -fghci-leak-check to check for space leaks"Simon Marlow2018-05-101-1/+1
| | | | This reverts commit 5fe6aaa3756cda654374ebfd883fa8f064ff64a4.
* Add -fghci-leak-check to check for space leaksSimon Marlow2018-05-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Space leaks in GHCi emerge from time to time and tend to come back again after they get fixed. This is an attempt to limit regressions by * adding a reliable detection for some classes of space leaks in GHCi * turning on leak checking for all GHCi tests in the test suite, so that we'll notice if the leak appears again. The idea for detecting space leaks is quite simple: * find some data that we expect to be GC'd later, make a weak pointer to it * when we expect the data to be dead, do a `performGC` and then check the status of the weak pointer. It would be nice to apply this trick to lots of things in GHC, e.g. ensuring that HsSyn is not retained after the desugarer, or ensuring that CoreSyn from the previous simplifier pass is not retained. Test Plan: validate Reviewers: bgamari, simonpj, erikd, niteria Subscribers: thomie, carter GHC Trac Issues: #15111 Differential Revision: https://phabricator.haskell.org/D4658
* Typos in comments [ci skip]Gabor Greif2017-05-051-1/+1
|
* testsuite: disable 'optllvm' for unregisterised compilerSergei Trofimovich2017-04-201-1/+1
| | | | | | | | | | | | | | commit 74615f412ad3de2910a156ff494bfe5497fada7e ("UNREG: ignore -fllvm (Trac #13495)") enabled 'optllvm' tests to be ran in 'make fulltest' mode. As a result many (~1000) tests fail due to stderr misamatch: +when making flags consistent: warning: + Compiler unregisterised, so compiling via C The change removes 'optllvm' tests for unregisterised compiler. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* testsuite: Don't fail if "target has RTS linker" field is missingReid Barton2017-01-201-1/+4
| | | | | | | | | | | | Test Plan: harbormaster Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2991
* Testsuite: Skip failing tests on PowerPC 64-bitPeter Trommler2016-12-271-0/+3
| | | | | | | | | | | | | | | | | | | The Power ISA says the result of a division by zero is undefined. So ignore stdout on PowerPC 64-bit systems. Disable ext-interp tests on 64-bit PowerPC. We don't have support for PowerPC 64-bit ELF in the RTS linker, which is needed for the external interpreter. Test Plan: ./validate Reviewers: austin, simonmar, hvr, erikd, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2782
* Run some tests with -fexternal-interpreter -profSimon Marlow2016-12-171-1/+3
| | | | | | | | | | | | | | | | | | We don't have any other tests for this, except one Template Haskell test. This would have caught the bug I just fixed in D2868, at least when validating with profiling on. Test Plan: Ran tests Reviewers: niteria, austin, erikd, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2869 GHC Trac Issues: #5654
* Overhaul of Compact Regions (#12455)Simon Marlow2016-12-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This commit makes various improvements and addresses some issues with Compact Regions (aka Compact Normal Forms). This was the most important thing I wanted to fix. Compaction previously prevented GC from running until it was complete, which would be a problem in a multicore setting. Now, we compact using a hand-written Cmm routine that can be interrupted at any point. When a GC is triggered during a sharing-enabled compaction, the GC has to traverse and update the hash table, so this hash table is now stored in the StgCompactNFData object. Previously, compaction consisted of a deepseq using the NFData class, followed by a traversal in C code to copy the data. This is now done in a single pass with hand-written Cmm (see rts/Compact.cmm). We no longer use the NFData instances, instead the Cmm routine evaluates components directly as it compacts. The new compaction is about 50% faster than the old one with no sharing, and a little faster on average with sharing (the cost of the hash table dominates when we're doing sharing). Static objects that don't (transitively) refer to any CAFs don't need to be copied into the compact region. In particular this means we often avoid copying Char values and small Int values, because these are static closures in the runtime. Each Compact# object can support a single compactAdd# operation at any given time, so the Data.Compact library now enforces mutual exclusion using an MVar stored in the Compact object. We now get exceptions rather than killing everything with a barf() when we encounter an object that cannot be compacted (a function, or a mutable object). We now also detect pinned objects, which can't be compacted either. The Data.Compact API has been refactored and cleaned up. A new compactSize operation returns the size (in bytes) of the compact object. Most of the documentation is in the Haddock docs for the compact library, which I've expanded and improved here. Various comments in the code have been improved, especially the main Note [Compact Normal Forms] in rts/sm/CNF.c. I've added a few tests, and expanded a few of the tests that were there. We now also run the tests with GHCi, and in a new test way that enables sanity checking (+RTS -DS). There's a benchmark in libraries/compact/tests/compact_bench.hs for measuring compaction speed and comparing sharing vs. no sharing. The field totalDataW in StgCompactNFData was unnecessary. Test Plan: * new unit tests * validate * tested manually that we can compact Data.Aeson data Reviewers: gcampax, bgamari, ezyang, austin, niteria, hvr, erikd Subscribers: thomie, simonpj Differential Revision: https://phabricator.haskell.org/D2751 GHC Trac Issues: #12455
* Support SCC pragmas in declaration contextÖmer Sinan Ağacan2016-07-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not having SCCs at the top level is becoming annoying real quick. For simplest cases, it's possible to do this transformation: f x y = ... => f = {-# SCC f #-} \x y -> ... However, it doesn't work when there's a `where` clause: f x y = <t is in scope> where t = ... => f = {-# SCC f #-} \x y -> <t is out of scope> where t = ... Or when we have a "equation style" definition: f (C1 ...) = ... f (C2 ...) = ... f (C3 ...) = ... ... (usual solution is to rename `f` to `f'` and define a new `f` with a `SCC`) This patch implements support for SCC annotations in declaration contexts. This is now a valid program: f x y = ... where g z = ... {-# SCC g #-} {-# SCC f #-} Test Plan: This passes slow validate (no new failures added). Reviewers: goldfire, mpickering, austin, bgamari, simonmar Reviewed By: bgamari, simonmar Subscribers: simonmar, thomie, mpickering Differential Revision: https://phabricator.haskell.org/D2407
* Run all TH tests with -fexternal-interpreter (#12219)Simon Marlow2016-06-241-1/+4
|
* Testsuite: delete dead code + cleanupThomas Miedema2016-06-201-51/+13
| | | | | | * Set config settings directly in mk/test.mk, instead of indirectly in config/ghc * passing --hpcdir for WAY=hpc is unnecessary
* Testsuite: *do* replace backslashes in config.libdirThomas Miedema2016-06-201-1/+34
| | | | | | | | | | | | | | | See `Note [Replacing backward slashes in config.libdir]` There is one caveat: in ae4acbd1ba4168b867a1b5fe8de50c0199dfc1f4 I mentioned: > Changing backwards slashes to forward slashes apparently confuses > msys2/mingw magic path handling. I can not reproduce that problem anymore, however. This patch validates for me, and fixes all tests that use config.libdir for WAY=ghci. We'll see how it goes.
* Testsuite: run tests in <testdir>.run instead of /tmpThomas Miedema2016-06-181-1/+0
| | | | | | | | | | | | | | | | | | | | As discussed in Phab:D1187, this approach makes it a bit easier to inspect the test directory while working on a new test. The only tests that needed changes are the ones that refer to files in ancestor directories. Those files are now copied directly into the test directory. validate still runs the tests in a temporary directory in /tmp, see `Note [Running tests in /tmp]` in testsuite/driver/runtests.py. Update submodule hpc. Reviewed by: simonmar Differential Revision: https://phabricator.haskell.org/D2333 GHC Trac Issues: #11980