]> Cypherpunks.ru repositories - gostls13.git/commitdiff
os: use t.Fatalf instead of t.Errorf in TestErrProcessDone
authorJes Cok <xigua67damn@gmail.com>
Thu, 3 Aug 2023 23:50:14 +0000 (23:50 +0000)
committerGopher Robot <gobot@golang.org>
Mon, 7 Aug 2023 00:23:04 +0000 (00:23 +0000)
If err is non-nil, use t.Fatalf to avoid panic when calling p.Wait().

Change-Id: Ief4e43ba5ad782999063941ed3b12f3fe4d93621
GitHub-Last-Rev: 5d32b3c082e54a914360cb4434d4cc7682e7031e
GitHub-Pull-Request: golang/go#61740
Reviewed-on: https://go-review.googlesource.com/c/go/+/515655
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Rob Pike <r@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

src/os/exec_unix_test.go

index 26045192ff65531db928ade41fbbce7a0b11efb8..88e1b63a99e14362bb2320dacbc9826ed3d70a9f 100644 (file)
@@ -19,7 +19,7 @@ func TestErrProcessDone(t *testing.T) {
 
        p, err := StartProcess(testenv.GoToolPath(t), []string{"go"}, &ProcAttr{})
        if err != nil {
-               t.Errorf("starting test process: %v", err)
+               t.Fatalf("starting test process: %v", err)
        }
        p.Wait()
        if got := p.Signal(Kill); got != ErrProcessDone {