]> Cypherpunks repositories - gostls13.git/commitdiff
Revert "test: add regression test from #41474"
authorAlberto Donizetti <alb.donizetti@gmail.com>
Sun, 18 Oct 2020 20:21:03 +0000 (20:21 +0000)
committerBryan C. Mills <bcmills@google.com>
Mon, 19 Oct 2020 13:49:50 +0000 (13:49 +0000)
This reverts CL 263097.

Reason for revert: broke the noopt builder.

Change-Id: Ie36d2c3ed9449b4425732072db624c8e18f965f3
Reviewed-on: https://go-review.googlesource.com/c/go/+/263537
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Alberto Donizetti <alb.donizetti@gmail.com>

src/os/os_test.go

index 50160eac38524cb25494a2a6ea463090937fdff8..865dfcc0defd2995d098b460c3b63373b274f066 100644 (file)
@@ -9,7 +9,6 @@ import (
        "errors"
        "flag"
        "fmt"
-       "internal/race"
        "internal/testenv"
        "io"
        "io/ioutil"
@@ -2580,20 +2579,3 @@ func TestOpenFileKeepsPermissions(t *testing.T) {
                t.Errorf("Stat after OpenFile is %v, should be writable", fi.Mode())
        }
 }
-
-// Issue 41474.
-func TestStdoutWriteDoesNotHeapAllocate(t *testing.T) {
-       if runtime.GOOS == "js" || runtime.GOOS == "windows" {
-               t.Skip("Still heap allocates on js/wasm and windows, but it used to too")
-       }
-       if race.Enabled {
-               t.Skip("Heap allocates in race mode")
-       }
-
-       n := testing.AllocsPerRun(10, func() {
-               Stdout.Write([]byte{'h', 'e', 'l', 'l', 'o', '\n'})
-       })
-       if n != 0 {
-               t.Errorf("AllocsPerRun = %v, want 0", n)
-       }
-}