Commit 0d9524a8 authored by Michael Snoyman's avatar Michael Snoyman Committed by Ben Gamari
Browse files

Disable T-signals-child test on single-threaded runtime

As identified by Joachim, this test broke the Travis build. It appears
that this is due to the usage of the single-threaded runtime there. I've
confirmed that this fix causes the Travis build to pass:

Test Plan: Confirm tests now pass

Reviewers: austin, nomeata, bgamari

Reviewed By: nomeata, bgamari

Subscribers: thomie

Differential Revision:
parent 6c739326
import Control.Concurrent.MVar (readMVar)
import System.Environment (getArgs)
import System.Exit (ExitCode (ExitFailure), exitFailure)
import System.IO (hGetLine, hPutStrLn)
import System.IO (hClose, hGetLine, hPutStrLn)
import System.Posix.Process (exitImmediately, getProcessID)
import System.Posix.Signals (Handler (Catch), installHandler, sigHUP,
......@@ -9,6 +9,7 @@ import System.Process (StdStream (CreatePipe), createProcess, proc,
std_in, std_out, waitForProcess)
import System.Process.Internals (ProcessHandle (..),
ProcessHandle__ (OpenHandle))
import System.Timeout (timeout)
main :: IO ()
main = do
......@@ -46,6 +47,7 @@ runParent runghc = do
-- Send the child some input so that it will exit if it didn't
-- have a sigHUP handler installed.
hPutStrLn inH ""
hClose inH
-- Read out the rest of stdout from the child, which will be
-- either "NOSIGNAL\n" or "HUP\n"
......@@ -95,7 +97,10 @@ runChild = do
-- Block until we receive input, giving a chance for the signal
-- handler to be triggered, and if the signal handler isn't
-- triggered, gives us an escape route from this function.
_ <- getLine
-- Include a reasonable timeout to prevent this from running for
-- too long
_ <- timeout 10000000 getLine
-- Reaching this point indicates a failure of the test. Print some
-- non HUP message and exit with a non HUP exit
......@@ -10,6 +10,8 @@ test('T11247', [req_interp, expect_broken(11247)], run_command,
test('T6132', [when(opsys('darwin'), expect_broken(6132))], compile, [''])
[when(opsys('mingw32'), skip), req_interp],
[ when(opsys('mingw32'), skip), req_interp
, only_ways(['threaded1', 'threaded2'])
['$MAKE --no-print-directory -s T-signals-child'])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment