From: Mikio Hara Date: Tue, 12 Mar 2013 23:26:21 +0000 (+0800) Subject: net: make sure to use /tmp in unix domain socket tests X-Git-Tag: go1.1rc2~538 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=9f399a0301fd5fd055dfcecfa366935ce3b01e16;p=gostls13.git net: make sure to use /tmp in unix domain socket tests R=golang-dev, bradfitz, dave, rsc CC=golang-dev https://golang.org/cl/7547044 --- diff --git a/src/pkg/net/protoconn_test.go b/src/pkg/net/protoconn_test.go index 25b0dfbca9..b59925e01c 100644 --- a/src/pkg/net/protoconn_test.go +++ b/src/pkg/net/protoconn_test.go @@ -15,9 +15,11 @@ import ( "time" ) -// testUnixAddr uses ioutil.TempFile to get a name that is unique. +// testUnixAddr uses ioutil.TempFile to get a name that is unique. It +// also uses /tmp directory in case it is prohibited to create UNIX +// sockets in TMPDIR. func testUnixAddr() string { - f, err := ioutil.TempFile("", "nettest") + f, err := ioutil.TempFile("/tmp", "nettest") if err != nil { panic(err) }