unix: skip Linux TestPidfd if Waitid returns EINVAL

The updated test in CL 395936 appears to break GOARCH mips* builders.

Updates golang/go#52014

Change-Id: I42bb71d6afda2112a524257fd1b42306dd22689c
Reviewed-on: https://go-review.googlesource.com/c/sys/+/396154
Trust: Matt Layher <mdlayher@gmail.com>
Run-TryBot: Matt Layher <mdlayher@gmail.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
Matt Layher
2022-03-28 08:53:28 -04:00
parent d36c6a25d8
commit 43be30ef30

View File

@@ -240,6 +240,10 @@ func TestPidfd(t *testing.T) {
// Child is running but not terminated.
if err := unix.Waitid(unix.P_PIDFD, fd, nil, unix.WEXITED|unix.WNOHANG, nil); err != nil {
if errors.Is(err, unix.EINVAL) {
t.Skip("skipping due to waitid EINVAL, see https://go.dev/issues/52014")
}
t.Fatalf("failed to check for child exit: %v", err)
}