From 85266dfd4dd9932672258e0a9f68e3fc96a44ec8 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Tue, 22 May 2012 00:07:13 -0400 Subject: [PATCH] runtime: relax TestGcSys This fixes occasional 64-bit failures. Maybe it will fix the 32-bit failures too, so re-enable on 32-bit for now. R=golang-dev, bradfitz, r, dvyukov CC=golang-dev https://golang.org/cl/6218050 --- src/pkg/runtime/gc_test.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/pkg/runtime/gc_test.go b/src/pkg/runtime/gc_test.go index fdbe13ebbe..783409b689 100644 --- a/src/pkg/runtime/gc_test.go +++ b/src/pkg/runtime/gc_test.go @@ -10,11 +10,6 @@ import ( ) func TestGcSys(t *testing.T) { - if runtime.GOARCH != "amd64" { - // TODO(adg): remove this when precise gc is implemented - t.Logf("skipping on non-amd64 systems") - return - } memstats := new(runtime.MemStats) runtime.GC() runtime.ReadMemStats(memstats) @@ -31,6 +26,7 @@ func TestGcSys(t *testing.T) { } // Should only be using a few MB. + // We allocated 100 MB or (if not short) 1 GB. runtime.ReadMemStats(memstats) if sys > memstats.Sys { sys = 0 @@ -38,7 +34,7 @@ func TestGcSys(t *testing.T) { sys = memstats.Sys - sys } t.Logf("used %d extra bytes", sys) - if sys > 4<<20 { + if sys > 16<<20 { t.Fatalf("using too much memory: %d bytes", sys) } } -- 2.48.1