Commit 824b3326 authored by Rémy Oudompheng's avatar Rémy Oudompheng

net: fix race in TestReadWriteDeadline.

Discovered by adding OBLOCK support to race
instrumentation.

R=golang-dev, minux.ma, rsc
CC=golang-dev
https://golang.org/cl/6819067
parent 27c990e7
...@@ -201,7 +201,7 @@ func TestReadWriteDeadline(t *testing.T) { ...@@ -201,7 +201,7 @@ func TestReadWriteDeadline(t *testing.T) {
go func() { go func() {
var buf [10]byte var buf [10]byte
_, err = c.Read(buf[:]) _, err := c.Read(buf[:])
if err == nil { if err == nil {
t.Errorf("Read should not succeed") t.Errorf("Read should not succeed")
} }
...@@ -212,7 +212,7 @@ func TestReadWriteDeadline(t *testing.T) { ...@@ -212,7 +212,7 @@ func TestReadWriteDeadline(t *testing.T) {
go func() { go func() {
var buf [10000]byte var buf [10000]byte
for { for {
_, err = c.Write(buf[:]) _, err := c.Write(buf[:])
if err != nil { if err != nil {
break break
} }
......
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