]> Cypherpunks repositories - gostls13.git/commitdiff
log/syslog: avoid unix sockets on darwin/arm
authorDavid Crawshaw <crawshaw@golang.org>
Wed, 4 Mar 2015 17:55:04 +0000 (12:55 -0500)
committerDavid Crawshaw <crawshaw@golang.org>
Wed, 4 Mar 2015 22:13:06 +0000 (22:13 +0000)
Change-Id: Ice4f78e74ec3025a974ffd9ca5e3d28bb3164f40
Reviewed-on: https://go-review.googlesource.com/6794
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: David Crawshaw <crawshaw@golang.org>

src/log/syslog/syslog_test.go

index 6a863fed3126062d4ece93e23888102e8c53486a..7f7d7fd6d83a9407a0f7fe5456bc83000ffd6740 100644 (file)
@@ -14,6 +14,7 @@ import (
        "log"
        "net"
        "os"
+       "runtime"
        "sync"
        "testing"
        "time"
@@ -120,6 +121,10 @@ func TestWithSimulated(t *testing.T) {
        msg := "Test 123"
        transport := []string{"unix", "unixgram", "udp", "tcp"}
 
+       if runtime.GOOS == "darwin" && runtime.GOARCH == "arm" {
+               transport = []string{"udp", "tcp"}
+       }
+
        for _, tr := range transport {
                done := make(chan string)
                addr, sock, srvWG := startServer(tr, "", done)
@@ -142,6 +147,10 @@ func TestWithSimulated(t *testing.T) {
 }
 
 func TestFlap(t *testing.T) {
+       if runtime.GOOS == "darwin" && runtime.GOARCH == "arm" {
+               t.Skipf("skipping on %s/%s", runtime.GOOS, runtime.GOARCH)
+       }
+
        net := "unix"
        done := make(chan string)
        addr, sock, srvWG := startServer(net, "", done)
@@ -306,9 +315,14 @@ func TestConcurrentReconnect(t *testing.T) {
        const N = 10
        const M = 100
        net := "unix"
+       if runtime.GOOS == "darwin" && runtime.GOARCH == "arm" {
+               net = "tcp"
+       }
        done := make(chan string, N*M)
        addr, sock, srvWG := startServer(net, "", done)
-       defer os.Remove(addr)
+       if net == "unix" {
+               defer os.Remove(addr)
+       }
 
        // count all the messages arriving
        count := make(chan int)