Skip to content

Commit a0d661a

Browse files
committed
net: skip new alloc test on some builders
Change-Id: Ib785212eb9e035a10d327696c180caf730d2e5e7 Reviewed-on: https://go-review.googlesource.com/c/go/+/361634 Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Bryan C. Mills <[email protected]> Trust: Brad Fitzpatrick <[email protected]>
1 parent 6fefb7f commit a0d661a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/net/udpsock_test.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,17 @@ func TestUDPReadTimeout(t *testing.T) {
475475
}
476476

477477
func TestAllocs(t *testing.T) {
478+
switch runtime.GOOS {
479+
case "plan9":
480+
// Plan9 wasn't optimized.
481+
t.Skipf("skipping on %v", runtime.GOOS)
482+
}
483+
builder := os.Getenv("GO_BUILDER_NAME")
484+
switch builder {
485+
case "linux-amd64-noopt":
486+
// Optimizations are required to remove the allocs.
487+
t.Skipf("skipping on %v", builder)
488+
}
478489
conn, err := ListenUDP("udp4", &UDPAddr{IP: IPv4(127, 0, 0, 1)})
479490
if err != nil {
480491
t.Fatal(err)

0 commit comments

Comments
 (0)