1
0
mirror of https://github.com/golang/go synced 2024-11-19 08:54:47 -07:00

net: skip unsupported tests (unix and unixgram) on darwin/arm

Change-Id: Id1927180ecd18b849727225adea05465d36b3973
Reviewed-on: https://go-review.googlesource.com/6210
Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
Shenghou Ma 2015-02-26 18:25:29 -05:00 committed by Minux Ma
parent 122384e489
commit 4c6364a87d
5 changed files with 26 additions and 0 deletions

View File

@ -36,6 +36,10 @@ func TestConnAndListener(t *testing.T) {
case "nacl", "plan9", "windows":
continue
}
// iOS does not support unix domain sockets
if runtime.GOOS == "darwin" && runtime.GOARCH == "arm" {
continue
}
case "unixpacket":
switch runtime.GOOS {
case "android", "darwin", "nacl", "openbsd", "plan9", "windows":

View File

@ -66,6 +66,10 @@ func TestShutdownUnix(t *testing.T) {
switch runtime.GOOS {
case "nacl", "plan9", "windows":
t.Skipf("skipping test on %q", runtime.GOOS)
case "darwin":
if runtime.GOARCH == "arm" {
t.Skipf("skipping test on %s/%s", runtime.GOOS, runtime.GOARCH)
}
}
f, err := ioutil.TempFile("", "go_net_unixtest")
if err != nil {

View File

@ -51,6 +51,9 @@ var packetConnTests = []struct {
}
func TestPacketConn(t *testing.T) {
if runtime.GOOS == "darwin" && runtime.GOARCH == "arm" {
t.Skip("skipping test on darwin/arm")
}
closer := func(c PacketConn, net, addr1, addr2 string) {
c.Close()
switch net {
@ -106,6 +109,9 @@ func TestPacketConn(t *testing.T) {
}
func TestConnAndPacketConn(t *testing.T) {
if runtime.GOOS == "darwin" && runtime.GOARCH == "arm" {
t.Skip("skipping test on darwin/arm")
}
closer := func(c PacketConn, net, addr1, addr2 string) {
c.Close()
switch net {

View File

@ -221,6 +221,10 @@ func TestUnixListenerSpecificMethods(t *testing.T) {
switch runtime.GOOS {
case "nacl", "plan9", "windows":
t.Skipf("skipping test on %q", runtime.GOOS)
case "darwin":
if runtime.GOARCH == "arm" {
t.Skipf("skipping test on %s/%s", runtime.GOOS, runtime.GOARCH)
}
}
addr := testUnixAddr()
@ -263,6 +267,10 @@ func TestUnixConnSpecificMethods(t *testing.T) {
switch runtime.GOOS {
case "nacl", "plan9", "windows":
t.Skipf("skipping test on %q", runtime.GOOS)
case "darwin":
if runtime.GOARCH == "arm" {
t.Skipf("skipping test on %s/%s", runtime.GOOS, runtime.GOARCH)
}
}
addr1, addr2, addr3 := testUnixAddr(), testUnixAddr(), testUnixAddr()

View File

@ -21,6 +21,10 @@ func skipServerTest(net, unixsotype, addr string, ipv6, ipv4map, linuxOnly bool)
if net == unixsotype {
return true
}
case "darwin":
if runtime.GOARCH == "arm" && net == unixsotype {
return true
}
default:
if net == unixsotype && linuxOnly {
return true