From fb69c67cad4d554dab8281786b7e1e2707fc3346 Mon Sep 17 00:00:00 2001 From: Matthew Dempsky Date: Tue, 5 Jan 2021 08:37:41 -0800 Subject: [PATCH] [dev.regabi] test: enable finalizer tests on !amd64 The gc implementation has had precise GC for a while now, so we can enable these tests more broadly. Confirmed that they still fail with gccgo 10.2.1. Change-Id: Ic1c0394ab832024a99e34163c422941a3706e1a2 Reviewed-on: https://go-review.googlesource.com/c/go/+/281542 Trust: Matthew Dempsky Run-TryBot: Matthew Dempsky TryBot-Result: Go Bot Reviewed-by: Cuong Manh Le --- test/deferfin.go | 7 +------ test/fixedbugs/issue5493.go | 7 +++---- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/test/deferfin.go b/test/deferfin.go index 80372916d2..1312bbbe71 100644 --- a/test/deferfin.go +++ b/test/deferfin.go @@ -18,12 +18,8 @@ import ( var sink func() func main() { - // Does not work on 32-bits due to partially conservative GC. + // Does not work with gccgo, due to partially conservative GC. // Try to enable when we have fully precise GC. - if runtime.GOARCH != "amd64" { - return - } - // Likewise for gccgo. if runtime.Compiler == "gccgo" { return } @@ -60,4 +56,3 @@ func main() { panic("not all finalizers are called") } } - diff --git a/test/fixedbugs/issue5493.go b/test/fixedbugs/issue5493.go index 2ee0398af2..8f771bc2db 100644 --- a/test/fixedbugs/issue5493.go +++ b/test/fixedbugs/issue5493.go @@ -14,6 +14,7 @@ import ( ) const N = 10 + var count int64 func run() error { @@ -31,10 +32,9 @@ func run() error { } func main() { - // Does not work on 32-bits, or with gccgo, due to partially - // conservative GC. + // Does not work with gccgo, due to partially conservative GC. // Try to enable when we have fully precise GC. - if runtime.GOARCH != "amd64" || runtime.Compiler == "gccgo" { + if runtime.Compiler == "gccgo" { return } count = N @@ -56,4 +56,3 @@ func main() { panic("not all finalizers are called") } } -