aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime
diff options
context:
space:
mode:
authorDmitriy Vyukov <dvyukov@google.com>2014-03-12 10:20:58 +0400
committerDmitriy Vyukov <dvyukov@google.com>2014-03-12 10:20:58 +0400
commit00e6fc1e9e709a5c29b79d9aed8ae135cd54a445 (patch)
treee52af531a9a0fcce7834dd871cae9c2569125c9c /src/pkg/runtime
parentb87c7729ba41972ec06387f3461b604f35484a79 (diff)
downloadgo-00e6fc1e9e709a5c29b79d9aed8ae135cd54a445.tar.xz
runtime: temporary weaken a check in test
Currently the test fails as: $ go test -v -cpu 1,1,1,1 runtime -test.run=TestStack stack_test.go:1584: Stack inuse: want 4194304, got 18446744073709547520 Update #7468 LGTM=rsc R=golang-codereviews, bradfitz CC=golang-codereviews, khr, rsc https://golang.org/cl/74010043
Diffstat (limited to 'src/pkg/runtime')
-rw-r--r--src/pkg/runtime/stack_test.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pkg/runtime/stack_test.go b/src/pkg/runtime/stack_test.go
index 00c2d0e061..b084ddddb5 100644
--- a/src/pkg/runtime/stack_test.go
+++ b/src/pkg/runtime/stack_test.go
@@ -1576,7 +1576,9 @@ func TestStackMem(t *testing.T) {
if consumed > estimate {
t.Fatalf("Stack mem: want %v, got %v", estimate, consumed)
}
- inuse := s1.StackInuse - s0.StackInuse
+ // Due to broken stack memory accounting (http://golang.org/issue/7468),
+ // StackInuse can decrease during function execution, so we cast the values to int64.
+ inuse := int64(s1.StackInuse) - int64(s0.StackInuse)
t.Logf("Inuse %vMB for stack mem", inuse>>20)
if inuse > 4<<20 {
t.Fatalf("Stack inuse: want %v, got %v", 4<<20, inuse)