unix: skip TestPselect on EINTR

Some slow builders occassionally seem to fail with:

    syscall_linux_test.go:301: Pselect: interrupted system call

Just skip the test in these cases for now.

Fixes golang/go#35555

Change-Id: I8850634fc4000bf9d0d6cce27834febc53d3fcd6
Reviewed-on: https://go-review.googlesource.com/c/sys/+/206862
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Tobias Klauser
2019-11-13 10:26:55 +01:00
committed by Tobias Klauser
parent 59a1497f0c
commit 8ad3422571

View File

@@ -297,7 +297,9 @@ func TestPselect(t *testing.T) {
start := time.Now()
_, err = unix.Pselect(0, nil, nil, nil, &ts, nil)
took := time.Since(start)
if err != nil {
if err == unix.EINTR {
t.Skipf("Pselect interrupted after %v timeout", took)
} else if err != nil {
t.Fatalf("Pselect: %v", err)
}