Skip to content

Commit 5c802c1

Browse files
committed
runtime: remove flaky "goroutine 2 bt" from gdb test
This part of the test has been flaky despite repeated attempts to fix it, and it is unclear what exactly it is testing. Remove it. Fixes #24616. Change-Id: If7234f99dd3d3e92f15ccb94ee13e75c6da12537 Reviewed-on: https://go-review.googlesource.com/c/go/+/233942 Run-TryBot: Josh Bleecher Snyder <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Than McIntosh <[email protected]>
1 parent 1f325af commit 5c802c1

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/runtime/runtime-gdb_test.go

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ import "fmt"
108108
import "runtime"
109109
var gslice []string
110110
func main() {
111-
go func() { select{} }() // ensure a second goroutine is running
112111
mapvar := make(map[string]string, 13)
113112
mapvar["abc"] = "def"
114113
mapvar["ghi"] = "jkl"
@@ -231,9 +230,6 @@ func testGdbPython(t *testing.T, cgo bool) {
231230
"-ex", "echo BEGIN goroutine 1 bt\n",
232231
"-ex", "goroutine 1 bt",
233232
"-ex", "echo END\n",
234-
"-ex", "echo BEGIN goroutine 2 bt\n",
235-
"-ex", "goroutine 2 bt",
236-
"-ex", "echo END\n",
237233
"-ex", "echo BEGIN goroutine all bt\n",
238234
"-ex", "goroutine all bt",
239235
"-ex", "echo END\n",
@@ -310,20 +306,14 @@ func testGdbPython(t *testing.T, cgo bool) {
310306

311307
// Check that the backtraces are well formed.
312308
checkCleanBacktrace(t, blocks["goroutine 1 bt"])
313-
checkCleanBacktrace(t, blocks["goroutine 2 bt"])
314309
checkCleanBacktrace(t, blocks["goroutine 1 bt at the end"])
315310

316311
btGoroutine1Re := regexp.MustCompile(`(?m)^#0\s+(0x[0-9a-f]+\s+in\s+)?main\.main.+at`)
317312
if bl := blocks["goroutine 1 bt"]; !btGoroutine1Re.MatchString(bl) {
318313
t.Fatalf("goroutine 1 bt failed: %s", bl)
319314
}
320315

321-
btGoroutine2Re := regexp.MustCompile(`(?m)^#0\s+(0x[0-9a-f]+\s+in\s+)?runtime.+at`)
322-
if bl := blocks["goroutine 2 bt"]; !btGoroutine2Re.MatchString(bl) {
323-
t.Fatalf("goroutine 2 bt failed: %s", bl)
324-
}
325-
326-
if bl := blocks["goroutine all bt"]; !btGoroutine1Re.MatchString(bl) || !btGoroutine2Re.MatchString(bl) {
316+
if bl := blocks["goroutine all bt"]; !btGoroutine1Re.MatchString(bl) {
327317
t.Fatalf("goroutine all bt failed: %s", bl)
328318
}
329319

0 commit comments

Comments
 (0)