]> Cypherpunks repositories - gostls13.git/commitdiff
net: remove unixgram test sockets
authorIan Lance Taylor <iant@golang.org>
Thu, 21 Feb 2019 00:34:48 +0000 (16:34 -0800)
committerIan Lance Taylor <iant@golang.org>
Tue, 26 Feb 2019 23:33:36 +0000 (23:33 +0000)
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: Mikio Hara <mikioh.public.networking@gmail.com>
Reviewed-by: Than McIntosh <thanm@google.com>
src/net/listen_test.go
src/net/mockserver_test.go
src/net/splice_test.go

index 6c3f70cc7bf7e42ac3129edd0848659edf3d4315..6c9b92a9fc5d30f49f2b4350781bb2445ce9fa49 100644 (file)
@@ -780,6 +780,9 @@ func TestListenConfigControl(t *testing.T) {
                                continue
                        }
                        c.Close()
+                       if network == "unixgram" {
+                               os.Remove(address)
+                       }
                }
        })
 }
index 530293578a08e67b8649a4cff691127b0216a2fc..e085f4440b522e133333f76b52616278a77e427f 100644 (file)
@@ -17,8 +17,6 @@ import (
 )
 
 // 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("", "go-nettest")
        if err != nil {
index 4c300172c5e9e2b6d099de421f13ac691d92da79..e2a6638e8fa5d64fda45b19e0e70295fc18661f3 100644 (file)
@@ -242,6 +242,7 @@ func testSpliceNoUnixgram(t *testing.T) {
        if err != nil {
                t.Fatal(err)
        }
+       defer os.Remove(addr.Name)
        up, err := ListenUnixgram("unixgram", addr)
        if err != nil {
                t.Fatal(err)