]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: run gdb with a timeout for TestGdbBacktrace
authorAustin Clements <austin@google.com>
Thu, 9 Dec 2021 18:52:18 +0000 (13:52 -0500)
committerAustin Clements <austin@google.com>
Sun, 12 Dec 2021 14:36:21 +0000 (14:36 +0000)
This sometimes times out and we don't have any useful output for
debugging it. Hopefully this will help.

For #37405.

Change-Id: I79074e6fbb9bd16a864c651109a0acbfc8aa6cef
Reviewed-on: https://go-review.googlesource.com/c/go/+/370703
Trust: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

src/runtime/runtime-gdb_test.go

index 4a0f489c2f8b04de0f172f8a8372feda5a9556f4..63d3160ee47716196e748d990cc4518ddfd88fc6 100644 (file)
@@ -424,7 +424,7 @@ func TestGdbBacktrace(t *testing.T) {
                "-ex", "continue",
                filepath.Join(dir, "a.exe"),
        }
-       got, err := exec.Command("gdb", args...).CombinedOutput()
+       got, err := testenv.RunWithTimeout(t, exec.Command("gdb", args...))
        t.Logf("gdb output:\n%s", got)
        if err != nil {
                t.Fatalf("gdb exited with error: %v", err)