Change information
Commit message:
cmd/internal/script: help deflake "WaitDelay expired" errors by reporting the duration
Issue #76685 has many watchflake reports that include the error
"WaitDelay expired". I have been able to reproduce some of those flakes.
The cmd/link testscripts have the highest volume on #76685, such as:
script_test_basics.txt:6: cc -c testdata/mumble.c: exec: WaitDelay expired before I/O complete
To help triage, this CL adds the os/exec.Cmd.WaitDelay duration to
the error string. That sample error becomes:
script_test_basics.txt:6: cc -c testdata/mumble.c: exec: WaitDelay expired before I/O complete: output pipes not closed after waiting 100ms
The 100ms shown is a concrete clue that the WaitDelay could be higher.
The next CL 785722 attempts to address that, hopefully eliminating those
particular flakes.
This code path is used by cmd/link tests, as well as testscript tests
in cmd/go, cmd/compile, cmd/internal/fuzztest, and cmd/internal/test2json.
Updates #76685
Updates #79409
Change-Id: Ib03dceccb839dc7653b86ca977e1a54bb48e7ead
Files:
- M src/cmd/internal/script/cmds.go
Change size: XS
Delta: 1 file changed, 3 insertions(+), 0 deletions(-)
Branch: refs/heads/master