Skip to content

Add grace-period timeout handling for stack test suites #6867

@DanBurton

Description

@DanBurton

Please add an option to pair with --test-suite-timeout that does staged termination:

  • on timeout, send SIGTERM
  • wait configurable grace period (e.g. --test-suite-timeout-grace)
  • if still running, send SIGKILL

This would give a per-test-suite guaranteed stop.

As a stackage curator, I want this because we use stack to run stackage nightly builds, and recently had a test suite get stuck in a way that was resistant to SIGTERM.

(Back-compat: if grace is not set, keep current behavior unchanged.)

Here is an example of how I implemented something like this in Haskell after a bit of trial and error (race was not cutting it), and a test that demonstrates that it works: commercialhaskell/curator@afbc5f3#diff-6e439c3b5af547403c42a51c36fc21f684cb244284ec796a0f8386d8785d7143

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions