summaryrefslogtreecommitdiffstats
path: root/vendor/golang.org/x/net/ipv4/unicastsockopt_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/golang.org/x/net/ipv4/unicastsockopt_test.go')
-rw-r--r--vendor/golang.org/x/net/ipv4/unicastsockopt_test.go21
1 files changed, 15 insertions, 6 deletions
diff --git a/vendor/golang.org/x/net/ipv4/unicastsockopt_test.go b/vendor/golang.org/x/net/ipv4/unicastsockopt_test.go
index b047e51f9..db5213b91 100644
--- a/vendor/golang.org/x/net/ipv4/unicastsockopt_test.go
+++ b/vendor/golang.org/x/net/ipv4/unicastsockopt_test.go
@@ -16,7 +16,7 @@ import (
func TestConnUnicastSocketOptions(t *testing.T) {
switch runtime.GOOS {
- case "nacl", "plan9":
+ case "nacl", "plan9", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagLoopback)
@@ -30,8 +30,15 @@ func TestConnUnicastSocketOptions(t *testing.T) {
}
defer ln.Close()
- done := make(chan bool)
- go acceptor(t, ln, done)
+ errc := make(chan error, 1)
+ go func() {
+ c, err := ln.Accept()
+ if err != nil {
+ errc <- err
+ return
+ }
+ errc <- c.Close()
+ }()
c, err := net.Dial("tcp4", ln.Addr().String())
if err != nil {
@@ -41,7 +48,9 @@ func TestConnUnicastSocketOptions(t *testing.T) {
testUnicastSocketOptions(t, ipv4.NewConn(c))
- <-done
+ if err := <-errc; err != nil {
+ t.Errorf("server: %v", err)
+ }
}
var packetConnUnicastSocketOptionTests = []struct {
@@ -53,7 +62,7 @@ var packetConnUnicastSocketOptionTests = []struct {
func TestPacketConnUnicastSocketOptions(t *testing.T) {
switch runtime.GOOS {
- case "nacl", "plan9":
+ case "nacl", "plan9", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagLoopback)
@@ -79,7 +88,7 @@ func TestPacketConnUnicastSocketOptions(t *testing.T) {
func TestRawConnUnicastSocketOptions(t *testing.T) {
switch runtime.GOOS {
- case "nacl", "plan9":
+ case "nacl", "plan9", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
if m, ok := nettest.SupportsRawIPSocket(); !ok {