Commit 582a421a authored by David du Colombier's avatar David du Colombier Committed by Brad Fitzpatrick

net: enable timeout tests on Plan 9

Deadlines have been implemented on Plan 9 in CL 31521.

Enable the following tests:

 - TestReadTimeout
 - TestReadFromTimeout
 - TestWriteTimeout
 - TestWriteToTimeout
 - TestReadTimeoutFluctuation
 - TestVariousDeadlines
 - TestVariousDeadlines1Proc
 - TestVariousDeadlines4Proc
 - TestReadWriteDeadlineRace

Change-Id: I221ed61d55f7f1e4345b37af6748c04e1e91e062
Reviewed-on: https://go-review.googlesource.com/33196
Run-TryBot: David du Colombier <0intro@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 662d2535
...@@ -305,11 +305,6 @@ var readTimeoutTests = []struct { ...@@ -305,11 +305,6 @@ var readTimeoutTests = []struct {
} }
func TestReadTimeout(t *testing.T) { func TestReadTimeout(t *testing.T) {
switch runtime.GOOS {
case "plan9":
t.Skipf("not supported on %s", runtime.GOOS)
}
handler := func(ls *localServer, ln Listener) { handler := func(ls *localServer, ln Listener) {
c, err := ln.Accept() c, err := ln.Accept()
if err != nil { if err != nil {
...@@ -435,7 +430,7 @@ var readFromTimeoutTests = []struct { ...@@ -435,7 +430,7 @@ var readFromTimeoutTests = []struct {
func TestReadFromTimeout(t *testing.T) { func TestReadFromTimeout(t *testing.T) {
switch runtime.GOOS { switch runtime.GOOS {
case "nacl", "plan9": case "nacl":
t.Skipf("not supported on %s", runtime.GOOS) // see golang.org/issue/8916 t.Skipf("not supported on %s", runtime.GOOS) // see golang.org/issue/8916
} }
...@@ -509,11 +504,6 @@ var writeTimeoutTests = []struct { ...@@ -509,11 +504,6 @@ var writeTimeoutTests = []struct {
func TestWriteTimeout(t *testing.T) { func TestWriteTimeout(t *testing.T) {
t.Parallel() t.Parallel()
switch runtime.GOOS {
case "plan9":
t.Skipf("not supported on %s", runtime.GOOS)
}
ln, err := newLocalListener("tcp") ln, err := newLocalListener("tcp")
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
...@@ -629,7 +619,7 @@ func TestWriteToTimeout(t *testing.T) { ...@@ -629,7 +619,7 @@ func TestWriteToTimeout(t *testing.T) {
t.Parallel() t.Parallel()
switch runtime.GOOS { switch runtime.GOOS {
case "nacl", "plan9": case "nacl":
t.Skipf("not supported on %s", runtime.GOOS) t.Skipf("not supported on %s", runtime.GOOS)
} }
...@@ -681,11 +671,6 @@ func TestWriteToTimeout(t *testing.T) { ...@@ -681,11 +671,6 @@ func TestWriteToTimeout(t *testing.T) {
func TestReadTimeoutFluctuation(t *testing.T) { func TestReadTimeoutFluctuation(t *testing.T) {
t.Parallel() t.Parallel()
switch runtime.GOOS {
case "plan9":
t.Skipf("not supported on %s", runtime.GOOS)
}
ln, err := newLocalListener("tcp") ln, err := newLocalListener("tcp")
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
...@@ -719,11 +704,6 @@ func TestReadTimeoutFluctuation(t *testing.T) { ...@@ -719,11 +704,6 @@ func TestReadTimeoutFluctuation(t *testing.T) {
func TestReadFromTimeoutFluctuation(t *testing.T) { func TestReadFromTimeoutFluctuation(t *testing.T) {
t.Parallel() t.Parallel()
switch runtime.GOOS {
case "plan9":
t.Skipf("not supported on %s", runtime.GOOS)
}
c1, err := newLocalPacketListener("udp") c1, err := newLocalPacketListener("udp")
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
...@@ -829,11 +809,6 @@ func (b neverEnding) Read(p []byte) (int, error) { ...@@ -829,11 +809,6 @@ func (b neverEnding) Read(p []byte) (int, error) {
} }
func testVariousDeadlines(t *testing.T) { func testVariousDeadlines(t *testing.T) {
switch runtime.GOOS {
case "plan9":
t.Skipf("not supported on %s", runtime.GOOS)
}
type result struct { type result struct {
n int64 n int64
err error err error
...@@ -1030,7 +1005,7 @@ func TestReadWriteDeadlineRace(t *testing.T) { ...@@ -1030,7 +1005,7 @@ func TestReadWriteDeadlineRace(t *testing.T) {
t.Parallel() t.Parallel()
switch runtime.GOOS { switch runtime.GOOS {
case "nacl", "plan9": case "nacl":
t.Skipf("not supported on %s", runtime.GOOS) t.Skipf("not supported on %s", runtime.GOOS)
} }
......
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