Commit f3b0f5fa authored by Hana Kim's avatar Hana Kim Committed by Tobias Klauser

unix: skip TestStatx if the operation is not permitted

Fixes golang/go#25529

Change-Id: Ifb7060106608fab0c87ce4596c9f16c14bde6205
Reviewed-on: https://go-review.googlesource.com/114093Reviewed-by: 's avatarTobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 028bb33f
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment