summaryrefslogtreecommitdiff
path: root/testsuite/tests/concurrent
Commit message (Collapse)AuthorAgeFilesLines
* testsuite: Fix -Wcompat-unqualified-imports issuesBen Gamari2020-02-082-2/+0
|
* Fix typos, via a Levenshtein-style correctorBrian Wignall2020-01-041-1/+1
|
* Fix typos, using Wikipedia list of common typosBrian Wignall2019-11-281-1/+1
|
* testsuite: Ensure that threaded tests are run in nonmoving_thrBen Gamari2019-10-221-7/+7
|
* Much simpler language for PmCheckSebastian Graf2019-10-111-1/+1
| | | | | | | | | | | | | | | | Simon realised that the simple language composed of let bindings, bang patterns and flat constructor patterns is enough to capture the semantics of the source pattern language that are important for pattern-match checking. Well, given that the Oracle is smart enough to connect the dots in this less informationally dense form, which it is now. So we transform `translatePat` to return a list of `PmGrd`s relative to an incoming match variable. `pmCheck` then trivially translates each of the `PmGrd`s into constraints that the oracle understands. Since we pass in the match variable, we incidentally fix #15884 (coverage checks for view patterns) through an interaction with !1746.
* testsuite: Mark hs_try_putmvar003 as fragile in threaded1Ben Gamari2019-09-271-1/+2
| | | | | Due to #16361. Note that I'm leaving out threaded2 since it's not clear whether the single crash in that way was due to other causes.
* testsuite: Mark threadstatus-9333 as fragile in profthreadedBen Gamari2019-09-241-1/+1
| | | | Due to #16555.
* Expunge #ifdef and #ifndef from the codebaseJohn Ericson2019-07-145-5/+5
| | | | | | | | These are unexploded minds as far as the linter is concerned. I don't want to hit in my MRs by mistake! I did this with `sed`, and then rolled back some changes in the docs, config.guess, and the linter itself.
* testsuite: Mark T5611 and T5611a as fragileBen Gamari2019-06-261-2/+2
|
* testsuite: Add T5611aBen Gamari2019-06-265-4/+42
| | | | This is the same as T5611 but with an unsafe call to sleep.
* testsuite: Use safe FFI call in T5611Ben Gamari2019-06-261-3/+3
| | | | | The original issue, #5611, was concerned with safe calls. However, the test inexplicably used an unsafe call. Fix this.
* testsuite: Mark T5611 as broken in ghci wayBen Gamari2019-06-221-1/+4
| | | | As described in #16845.
* testsuite: Flush conc059's printf bufferBen Gamari2019-06-162-1/+2
| | | | | Otherwise it the order out the Haskell and C output will be system-dependent.
* testsuite: Add assertions that way lists are in fact listsBen Gamari2019-06-151-1/+1
| | | | | | Previously there were a few cases where operations like `omit_ways` were incorrectly passed a single way (e.g. `omit_ways('threaded2')`). This won't work as the author expected.
* testsuite: Introduce concurrent_ways setBen Gamari2019-06-151-5/+5
| | | | | | 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.
* testsuite: Mark threadstatus-T9333 as fragile in ghci wayBen Gamari2019-06-121-1/+1
| | | | As noted in #16555.
* testsuite: Fix omit_ways usageBen Gamari2019-06-121-1/+1
| | | | omit_ways expects a list but this was broken in several cases.
* testsuite: Mark concprog001 as fragileBen Gamari2019-05-031-0/+1
| | | Due to #16604.
* testsuite: Use fragile modifier for more testsBen Gamari2019-03-061-4/+2
|
* testsuite: Skip foreignInterruptible in unregisterised wayBen Gamari2019-01-271-0/+2
| | | | See #15467.
* Fix raiseAsync() UNDERFLOW_FRAME handling in profiling runtimeÖmer Sinan Ağacan2019-01-121-1/+2
| | | | | | | UNDERFLOW_FRAMEs don't have profiling headers so we have to use the AP_STACK's function's CCS as the new frame's CCS. Fixes one of the many bugs caught by concprog001 (#15508).
* testsuite: Ensure that unregisterised function is calledBen Gamari2018-12-112-2/+2
| | | | | Strangely the previous formulation works locally and under CircleCI but fails on another machine. Odd.
* testsuite: Mark tickets identified in #15467 as brokenBen Gamari2018-12-112-1/+2
|
* Simplify testsuite driver, part 2Krzysztof Gogolewski2018-08-121-1/+1
| | | | | | | | | | | | | | | | | | 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: Add Windows-specific output for T5611Ben Gamari2018-06-141-0/+1
| | | | | | | | | | | | | It's not entirely clear why this is necessary, but this currently fails on Windows and the difference seems rather minor. Test Plan: Validate on Windows Reviewers: Phyx Subscribers: rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4842
* Do not skip conc004 in GHCi wayÖmer Sinan Ağacan2018-06-141-4/+1
| | | | | | | | | | | | | | | | | According to the comments it used to allocate too much, but currently I get 205,987,176 bytes allocated in the heap 50,352,200 bytes copied during GC 14,244,968 bytes maximum residency (6 sample(s)) 172,952 bytes maximum slop 36 MB total memory in use (0 MB lost due to fragmentation) Reviewers: bgamari, tdammers, simonmar Subscribers: tdammers, rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4831
* Do not omit T4030 in GHCi modeÖmer Sinan Ağacan2018-06-101-2/+1
| | | | | | | | | | | | (it currently works fine in GHCi) Reviewers: bgamari Reviewed By: bgamari Subscribers: simonmar, rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4824
* testsuite: disable T13615 on non-smp targetsSergei Trofimovich2018-03-101-0/+1
| | | | | | | T13615 needs multicore support from RTS: T13615: unknown RTS option: -N15 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* testsuite: Add newline to test outputDouglas Wilson2018-02-181-2/+2
| | | | | | | | | | Reviewers: bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4389
* Windows: fix all failing tests.Tamar Christina2018-01-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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
* A bunch of typofixesGabor Greif2017-09-261-1/+1
|
* testsuite: Add test for #13916Ben Gamari2017-08-173-0/+170
| | | | | | | | Reviewers: austin Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3764
* Revert "testsuite: Add test for #13916"Ben Gamari2017-07-203-169/+0
| | | | | This reverts commit b2d3ec370b97fe5f448e8f1d4e0b7374c63c60a8. Didn't mean to push this one.
* testsuite: Add test for #13916Ben Gamari2017-07-203-0/+169
|
* testsuite: Ensure that hs_try_putmvar003 terminatesBen Gamari2017-07-192-5/+9
| | | | | | | | | | | | | | Test Plan: Validate Reviewers: austin, simonmar Reviewed By: simonmar Subscribers: simonmar, rwbarton, thomie GHC Trac Issues: #13434 Differential Revision: https://phabricator.haskell.org/D3724
* testsuite: Add testcase for #13615Ben Gamari2017-07-034-0/+192
| | | | | | | | | | Reviewers: austin Subscribers: dfeuer, rwbarton, thomie GHC Trac Issues: #13615 Differential Revision: https://phabricator.haskell.org/D3696
* Fix a lost-wakeup bug in BLACKHOLE handling (#13751)Simon Marlow2017-06-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The problem occurred when * Threads A & B evaluate the same thunk * Thread A context-switches, so the thunk gets blackholed * Thread C enters the blackhole, creates a BLOCKING_QUEUE attached to the blackhole and thread A's `tso->bq` queue * Thread B updates the blackhole with a value, overwriting the BLOCKING_QUEUE * We GC, replacing A's update frame with stg_enter_checkbh * Throw an exception in A, which ignores the stg_enter_checkbh frame Now we have C blocked on A's tso->bq queue, but we forgot to check the queue because the stg_enter_checkbh frame has been thrown away by the exception. The solution and alternative designs are discussed in Note [upd-black-hole]. This also exposed a bug in the interpreter, whereby we were sometimes context-switching without calling `threadPaused()`. I've fixed this and added some Notes. Test Plan: * `cd testsuite/tests/concurrent && make slow` * validate Reviewers: niteria, bgamari, austin, erikd Reviewed By: erikd Subscribers: rwbarton, thomie GHC Trac Issues: #13751 Differential Revision: https://phabricator.haskell.org/D3630
* hs_add_root() RTS API removalSergei Trofimovich2017-04-171-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Before ghc-7.2 hs_add_root() had to be used to initialize haskell modules when haskell was called from FFI. commit a52ff7619e8b7d74a9d933d922eeea49f580bca8 ("Change the way module initialisation is done (#3252, #4417)") removed needs for hs_add_root() and made function a no-op. For backward compatibility '__stginit_<module>' symbol was not removed. This change removes no-op hs_add_root() function and unused '__stginit_<module>' symbol from each haskell module. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> Test Plan: ./validate Reviewers: simonmar, austin, bgamari, erikd Reviewed By: simonmar Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3460
* Make the test fail if compiled without -threadedSimon Marlow2017-03-281-0/+3
| | | | | | | | | | Test Plan: validate Reviewers: bgamari, austin, erikd Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3387
* Change catch# demand signatureDavid Feuer2017-03-013-0/+11
| | | | | | | | | | | | | | | | | | * Give `catch#` a lazy demand signature, to make it more honest. * Make `catchException` and `catchAny` force their arguments so they actually behave as advertised. * Use `catch` rather than `catchException` in `forkIO`, `forkOn`, and `forkOS` to avoid losing exceptions. Fixes #13330 Reviewers: rwbarton, simonpj, simonmar, bgamari, hvr, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D3244
* tests: remove extra_files.py (#12223)Reid Barton2017-02-263-3/+6
| | | | | | | | | | | | The script I used is included as testsuite/driver/kill_extra_files.py, though at this point it is for mostly historical interest. Some of the tests in libraries/hpc relied on extra_files.py, so this commit includes an update to that submodule. One test in libraries/process also relies on extra_files.py, but we cannot update that submodule so easily, so for now we special-case it in the test driver.
* Spelling fixesGabor Greif2017-02-022-2/+2
|
* Remove clean_cmd and extra_clean usage from .T filesThomas Miedema2017-01-224-58/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | The `clean_cmd` and `extra_clean` setup functions don't do anything. Remove them from .T files. Created using https://github.com/thomie/refactor-ghc-testsuite. This diff is a test for the .T-file parser/processor/pretty-printer in that repository. find . -name '*.T' -exec ~/refactor-ghc-testsuite/Main "{}" \; Tests containing inline comments or multiline strings are not modified. Preparation for #12223. Test Plan: Harbormaster Reviewers: austin, hvr, simonmar, mpickering, bgamari Reviewed By: mpickering Subscribers: mpickering Differential Revision: https://phabricator.haskell.org/D3000 GHC Trac Issues: #12223
* Typos in commentsGabor Greif2017-01-132-2/+2
|
* testsuite/conc059: Don't attempt to use stdcall where it isn't supportedBen Gamari2016-12-011-1/+9
| | | | | | | | | | | | Test Plan: Validate on 64-bit Windows Reviewers: geekosaur, austin, erikd, Phyx Reviewed By: Phyx Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2781
* A few typos in commentsGabor Greif2016-11-211-1/+1
|
* Fix hs_try_putmvar003 (#12800)Simon Marlow2016-11-071-1/+1
| | | | | | | | | | | | | | | | | | | Summary: There was a race condition on some shared data when creating the callback thread. I couldn't repro the issue without inserting a dummy usleep(100), but it's definitely a bug. Test Plan: validate Reviewers: bgamari, austin, erikd Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2678 GHC Trac Issues: #12800
* Skip T5611 on OSX as it fails non-deterministically.Matthew Pickering2016-10-221-1/+2
| | | | | | | | | | Reviewers: austin, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2622 GHC Trac Issues: #12751
* Fix failure in setnumcapabilities001 (#12728)Simon Marlow2016-10-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | The value of enabled_capabilities can change across a call to requestSync(), and we were erroneously using an old value, causing things to go wrong later. It manifested as an assertion failure, I'm not sure whether there are worse consequences or not, but we should get this fix into 8.0.2 anyway. The failure didn't happen for me because it only shows up on machines with fewer than 4 processors, due to the new logic to enable -qn automatically. I've bumped the test parameter 8 to make it more likely to exercise that code. Test Plan: Ran setnumcapabilities001 many times Reviewers: niteria, austin, erikd, rwbarton, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2617 GHC Trac Issues: #12728
* Add hs_try_putmvar()Simon Marlow2016-09-129-0/+368
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is a fast, non-blocking, asynchronous, interface to tryPutMVar that can be called from C/C++. It's useful for callback-based C/C++ APIs: the idea is that the callback invokes hs_try_putmvar(), and the Haskell code waits for the callback to run by blocking in takeMVar. The callback doesn't block - this is often a requirement of callback-based APIs. The callback wakes up the Haskell thread with minimal overhead and no unnecessary context-switches. There are a couple of benchmarks in testsuite/tests/concurrent/should_run. Some example results comparing hs_try_putmvar() with using a standard foreign export: ./hs_try_putmvar003 1 64 16 100 +RTS -s -N4 0.49s ./hs_try_putmvar003 2 64 16 100 +RTS -s -N4 2.30s hs_try_putmvar() is 4x faster for this workload (see the source for hs_try_putmvar003.hs for details of the workload). An alternative solution is to use the IO Manager for this. We've tried it, but there are problems with that approach: * Need to create a new file descriptor for each callback * The IO Manger thread(s) become a bottleneck * More potential for things to go wrong, e.g. throwing an exception in an IO Manager callback kills the IO Manager thread. Test Plan: validate; new unit tests Reviewers: niteria, erikd, ezyang, bgamari, austin, hvr Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2501