os/exec: fix TestWaitInterrupt/WaitDelay error message

As the comments say. Here we expect err to be nil instead of ctx.Err()

Change-Id: I4cd02d62ac0a13c9577a567de36742f13d140d36
GitHub-Last-Rev: 6bedfbc9d2
GitHub-Pull-Request: golang/go#56698
Reviewed-on: https://go-review.googlesource.com/c/go/+/449737
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
This commit is contained in:
scott 2022-11-11 03:55:08 +00:00 committed by Gopher Robot
parent c3aac6c010
commit 7e4191e686
1 changed files with 1 additions and 1 deletions

View File

@ -1357,7 +1357,7 @@ func TestWaitInterrupt(t *testing.T) {
// context expired, a successful exit is valid (even if late) and does
// not merit a non-nil error.
if err != nil {
t.Errorf("Wait: %v; want %v", err, ctx.Err())
t.Errorf("Wait: %v; want nil", err)
}
if ps := cmd.ProcessState; !ps.Exited() {
t.Errorf("cmd did not exit: %v", ps)