diff options
author | David Crawshaw <crawshaw@golang.org> | 2015-03-04 12:55:04 -0500 |
---|---|---|
committer | David Crawshaw <crawshaw@golang.org> | 2015-03-04 22:13:06 +0000 |
commit | 258752079766607682e07834e81e0b69208cece8 (patch) | |
tree | 6ddbede0dd3b8dbe962fd413c5cfa2c6978935f4 /src/log | |
parent | 4c6364a87d4af0fea95ebaf3ee429b23d1105c43 (diff) | |
download | go-258752079766607682e07834e81e0b69208cece8.tar.gz go-258752079766607682e07834e81e0b69208cece8.zip |
log/syslog: avoid unix sockets on darwin/arm
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>
Diffstat (limited to 'src/log')
-rw-r--r-- | src/log/syslog/syslog_test.go | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/log/syslog/syslog_test.go b/src/log/syslog/syslog_test.go index 6a863fed31..7f7d7fd6d8 100644 --- a/src/log/syslog/syslog_test.go +++ b/src/log/syslog/syslog_test.go @@ -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) |