From 385327257353bab5f528dda3d5c36d679460b1de Mon Sep 17 00:00:00 2001 From: Alberto Donizetti Date: Sun, 18 Oct 2020 20:21:03 +0000 Subject: [PATCH] Revert "test: add regression test from #41474" 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 Reviewed-by: Than McIntosh Run-TryBot: Bryan C. Mills TryBot-Result: Go Bot Trust: Alberto Donizetti --- src/os/os_test.go | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/os/os_test.go b/src/os/os_test.go index 50160eac38..865dfcc0de 100644 --- a/src/os/os_test.go +++ b/src/os/os_test.go @@ -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) - } -} -- 2.50.0