]> Cypherpunks repositories - gostls13.git/commit
runtime: accept NumGC==0 in TestMemStats
authorAustin Clements <austin@google.com>
Mon, 14 Dec 2015 23:04:40 +0000 (18:04 -0500)
committerAustin Clements <austin@google.com>
Wed, 16 Dec 2015 18:54:50 +0000 (18:54 +0000)
commit5de3ff2648d614a58c94549873593d98f275fdcb
treefe7f6a175f6b89f71504a20b421110c6e67494dc
parent65cd1ba682a1588e7e6e6903695772216881b3f0
runtime: accept NumGC==0 in TestMemStats

TestMemStats currently requires that NumGC != 0, but GC may
legitimately not have run (for example, if this test runs first, or
GOGC is set high, etc). Accept NumGC == 0 and instead sanity check
NumGC by making sure that all pause times after NumGC are 0.

Fixes #11989.

Change-Id: I4203859fbb83292d59a509f2eeb24d6033e7aabc
Reviewed-on: https://go-review.googlesource.com/17830
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
src/runtime/malloc_test.go