From 1587c3658349643ae76acf3d3fc3f0ea5cafe61d Mon Sep 17 00:00:00 2001 From: "Bryan C. Mills" Date: Tue, 1 Nov 2022 09:24:54 -0400 Subject: [PATCH] runtime: check for ErrWaitDelay in runBuiltTestProg MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ErrWaitDelay is not expected to occur in this test, but if it does it indicates a failure mode very different from the “failed to start” catchall that we log for other non-ExitError errors. Updates #50436. Change-Id: I3f4d87d502f772bf471fc17303d5a6b483446f8f Reviewed-on: https://go-review.googlesource.com/c/go/+/446876 Reviewed-by: Ian Lance Taylor TryBot-Result: Gopher Robot Auto-Submit: Bryan Mills Run-TryBot: Bryan Mills --- src/runtime/crash_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/runtime/crash_test.go b/src/runtime/crash_test.go index 6e00489b49..3782a92729 100644 --- a/src/runtime/crash_test.go +++ b/src/runtime/crash_test.go @@ -77,6 +77,8 @@ func runBuiltTestProg(t *testing.T, exe, name string, env ...string) string { if err != nil { if _, ok := err.(*exec.ExitError); ok { t.Logf("%v: %v", cmd, err) + } else if errors.Is(err, exec.ErrWaitDelay) { + t.Fatalf("%v: %v", cmd, err) } else { t.Fatalf("%v failed to start: %v", cmd, err) }