1
0
mirror of https://github.com/golang/go synced 2024-07-01 07:56:09 +00:00

[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 <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
This commit is contained in:
Matthew Dempsky 2021-01-05 08:37:41 -08:00
parent 81f4f0e912
commit fb69c67cad
2 changed files with 4 additions and 10 deletions

View File

@ -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")
}
}

View File

@ -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")
}
}