diff options
Diffstat (limited to 'src/pkg/net/protoconn_test.go')
-rw-r--r-- | src/pkg/net/protoconn_test.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/pkg/net/protoconn_test.go b/src/pkg/net/protoconn_test.go index 2fe7d1d1f..b59925e01 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) } @@ -163,7 +165,7 @@ func TestUDPConnSpecificMethods(t *testing.T) { func TestIPConnSpecificMethods(t *testing.T) { switch runtime.GOOS { case "plan9": - t.Skipf("skipping read test on %q", runtime.GOOS) + t.Skipf("skipping test on %q", runtime.GOOS) } if os.Getuid() != 0 { t.Skipf("skipping test; must be root") @@ -220,7 +222,7 @@ func TestIPConnSpecificMethods(t *testing.T) { func TestUnixListenerSpecificMethods(t *testing.T) { switch runtime.GOOS { case "plan9", "windows": - t.Skipf("skipping read test on %q", runtime.GOOS) + t.Skipf("skipping test on %q", runtime.GOOS) } addr := testUnixAddr() |