diff mbox

[libgo] Don't check gopher, http ports

Message ID yddmxl7w5cx.fsf@manam.CeBiTec.Uni-Bielefeld.DE
State New
Headers show

Commit Message

Rainer Orth March 7, 2011, 11:13 a.m. UTC
The gopher (sort of understandable) and http (unexpected and strange)
ports are missing form Solaris 2 /etc/services as far back as Solaris 8,
which causes the libgo net test to fail:

--- FAIL: net.TestLookupPort
	LookupPort("tcp", "gopher") = 0, unknown port tcp/gopher; want 70
	LookupPort("tcp", "http") = 0, unknown port tcp/http; want 80

Since having those two ports above all the others adds no extra value,
I've simply removed them to fix the test.

	Rainer


2011-03-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* go/net/port_test.go (porttests): Remove gopher, http.

Comments

Ian Lance Taylor March 7, 2011, 11:37 p.m. UTC | #1
Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:

> The gopher (sort of understandable) and http (unexpected and strange)
> ports are missing form Solaris 2 /etc/services as far back as Solaris 8,
> which causes the libgo net test to fail:
>
> --- FAIL: net.TestLookupPort
> 	LookupPort("tcp", "gopher") = 0, unknown port tcp/gopher; want 70
> 	LookupPort("tcp", "http") = 0, unknown port tcp/http; want 80
>
> Since having those two ports above all the others adds no extra value,
> I've simply removed them to fix the test.

Committed to master repository and gccgo repository.

Thanks.

Ian
diff mbox

Patch

diff -r d7e61c7ee1b8 libgo/go/net/port_test.go
--- a/libgo/go/net/port_test.go	Sat Mar 05 23:39:02 2011 +0100
+++ b/libgo/go/net/port_test.go	Sat Mar 05 23:46:42 2011 +0100
@@ -1,4 +1,4 @@ 
-// Copyright 2009 The Go Authors. All rights reserved.
+// Copyright 2009, 2011 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
@@ -27,9 +27,7 @@ 
 	{"tcp", "smtp", 25, true},
 	{"tcp", "time", 37, true},
 	{"tcp", "domain", 53, true},
-	{"tcp", "gopher", 70, true},
 	{"tcp", "finger", 79, true},
-	{"tcp", "http", 80, true},
 
 	{"udp", "echo", 7, true},
 	{"udp", "tftp", 69, true},