1
0
mirror of https://github.com/golang/go synced 2024-11-18 14:34:39 -07:00

runtime: fix runtime-gdb_test on arm

Apparently when ARM stops at a GDB breakpoint, it appears to be in
syscall.Syscall.  The "info goroutines" test expected it to be in a
runtime function.  Since this isn't fundamental to the test, simply
tweak the test's regexp to make sure "info goroutines" prints some
running goroutine with an active M, but don't require it to be in any
particular function.

Change-Id: Iba2618b46d3dc49cef62ffb72484b83ea7b0317d
Reviewed-on: https://go-review.googlesource.com/5060
Reviewed-by: Dave Cheney <dave@cheney.net>
This commit is contained in:
Austin Clements 2015-02-17 15:01:43 -05:00
parent 8ed95a942c
commit 1ab55a3f04

View File

@ -75,7 +75,7 @@ func TestGdbPython(t *testing.T) {
blocks[string(subs[1])] = string(subs[2]) blocks[string(subs[1])] = string(subs[2])
} }
infoGoroutinesRe := regexp.MustCompile(`\d+\s+running\s+runtime`) infoGoroutinesRe := regexp.MustCompile(`\*\s+\d+\s+running\s+`)
if bl := blocks["info goroutines"]; !infoGoroutinesRe.MatchString(bl) { if bl := blocks["info goroutines"]; !infoGoroutinesRe.MatchString(bl) {
t.Fatalf("info goroutines failed: %s", bl) t.Fatalf("info goroutines failed: %s", bl)
} }