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
This commit is contained in:
Mikio Hara 2013-03-13 07:26:21 +08:00
parent 293c880f13
commit 9f399a0301

View File

@ -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)
}