mirror of https://github.com/golang/go.git
runtime: deflake TestStackMem
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
This commit is contained in:
parent
e0fd6d08b2
commit
7f070af515
|
|
@ -1576,7 +1576,9 @@ func TestStackMem(t *testing.T) {
|
|||
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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue