mirror of
https://github.com/golang/sys.git
synced 2026-02-09 04:06:04 +03:00
On some platforms (namely Linux), Select and Pselect update the passed-in timeval/timespec, which might lead to failing tests in case of an EINTR. Fix this by always resetting the timeval/timespec before calling Select/Pselect. Also change accept timeouts within 2/3 margin of the expected timeout, like already done in TestSelect. While at it, fix the failure log to use the common "got X, expected Y" message. Fixes golang/go#42210 Change-Id: Id0efbbecc9c0bf44c102d5d1880b1bae32980ad1 Reviewed-on: https://go-review.googlesource.com/c/sys/+/265020 Trust: Tobias Klauser <tobias.klauser@gmail.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
20 KiB
20 KiB