summaryrefslogtreecommitdiff
path: root/libraries/base/tests/IO
Commit message (Collapse)AuthorAgeFilesLines
* Bump unix submodule to version 2.8.0.0Ryan Scott2018-04-191-2/+2
| | | | | | | | | | | | | | Summary: Requires bumping several submodules. Test Plan: ./validate Reviewers: hvr, bgamari Subscribers: thomie, carter GHC Trac Issues: #15042 Differential Revision: https://phabricator.haskell.org/D4604
* Windows: fix all failing tests.Tamar Christina2018-01-021-3/+6
| | | | | | | | | | | | | | | | | | | | | | 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
* tests: remove extra_files.py (#12223)Reid Barton2017-02-261-2/+2
| | | | | | | | | | | | 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.
* Remove clean_cmd and extra_clean usage from .T filesThomas Miedema2017-01-221-52/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix memory leak from #12664Bartosz Nitka2016-10-072-0/+6
| | | | | | | | | | | | | | | | | | | | | This fixes the leak with `setProgArgv`. The problem was that `setProgArgv` would not free the objects pointed to by `prog_argc`, `prog_argv` when the globals were changed resulting in a leak. The only strictly necessary change is in `rts/RtsFlags.c`, but the code in `System.Environment` was a bit confusing and not exception safe, so I refactored it. Test Plan: ./validate Reviewers: simonmar, ezyang, austin, hvr, bgamari, erikd Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2576 GHC Trac Issues: #12664
* Double the file descriptor limit for openFile008Bartosz Nitka2016-06-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | I have get test failures on `openFile008` with `openFile: resource exhausted (Too many open files)` when running inside `./validate`, but not when I run the test individually. I suspect that's because with `./validate` parallelism of 33 threads I go just above the `1024` file descriptor limit. This is probably related to the recent change: `58f0086b70f2: Testsuite: open/close stdin/stdout/stderr explicitly` but I haven't looked deep enough to understand exactly how. I think bumping this is harmless, but I don't really know why it's necessary at all. Test Plan: ./validate Reviewers: austin, thomie, hvr, bgamari, simonmar Reviewed By: simonmar Subscribers: simonmar Differential Revision: https://phabricator.haskell.org/D2368
* Testsuite: open/close stdin/stdout/stderr explicitlyThomas Miedema2016-06-281-4/+3
| | | | | | | | | | | | | | | | | | This allows run_command's to contain `|`, and `no_stdin` isn't necessary anymore. Unfortunately it doesn't fix T7037 on Windows which I had hoped it would (testsuite driver tries to read a file that it just created itself, but the OS says it doesn't exist). The only drawback of this commit is that the command that the testsuite prints to the terminal (for debugging purposes) doesn't mention the files that stdout and stderr are redirected to anymore. This is probably ok. Update submodule unix. Differential Revision: https://phabricator.haskell.org/D1234
* Testsuite: delete dead code + cleanupThomas Miedema2016-06-201-1/+1
| | | | | | * Set config settings directly in mk/test.mk, instead of indirectly in config/ghc * passing --hpcdir for WAY=hpc is unnecessary
* Testsuite: tabs -> spaces [skip ci]Thomas Miedema2016-06-2013-78/+78
|
* Testsuite: write "\n" instead of "\r\n" when using mingw PythonThomas Miedema2016-06-181-0/+1
| | | | | | | | | | | | | | | Mingw style Python uses '\r\n' by default for newlines. This is annoying, because it means that when a GHC developer on Windows uses mingw Python to `make accept` a test, every single line of the .stderr file is touched. This makes it difficult to spot the real changes, and it leads to unnecessary git history bloat. Prevent this from happening by using io.open instead of open. See `Note [Universal newlines]` Reviewed by: Phyx Differential Revision: https://phabricator.haskell.org/D2342
* Always use native-Haskell de/encoders for ASCII and latin1Thomas Miedema2016-05-243-11/+10
| | | | | | | | This fixes test encoding005 on Windows (#10623). Reviewed by: austin, bgamari Differential Revision: https://phabricator.haskell.org/D2262
* Testsuite: fix T12010 for realThomas Miedema2016-05-223-11/+7
| | | | | | | | | | | | | | | | | * Use `extra_files` instead of (the deprecated) `extra_clean` (#11980). * Don't depend on generated files from build tree (libraries/base/include/HsBaseConfig.h). Running 'make test TEST=T12010' should work, even without building GHC first (it will use the system installed ghc). Test Plan: 'make test TEST=T12010' on Linux and Windows. Reviewed by: Phyx Differential Revision: https://phabricator.haskell.org/D2256 GHC Trac Issues: #12010
* Fix failing T12010Tamar Christina2016-05-213-5/+6
| | | | | | | | | | | | | | | | Summary: T12010 seems to be failing because it can't find the correct paths. This gives the test some more qualified paths. Test Plan: make TEST=12010 Reviewers: hvr, bgamari, austin, thomie Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D2252 GHC Trac Issues: #12010
* Use the correct return type for Windows' send()/recv() (Fix #12010)Tamar Christina2016-05-195-0/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: They return signed 32 bit ints on Windows, even on a 64 bit OS, rather than Linux's 64 bit ssize_t. This means when recv() returned -1 to signal an error we thought it was 4294967295. It was converted to an int, -1 and the buffer was memcpy'd which caused a segfault. Other bad stuff happened with send()s. See also note CSsize in System.Posix.Internals. Add a test for #12010 Test Plan: - GHC testsuite (T12010) - http-conduit test (https://github.com/snoyberg/http-client/issues/191) Reviewers: austin, hvr, bgamari, Phyx Reviewed By: Phyx Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2170 GHC Trac Issues: #12010
* Testsuite: don't skip concio001 and concio001_thrThomas Miedema2016-05-172-4/+4
| | | | | I think they were skipped before because they write to the same output file (concio001). This is no longer a problem.
* Testsuite: delete empty files [skip ci]Thomas Miedema2016-02-251-0/+0
|
* Testsuite: delete Windows line endings [skip ci] (#11631)Thomas Miedema2016-02-233-105/+105
|
* Testsuite: delete Windows line endings [skip ci] (#11631)Thomas Miedema2016-02-234-148/+148
|
* Mention "handle is semi-closed" in error messagesThomas Miedema2015-12-151-2/+2
| | | | | | | | | | | Semi-closedness is mentioned in the Haskell report, so lets not hide it from users. Reviewers: austin, hvr, bgamari Reviewed By: bgamari Differential Revision: https://phabricator.haskell.org/D1624
* Testsuite: mark encoding005 expect_broken(#10623) on WindowsThomas Miedema2015-08-151-1/+2
|
* Update encoding001 to test the full range of non-surrogate code pointsReid Barton2015-07-231-8/+1
| | | | | | | | | | | | | | | | | GHC has used surrogate code points for roundtripping since 7.4. See Note [Roundtripping]. Also, improve the wording of that Note slightly. Test Plan: validate still passes Reviewers: austin, hvr, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1087
* When iconv is unavailable, use an ASCII encoding to encode ASCIIReid Barton2015-07-213-0/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | D898 and D1059 implemented a fallback behavior to handle the case that the end user's iconv installation is broken (typically due to running inside a chroot in which the necessary locale files and/or gconv modules have not been installed). In this case, if the program requests an ASCII locale, GHC's char8 encoding is used rather than the program failing. However, silently mangling data like char8 does when the programmer did not ask for it is poor behavior, for reasons described in D1059. This commit implements an ASCII encoding and uses it in the fallback case when iconv is unavailable and the user has requested ASCII. Test Plan: Added tests for the encodings defined in Latin1. Also, manually ran a statically-linked executable of that test in a chroot and the tests passed (up to the ones that call mkTextEncoding "LATIN1", since there is no fallback from iconv for that case yet). Reviewers: austin, hvr, hsyl20, bgamari Reviewed By: hsyl20, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1085 GHC Trac Issues: #7695, #10623
* Testsuite: delete remaining only_compiler_types(['ghc']) setupsThomas Miedema2015-07-141-1/+1
| | | | | No point in pretending other compilers can use the GHC testsuite. This makes the *.T files a bit shorter.
* Remove all *.stderr/stdout-hugs filesThomas Miedema2015-07-064-10/+0
|
* Testsuite: delete expect_fail setups for hugsThomas Miedema2015-06-091-10/+3
| | | | | | This makes it easier to grep for expect_fail in the tests directory. Differential Revision: https://phabricator.haskell.org/D964
* base: drop redundant Typeable derivingsHerbert Valerio Riedel2015-03-071-1/+0
| | | | | | | | | | | Thanks to #9858 `Typeable` doesn't need to be explicitly derived anymore. This also makes `AutoDeriveTypeable` redundant, as well as some imports of `Typeable` (removal of whose may be beneficial to #9707). This commit removes several such now redundant use-sites in `base`. Reviewed By: austin, ekmett Differential Revision: https://phabricator.haskell.org/D712
* Add special stdout for hClose002 on x64 SolarisKjetil Limkjær2014-09-161-0/+4
| | | | | | | | | | | | | | | | | Summary: This is identical to the x86 output from bug #4290, and fixes the hClose002 test when running under x86_64-unknown-solaris2. Test Plan: Re-run 'make TEST=hClose002' under x64 Solaris. Reviewers: ezyang, austin Reviewed By: ezyang, austin Subscribers: simonmar, ezyang, carter Differential Revision: https://phabricator.haskell.org/D205
* fix openFile003 test on Solaris/i386 (platform output is not needed anymore)Karel Gardas2014-08-041-4/+0
| | | | | | | | | | | | Test Plan: validate Reviewers: austin Reviewed By: austin Subscribers: phaskell, simonmar, relrod, ezyang, carter Differential Revision: https://phabricator.haskell.org/D114
* Simplify .gitignore filesHerbert Valerio Riedel2014-06-281-75/+0
| | | | | | | | | It's a bit confusing to have .gitignore files spread all over the filesystem. This commit tries to consolidate those into one .gitignore file per component. Moreover, we try to describe files to be ignored which happen to have a common identifying pattern by glob patterns. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Add .gitignore for autogenerated test files.Edward Z. Yang2014-05-291-0/+75
| | | | | | | | I used this shell command to automatically generate the lists: for i in `git ls-files -o --exclude-standard --directory`; do echo "`basename $i`" >> "`dirname "$i"`/.gitignore"; done Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* T4006, environment001, T3307 all work on msys2Simon Peyton Jones2014-05-281-4/+2
|
* Constant-fold `__GLASGOW_HASKELL__` CPP conditionalsHerbert Valerio Riedel2013-09-171-1/+0
| | | | | | | | | | Now that HUGS and NHC specific code has been removed, this commit "folds" the now redundant `#if((n)def)`s containing `__GLASGOW_HASKELL__`. This renders `base` officially GHC only. This commit also removes redundant `{-# LANGUAGE CPP #-}`. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Fix hSetBuffering004 to work with dynamic ghciIan Lynagh2013-06-162-0/+2
| | | | | We need to actually consume the rest of stdin, or ghci will try to interpret it as commands.
* Add comprehensive test for codepage encodings+recovery for themMax Bolingbroke2013-05-087-0/+485
|
* Test fix for #7853Max Bolingbroke2013-04-233-0/+40
|
* Add test for #7522Max Bolingbroke2013-04-103-0/+25
|
* Remove uses of compose(s) in testsIan Lynagh2013-02-141-7/+9
|
* T3307 and environment001 just fail on MSYSIan Lynagh2013-02-111-2/+2
|
* Follow changes in testsuiteIan Lynagh2013-02-111-4/+4
|
* Follow changes in the testsuiteIan Lynagh2013-02-111-3/+3
|
* Follow testsuite changesIan Lynagh2013-02-081-2/+2
|
* Fix an 'if windows' test to cover Win64 tooIan Lynagh2013-01-261-1/+1
|
* Rename some numeric tests: nnnn -> TnnnnIan Lynagh2013-01-2514-25/+25
|
* Follow module removal in hDuplicateTo001 testIan Lynagh2012-09-201-2/+3
|
* Update tests following changes in baseIan Lynagh2012-06-2018-33/+40
|
* Use expect_broken rather than expect_fail in testsuite driverIan Lynagh2012-05-261-2/+2
|
* Use in-process file locking on Windows (#4363)Paolo Capriotti2012-05-084-45/+0
|
* Fix some more tests on Win64Ian Lynagh2012-05-014-0/+0
|
* Remove old test outputsIan Lynagh2012-05-013-22/+0
| | | | These files are no longer used
* Fix openFile003 for Win64Ian Lynagh2012-05-011-0/+0
|