summaryrefslogtreecommitdiff
path: root/libraries/base/tests/IO
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/base/tests/IO')
-rw-r--r--libraries/base/tests/IO/all.T3
-rw-r--r--libraries/base/tests/IO/concio002.hs14
-rw-r--r--libraries/base/tests/IO/concio002.stdout4
-rw-r--r--libraries/base/tests/IO/hClose003.hs42
-rw-r--r--libraries/base/tests/IO/hClose003.stdout4
5 files changed, 0 insertions, 67 deletions
diff --git a/libraries/base/tests/IO/all.T b/libraries/base/tests/IO/all.T
index 2d4c85700f..7e54bb9ea2 100644
--- a/libraries/base/tests/IO/all.T
+++ b/libraries/base/tests/IO/all.T
@@ -11,7 +11,6 @@ test('IOError002', normal, compile_and_run, [''])
test('finalization001', normal, compile_and_run, [''])
test('hClose001', [], compile_and_run, [''])
test('hClose002', [normalise_win32_io_errors], compile_and_run, [''])
-test('hClose003', reqlib('unix'), compile_and_run, ['-package unix'])
test('hFileSize001', normal, compile_and_run, [''])
test('hFileSize002', [omit_ways(['ghci'])], compile_and_run, [''])
test('hFlush001', [], compile_and_run, [''])
@@ -96,8 +95,6 @@ test('concio001', [normal, multi_cpu_race],
test('concio001.thr', [extra_files(['concio001.hs']), multi_cpu_race],
makefile_test, ['test.concio001.thr'])
-test('concio002', reqlib('process'), compile_and_run, [''])
-
test('T2122', [], compile_and_run, [''])
test('T3307', [], makefile_test, ['T3307-test'])
test('T4855', normal, compile_and_run, [''])
diff --git a/libraries/base/tests/IO/concio002.hs b/libraries/base/tests/IO/concio002.hs
deleted file mode 100644
index 60a2ed2a89..0000000000
--- a/libraries/base/tests/IO/concio002.hs
+++ /dev/null
@@ -1,14 +0,0 @@
-import System.Process
-import System.IO
-import Control.Concurrent
-
-main = do
- (hin,hout,herr,ph) <- runInteractiveProcess "cat" [] Nothing Nothing
- forkIO $ do threadDelay 100000
- putStrLn "child"
- hFlush stdout
- hPutStrLn hin "msg"
- hFlush hin
- putStrLn "parent1"
- hGetLine hout >>= putStrLn
- putStrLn "parent2"
diff --git a/libraries/base/tests/IO/concio002.stdout b/libraries/base/tests/IO/concio002.stdout
deleted file mode 100644
index 32640aede5..0000000000
--- a/libraries/base/tests/IO/concio002.stdout
+++ /dev/null
@@ -1,4 +0,0 @@
-parent1
-child
-msg
-parent2
diff --git a/libraries/base/tests/IO/hClose003.hs b/libraries/base/tests/IO/hClose003.hs
deleted file mode 100644
index 6d962fd94e..0000000000
--- a/libraries/base/tests/IO/hClose003.hs
+++ /dev/null
@@ -1,42 +0,0 @@
--- Test for #3128, file descriptor leak when hClose fails
-
-import System.IO
-import Control.Exception
-import Data.Char
-
-import System.Posix
-import qualified GHC.IO.Device as IODevice
-import GHC.IO.Handle
-import GHC.IO.Handle.Internals
-import GHC.IO.Handle.Types
-import System.Posix.Internals
-
-main = do
- (read,write) <- createPipe
- hread <- fdToHandle read
- hwrite <- fdToHandle write
-
- -- close the FD without telling the IO library:
- showPossibleException (hClose hread)
- hIsOpen hread >>= print
-
- -- put some data in the Handle's write buffer:
- hPutStr hwrite "testing"
- -- now try to close the Handle:
- showPossibleException (hClose hwrite)
- hIsOpen hwrite >>= print
-
-showPossibleException :: IO () -> IO ()
-showPossibleException f = do
- e <- try f
- putStrLn (sanitise (show (e :: Either SomeException ())))
- where
- -- we don't care which file descriptor it is
- sanitise [] = []
- sanitise (x:xs) = if isDigit x then ('X':(sanitise' xs)) else (x:(sanitise xs))
- sanitise' [] = []
- sanitise' (x:xs) = if isDigit x then (sanitise' xs) else (x:(sanitise xs))
-
-naughtyClose h =
- withHandle_ "naughtyClose" h $ \ Handle__{haDevice=dev} ->
- IODevice.close dev
diff --git a/libraries/base/tests/IO/hClose003.stdout b/libraries/base/tests/IO/hClose003.stdout
deleted file mode 100644
index d12f84d7d7..0000000000
--- a/libraries/base/tests/IO/hClose003.stdout
+++ /dev/null
@@ -1,4 +0,0 @@
-Right ()
-False
-Left <file descriptor: X>: hClose: resource vanished (Broken pipe)
-False