summaryrefslogtreecommitdiff
path: root/libgo/go/runtime/gc_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/runtime/gc_test.go')
-rw-r--r--libgo/go/runtime/gc_test.go45
1 files changed, 2 insertions, 43 deletions
diff --git a/libgo/go/runtime/gc_test.go b/libgo/go/runtime/gc_test.go
index 11035c321ab..2a6acf0836e 100644
--- a/libgo/go/runtime/gc_test.go
+++ b/libgo/go/runtime/gc_test.go
@@ -400,39 +400,6 @@ func TestPrintGC(t *testing.T) {
close(done)
}
-/*
-
-// The implicit y, ok := x.(error) for the case error
-// in testTypeSwitch used to not initialize the result y
-// before passing &y to assertE2I2GC.
-// Catch this by making assertE2I2 call runtime.GC,
-// which will force a stack scan and failure if there are
-// bad pointers, and then fill the stack with bad pointers
-// and run the type switch.
-func TestAssertE2I2Liveness(t *testing.T) {
- // Note that this flag is defined in export_test.go
- // and is not available to ordinary imports of runtime.
- *runtime.TestingAssertE2I2GC = true
- defer func() {
- *runtime.TestingAssertE2I2GC = false
- }()
-
- poisonStack()
- testTypeSwitch(io.EOF)
- poisonStack()
- testAssert(io.EOF)
- poisonStack()
- testAssertVar(io.EOF)
-}
-
-func poisonStack() uintptr {
- var x [1000]uintptr
- for i := range x {
- x[i] = 0xff
- }
- return x[123]
-}
-
func testTypeSwitch(x interface{}) error {
switch y := x.(type) {
case nil:
@@ -458,16 +425,6 @@ func testAssertVar(x interface{}) error {
return nil
}
-func TestAssertE2T2Liveness(t *testing.T) {
- *runtime.TestingAssertE2T2GC = true
- defer func() {
- *runtime.TestingAssertE2T2GC = false
- }()
-
- poisonStack()
- testIfaceEqual(io.EOF)
-}
-
var a bool
//go:noinline
@@ -477,6 +434,8 @@ func testIfaceEqual(x interface{}) {
}
}
+/*
+
func TestPageAccounting(t *testing.T) {
// Grow the heap in small increments. This used to drop the
// pages-in-use count below zero because of a rounding