netutil: skip TestLimitListener on plan9
This may be a platform bug, but nobody has investigated it since the
issue was filed in 2017. Skip it to reduce noise from flakes.
For golang/go#22926
Change-Id: I8f310a539992c4552abb50fea3c7adc2149818ef
Reviewed-on: https://go-review.googlesource.com/c/net/+/369054
Trust: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: David du Colombier <0intro@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
diff --git a/netutil/listen_test.go b/netutil/listen_test.go
index a9f596d..0108e8d 100644
--- a/netutil/listen_test.go
+++ b/netutil/listen_test.go
@@ -11,6 +11,7 @@
"io/ioutil"
"net"
"net/http"
+ "runtime"
"sync"
"sync/atomic"
"testing"
@@ -21,6 +22,10 @@
const timeout = 5 * time.Second
func TestLimitListener(t *testing.T) {
+ if runtime.GOOS == "plan9" {
+ t.Skipf("skipping test known to be flaky on plan9 (https://golang.org/issue/22926)")
+ }
+
const max = 5
attempts := (maxOpenFiles() - max) / 2
if attempts > 256 { // maximum length of accept queue is 128 by default