From 8ad34225713002c3de2d8410cc5f2c1cfcff7520 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Wed, 13 Nov 2019 10:26:55 +0100 Subject: [PATCH] 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 TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- unix/syscall_linux_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/unix/syscall_linux_test.go b/unix/syscall_linux_test.go index 2feb5a10..adc59b12 100644 --- a/unix/syscall_linux_test.go +++ b/unix/syscall_linux_test.go @@ -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) }