diff --git a/src/internal/testenv/testenv.go b/src/internal/testenv/testenv.go index eeb7d65a9b7..d7614b07068 100644 --- a/src/internal/testenv/testenv.go +++ b/src/internal/testenv/testenv.go @@ -346,6 +346,13 @@ func RunWithTimeout(t testing.TB, cmd *exec.Cmd) ([]byte, error) { case <-done: case <-time.After(time.Duration(scale) * time.Minute): p.Signal(Sigquit) + // If SIGQUIT doesn't do it after a little + // while, kill the process. + select { + case <-done: + case <-time.After(time.Duration(scale) * 30 * time.Second): + p.Signal(os.Kill) + } } }()