]> Cypherpunks.ru repositories - gostls13.git/commit
os: deflake TestFdReadRace
authorIan Lance Taylor <iant@golang.org>
Wed, 26 May 2021 22:17:27 +0000 (15:17 -0700)
committerIan Lance Taylor <iant@golang.org>
Wed, 26 May 2021 23:33:38 +0000 (23:33 +0000)
commit3075ffc93e962792ddf43b2a528ef19b1577ffb7
tree62a7bbf1c6a3903018f677e45178a137cfda24dd
parenta62c08734f8e2fc5333036e3a069a55288d1f674
os: deflake TestFdReadRace

The test would hang if the call to Fd set the pipe to be non-blocking
before the Read entered the first read system call. Avoid that problem
by writing data to the pipe to wake up the read.

For #24481
Fixes #44818

Change-Id: I0b798874c7b81e7308a38ebbf657efc4392ffacd
Reviewed-on: https://go-review.googlesource.com/c/go/+/322893
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
src/os/pipe_test.go