]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: check for ErrWaitDelay in runBuiltTestProg
authorBryan C. Mills <bcmills@google.com>
Tue, 1 Nov 2022 13:24:54 +0000 (09:24 -0400)
committerGopher Robot <gobot@golang.org>
Tue, 1 Nov 2022 21:32:26 +0000 (21:32 +0000)
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 <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>

src/runtime/crash_test.go

index 6e00489b49563a5ddc0c61d6a795c77f18a6b2ad..3782a9272962a8ca4cd4be8a5ef3b77dd6515d65 100644 (file)
@@ -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)
                }