From f3b0f5faf591842dced5f027709e1706df17b749 Mon Sep 17 00:00:00 2001 From: Hana Kim Date: Wed, 23 May 2018 16:41:33 -0400 Subject: [PATCH] unix: skip TestStatx if the operation is not permitted Fixes golang/go#25529 Change-Id: Ifb7060106608fab0c87ce4596c9f16c14bde6205 Reviewed-on: https://go-review.googlesource.com/114093 Reviewed-by: Tobias Klauser Run-TryBot: Tobias Klauser TryBot-Result: Gobot Gobot --- unix/syscall_linux_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unix/syscall_linux_test.go b/unix/syscall_linux_test.go index 6429bd25..9c99893c 100644 --- a/unix/syscall_linux_test.go +++ b/unix/syscall_linux_test.go @@ -285,7 +285,7 @@ func TestSchedSetaffinity(t *testing.T) { func TestStatx(t *testing.T) { var stx unix.Statx_t err := unix.Statx(unix.AT_FDCWD, ".", 0, 0, &stx) - if err == unix.ENOSYS { + if err == unix.ENOSYS || err == unix.EPERM { t.Skip("statx syscall is not available, skipping test") } else if err != nil { t.Fatalf("Statx: %v", err)