Commit b97e40fc authored by Ian Lance Taylor's avatar Ian Lance Taylor

net: remove unixgram test sockets

Updates https://gcc.gnu.org/PR89406

Change-Id: Iccf2760e42e9caa90720b96e74a805a9c0d48f35
Reviewed-on: https://go-review.googlesource.com/c/163277
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarMikio Hara <mikioh.public.networking@gmail.com>
Reviewed-by: default avatarThan McIntosh <thanm@google.com>
parent 4b05dc91
...@@ -780,6 +780,9 @@ func TestListenConfigControl(t *testing.T) { ...@@ -780,6 +780,9 @@ func TestListenConfigControl(t *testing.T) {
continue continue
} }
c.Close() c.Close()
if network == "unixgram" {
os.Remove(address)
}
} }
}) })
} }
...@@ -17,8 +17,6 @@ import ( ...@@ -17,8 +17,6 @@ import (
) )
// 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 { func testUnixAddr() string {
f, err := ioutil.TempFile("", "go-nettest") f, err := ioutil.TempFile("", "go-nettest")
if err != nil { if err != nil {
......
...@@ -242,6 +242,7 @@ func testSpliceNoUnixgram(t *testing.T) { ...@@ -242,6 +242,7 @@ func testSpliceNoUnixgram(t *testing.T) {
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
defer os.Remove(addr.Name)
up, err := ListenUnixgram("unixgram", addr) up, err := ListenUnixgram("unixgram", addr)
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment