]> Cypherpunks.ru repositories - gostls13.git/commit
testenv: abstract run-with-timeout into testenv
authorAustin Clements <austin@google.com>
Thu, 9 Dec 2021 17:25:04 +0000 (12:25 -0500)
committerAustin Clements <austin@google.com>
Sun, 12 Dec 2021 14:36:17 +0000 (14:36 +0000)
commit6b8977372263504535cad6e880ffca156bdfdf68
tree297070d02a02d5b76fe49912dfa2a820acfb26eb
parent9c6e8f63c0e4f24ccf4326164ddbc0f0607343a2
testenv: abstract run-with-timeout into testenv

This lifts the logic to run a subcommand with a timeout in a test from
the runtime's runTestProg into testenv. The implementation is
unchanged in this CL. We'll improve it in a future CL.

Currently, tests that run subcommands usually just timeout with no
useful output if the subcommand runs for too long. This is a step
toward improving this.

For #37405.

Change-Id: I2298770db516e216379c4c438e05d23cbbdda51d
Reviewed-on: https://go-review.googlesource.com/c/go/+/370701
Trust: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
src/internal/testenv/testenv.go
src/internal/testenv/testenv_notunix.go [moved from src/runtime/crash_nonunix_test.go with 57% similarity]
src/internal/testenv/testenv_unix.go [new file with mode: 0644]
src/runtime/crash_test.go
src/runtime/crash_unix_test.go