diff mbox series

libgo patch committed: Remove unixgram test sockets

Message ID CAOyqgcVORmf5kedADMoV1houmptqAn23d11di-StYrfbZWbZ6g@mail.gmail.com
State New
Headers show
Series libgo patch committed: Remove unixgram test sockets | expand

Commit Message

Ian Lance Taylor Feb. 22, 2019, 12:47 a.m. UTC
This libgo patch changes the net package tests to remove unixgram test
sockets after they are used.  This is for PR 89406.  Bootstrapped and
ran Go testsuite on x86_64-pc-linux-gnu.  Committed to mainline.

Ian
diff mbox series

Patch

Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE	(revision 269086)
+++ gcc/go/gofrontend/MERGE	(working copy)
@@ -1,4 +1,4 @@ 
-4fbd06dc7b1b8fb665293399a2b6d5326435512f
+45a2e231958854fd945961f0335ac0805d502510
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
Index: libgo/go/net/listen_test.go
===================================================================
--- libgo/go/net/listen_test.go	(revision 269079)
+++ libgo/go/net/listen_test.go	(working copy)
@@ -780,6 +780,9 @@  func TestListenConfigControl(t *testing.
 				continue
 			}
 			c.Close()
+			if network == "unixgram" {
+				os.Remove(address)
+			}
 		}
 	})
 }
Index: libgo/go/net/mockserver_test.go
===================================================================
--- libgo/go/net/mockserver_test.go	(revision 269079)
+++ libgo/go/net/mockserver_test.go	(working copy)
@@ -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: libgo/go/net/splice_test.go
===================================================================
--- libgo/go/net/splice_test.go	(revision 269079)
+++ libgo/go/net/splice_test.go	(working copy)
@@ -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)