From bdde41e3ba4926b9c1143502f299286d5eca6490 Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Wed, 8 Jun 2022 12:24:55 -0400 Subject: [PATCH] runtime: skip TestGdbBacktrace on gdb bug Very rarely, GDB will successfully run the whole test and the inferior will exit successfully, and then GDB itself hangs and never exits. Detect this and skip the test as flaky. We could just continue the test since all of the output we need is there, but by skipping it we're less likely to notice serious regressions in this test. Fixes #37405. Change-Id: I016cbb06f48673f064733da3e3f1ddcbefd58159 Reviewed-on: https://go-review.googlesource.com/c/go/+/411117 Reviewed-by: Cherry Mui --- src/runtime/runtime-gdb_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/runtime/runtime-gdb_test.go b/src/runtime/runtime-gdb_test.go index 063b9a7d45..d97c2a2524 100644 --- a/src/runtime/runtime-gdb_test.go +++ b/src/runtime/runtime-gdb_test.go @@ -435,6 +435,11 @@ func TestGdbBacktrace(t *testing.T) { // GDB bug: https://sourceware.org/bugzilla/show_bug.cgi?id=9086 testenv.SkipFlaky(t, 50838) } + if bytes.Contains(got, []byte(" exited normally]\n")) { + // GDB bug: Sometimes the inferior exits fine, + // but then GDB hangs. + testenv.SkipFlaky(t, 37405) + } t.Fatalf("gdb exited with error: %v", err) } -- 2.48.1