The problem is that there are lots of dead G's from previous tests,
each dead G consumes 1 stack segment.
Fixes #5034.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
7749043
if consumed > estimate {
t.Fatalf("Stack mem: want %v, got %v", estimate, consumed)
}
- if s1.StackInuse > 4<<20 {
- t.Fatalf("Stack inuse: want %v, got %v", 4<<20, s1.StackInuse)
+ inuse := s1.StackInuse - 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)
}
}