]> Cypherpunks repositories - gostls13.git/commit
cmd/go/internal/script: use the Cancel and WaitDelay fields for subprocesses
authorBryan C. Mills <bcmills@google.com>
Tue, 25 Oct 2022 21:05:46 +0000 (17:05 -0400)
committerBryan Mills <bcmills@google.com>
Wed, 26 Oct 2022 14:08:16 +0000 (14:08 +0000)
commit49abdbccde5de042997d6aabe7819212b88f2ef5
tree14f3d3886ec018e419ac8235253c5627ef190c15
parent939f9fd64a740ef770a0ca3588f8c193dceebe83
cmd/go/internal/script: use the Cancel and WaitDelay fields for subprocesses

The Cancel and WaitDelay fields recently added to exec.Cmd are
intended to support exactly the sort of cancellation behavior that we
need for script tests. Use them, and simplify the cmd/go tests
accordingly.

The more robust implementation may also help to diagose recurring test
hangs (#50187).

For #50187.
Updates #27494.

Change-Id: I7817fca0dd9a18e18984a252d3116f6a5275a401
Reviewed-on: https://go-review.googlesource.com/c/go/+/445357
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/go/internal/script/cmds.go
src/cmd/go/internal/vcweb/script.go
src/cmd/go/scriptcmds_test.go