aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Bleecher Snyder <josharian@gmail.com>2020-05-14 07:56:17 -0700
committerJosh Bleecher Snyder <josharian@gmail.com>2020-05-14 17:50:18 +0000
commit5c802c13e88b700b9acaf390d495a92101214e2b (patch)
tree650d94958e0b4e6dae2e0cf1c53816bb04d5ff7f
parent1f325af4dd6c07f899da0a7c0512a7d470cebf9f (diff)
downloadgo-5c802c13e88b700b9acaf390d495a92101214e2b.tar.gz
go-5c802c13e88b700b9acaf390d495a92101214e2b.zip
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 <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com>
-rw-r--r--src/runtime/runtime-gdb_test.go12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/runtime/runtime-gdb_test.go b/src/runtime/runtime-gdb_test.go
index 2dfa473514..bb625aa406 100644
--- a/src/runtime/runtime-gdb_test.go
+++ b/src/runtime/runtime-gdb_test.go
@@ -108,7 +108,6 @@ import "fmt"
import "runtime"
var gslice []string
func main() {
- go func() { select{} }() // ensure a second goroutine is running
mapvar := make(map[string]string, 13)
mapvar["abc"] = "def"
mapvar["ghi"] = "jkl"
@@ -231,9 +230,6 @@ func testGdbPython(t *testing.T, cgo bool) {
"-ex", "echo BEGIN goroutine 1 bt\n",
"-ex", "goroutine 1 bt",
"-ex", "echo END\n",
- "-ex", "echo BEGIN goroutine 2 bt\n",
- "-ex", "goroutine 2 bt",
- "-ex", "echo END\n",
"-ex", "echo BEGIN goroutine all bt\n",
"-ex", "goroutine all bt",
"-ex", "echo END\n",
@@ -310,7 +306,6 @@ func testGdbPython(t *testing.T, cgo bool) {
// Check that the backtraces are well formed.
checkCleanBacktrace(t, blocks["goroutine 1 bt"])
- checkCleanBacktrace(t, blocks["goroutine 2 bt"])
checkCleanBacktrace(t, blocks["goroutine 1 bt at the end"])
btGoroutine1Re := regexp.MustCompile(`(?m)^#0\s+(0x[0-9a-f]+\s+in\s+)?main\.main.+at`)
@@ -318,12 +313,7 @@ func testGdbPython(t *testing.T, cgo bool) {
t.Fatalf("goroutine 1 bt failed: %s", bl)
}
- btGoroutine2Re := regexp.MustCompile(`(?m)^#0\s+(0x[0-9a-f]+\s+in\s+)?runtime.+at`)
- if bl := blocks["goroutine 2 bt"]; !btGoroutine2Re.MatchString(bl) {
- t.Fatalf("goroutine 2 bt failed: %s", bl)
- }
-
- if bl := blocks["goroutine all bt"]; !btGoroutine1Re.MatchString(bl) || !btGoroutine2Re.MatchString(bl) {
+ if bl := blocks["goroutine all bt"]; !btGoroutine1Re.MatchString(bl) {
t.Fatalf("goroutine all bt failed: %s", bl)
}