From d94a1e7fe932238f9073bcbfb2821a264d9f6ac6 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 26 Mar 2015 00:39:45 +0000 Subject: [PATCH] libgo: Fix go/runtime test failure on S390. The tests run out of memory on 31-bit S390 systems because it does not have split stacks. From-SVN: r221681 --- libgo/go/runtime/chan_test.go | 5 +++++ libgo/go/runtime/map_test.go | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/libgo/go/runtime/chan_test.go b/libgo/go/runtime/chan_test.go index e689ceaed1e..4fb305c8ae3 100644 --- a/libgo/go/runtime/chan_test.go +++ b/libgo/go/runtime/chan_test.go @@ -202,6 +202,11 @@ func TestNonblockRecvRace(t *testing.T) { n := 10000 if testing.Short() { n = 100 + } else { + if runtime.GOARCH == "s390" { + // Test uses too much address space on 31-bit S390. + t.Skip("skipping long test on s390") + } } for i := 0; i < n; i++ { c := make(chan int, 1) diff --git a/libgo/go/runtime/map_test.go b/libgo/go/runtime/map_test.go index 7e4da902e7f..9ed183bb9d1 100644 --- a/libgo/go/runtime/map_test.go +++ b/libgo/go/runtime/map_test.go @@ -243,7 +243,12 @@ func TestIterGrowWithGC(t *testing.T) { func testConcurrentReadsAfterGrowth(t *testing.T, useReflect bool) { if runtime.GOMAXPROCS(-1) == 1 { - defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(16)) + if runtime.GOARCH == "s390" { + // Test uses too much address space on 31-bit S390. + defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(8)) + } else { + defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(16)) + } } numLoop := 10 numGrowStep := 250 -- 2.30.2