aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/stack_test.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-09-04 00:54:06 -0400
committerRuss Cox <rsc@golang.org>2014-09-04 00:54:06 -0400
commite3edfea07f905916cee66121576b029cd6a11444 (patch)
treea86ddfc5ae7333371708dd0041fb6ac052694309 /src/pkg/runtime/stack_test.go
parent32ecf57d22cfdf3af9419db515eba85fa1d5b67d (diff)
downloadgo-e3edfea07f905916cee66121576b029cd6a11444.tar.xz
runtime: correct various Go -> C function calls
Some things get converted. Other things (too complex or too many C deps) get onM calls. Other things (too simple) get #pragma textflag NOSPLIT. After this CL, the offending function list is basically: - panic.c - netpoll.goc - mem*.c - race stuff - readgstatus - entersyscall/exitsyscall LGTM=r, iant R=golang-codereviews, r, iant CC=dvyukov, golang-codereviews, khr https://golang.org/cl/140930043
Diffstat (limited to 'src/pkg/runtime/stack_test.go')
-rw-r--r--src/pkg/runtime/stack_test.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/pkg/runtime/stack_test.go b/src/pkg/runtime/stack_test.go
index b3dcbd12a0..a822d73db4 100644
--- a/src/pkg/runtime/stack_test.go
+++ b/src/pkg/runtime/stack_test.go
@@ -341,3 +341,12 @@ func TestStackOutput(t *testing.T) {
t.Errorf("Stack output should begin with \"goroutine \"")
}
}
+
+func TestStackAllOutput(t *testing.T) {
+ b := make([]byte, 1024)
+ stk := string(b[:Stack(b, true)])
+ if !strings.HasPrefix(stk, "goroutine ") {
+ t.Errorf("Stack (len %d):\n%s", len(stk), stk)
+ t.Errorf("Stack output should begin with \"goroutine \"")
+ }
+}