From: Austin Clements Date: Thu, 9 Dec 2021 18:52:18 +0000 (-0500) Subject: runtime: run gdb with a timeout for TestGdbBacktrace X-Git-Tag: go1.18beta1~23 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=8692bacb6a43d1f65e09d0e581ca8b464fd77664;p=gostls13.git runtime: run gdb with a timeout for TestGdbBacktrace 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 Run-TryBot: Austin Clements Reviewed-by: Michael Knyszek TryBot-Result: Gopher Robot --- diff --git a/src/runtime/runtime-gdb_test.go b/src/runtime/runtime-gdb_test.go index 4a0f489c2f..63d3160ee4 100644 --- a/src/runtime/runtime-gdb_test.go +++ b/src/runtime/runtime-gdb_test.go @@ -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)