From: Jes Cok Date: Thu, 3 Aug 2023 23:50:14 +0000 (+0000) Subject: os: use t.Fatalf instead of t.Errorf in TestErrProcessDone X-Git-Tag: go1.22rc1~1404 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=b55e4a7e26a8663d427264b241a90a5213aa8392;p=gostls13.git os: use t.Fatalf instead of t.Errorf in TestErrProcessDone 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 Auto-Submit: Ian Lance Taylor Reviewed-by: Ian Lance Taylor Reviewed-by: Rob Pike Run-TryBot: Ian Lance Taylor Reviewed-by: Michael Knyszek TryBot-Result: Gopher Robot --- diff --git a/src/os/exec_unix_test.go b/src/os/exec_unix_test.go index 26045192ff..88e1b63a99 100644 --- a/src/os/exec_unix_test.go +++ b/src/os/exec_unix_test.go @@ -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 {