]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: re-add sanity check for GCCPUFraction
authorAustin Clements <austin@google.com>
Mon, 10 Jul 2017 18:34:26 +0000 (14:34 -0400)
committerAustin Clements <austin@google.com>
Fri, 22 Sep 2017 20:05:37 +0000 (20:05 +0000)
This no longer appears to be reproducible on windows/386. Try putting
it back and we'll see if the builders still don't like it.

Fixes #19319.

Change-Id: Ia47b034e18d0a5a1951125c00542b021aacd5e8d
Reviewed-on: https://go-review.googlesource.com/47936
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/runtime/malloc_test.go

index d9487eed3ae692f76b5cbc3936468f24c885ed37..93aa56dbd59e7fa3dd2005f84e4202955a85e792 100644 (file)
@@ -46,9 +46,6 @@ func TestMemStats(t *testing.T) {
        }
        // Of the uint fields, HeapReleased, HeapIdle can be 0.
        // PauseTotalNs can be 0 if timer resolution is poor.
-       //
-       // TODO: Test that GCCPUFraction is <= 0.99. This currently
-       // fails on windows/386. (Issue #19319)
        fields := map[string][]func(interface{}) error{
                "Alloc": {nz, le(1e10)}, "TotalAlloc": {nz, le(1e11)}, "Sys": {nz, le(1e10)},
                "Lookups": {nz, le(1e10)}, "Mallocs": {nz, le(1e10)}, "Frees": {nz, le(1e10)},
@@ -61,7 +58,7 @@ func TestMemStats(t *testing.T) {
                "NextGC": {nz, le(1e10)}, "LastGC": {nz},
                "PauseTotalNs": {le(1e11)}, "PauseNs": nil, "PauseEnd": nil,
                "NumGC": {nz, le(1e9)}, "NumForcedGC": {nz, le(1e9)},
-               "GCCPUFraction": nil, "EnableGC": {eq(true)}, "DebugGC": {eq(false)},
+               "GCCPUFraction": {le(0.99)}, "EnableGC": {eq(true)}, "DebugGC": {eq(false)},
                "BySize": nil,
        }