]> Cypherpunks repositories - gostls13.git/commitdiff
os/exec: fix TestWaitInterrupt/WaitDelay error message
authorscott <scottwangsxll@gmail.com>
Fri, 11 Nov 2022 03:55:08 +0000 (03:55 +0000)
committerGopher Robot <gobot@golang.org>
Fri, 11 Nov 2022 21:43:46 +0000 (21:43 +0000)
As the comments say. Here we expect err to be nil instead of ctx.Err()

Change-Id: I4cd02d62ac0a13c9577a567de36742f13d140d36
GitHub-Last-Rev: 6bedfbc9d2511140d088dc9ee5f40015725f68db
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>

src/os/exec/exec_test.go

index cb1545a65160dcb3e7a853f9e555756345da9ed9..edff9a201ef2e085a13db4826b78170e242ea8e3 100644 (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)