haskell / haskell/cabal

Interrupting `cabal test` may leave test executable running

Open
#9,913 1 comment 0 reactions 0 assignees View on GitHub
needs triage type: bug
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

Using the following test that loops infinitely, starting `cabal test` then Ctrl+C it leaves the test executable running because the interrupt sent by cabal doesn't kill it.

```
module Main where

main :: IO ()
main = loop 1

loop :: Int -> IO ()
loop 0 = pure ()
loop n = loop (n + 1)
```

Using cabal 3.10.2.1

(Minimized from a Stackoverflow question: https://stackoverflow.com/questions/78357175/never-ending-quickcheck-test-leaves-running-process-even-after-interrupting-cab )

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with the infinite-looping Main module shown in the report and run it through cabal test. Trace how Ctrl+C is handled and propagated from cabal to the test executable. Done means interrupting cabal test also terminates the running test process.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
build-system, cli, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.