From ee0e6279584905810760a1a02774a659e06b24b1 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Wed, 10 Jul 2024 10:50:10 -0700 Subject: [PATCH] unix: skip TestIoctlFileDedupeRange on EOPNOTSUPP error Fixes golang/go#68372 Change-Id: Id3b8fb920b1458e39e7370195591183ee7e450ff Reviewed-on: https://go-review.googlesource.com/c/sys/+/597555 Reviewed-by: Cherry Mui LUCI-TryBot-Result: Go LUCI Auto-Submit: Ian Lance Taylor Reviewed-by: Ian Lance Taylor Commit-Queue: Ian Lance Taylor --- unix/syscall_linux_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unix/syscall_linux_test.go b/unix/syscall_linux_test.go index 69c42b5dd..53e64458c 100644 --- a/unix/syscall_linux_test.go +++ b/unix/syscall_linux_test.go @@ -1087,7 +1087,7 @@ func TestIoctlFileDedupeRange(t *testing.T) { // The first Info should be equal if dedupe.Info[0].Status < 0 { errno := unix.Errno(-dedupe.Info[0].Status) - if errno == unix.EINVAL { + if errno == unix.EINVAL || errno == unix.EOPNOTSUPP { t.Skip("deduplication not supported on this filesystem") } t.Errorf("Unexpected error in FileDedupeRange: %s", unix.ErrnoName(errno)) @@ -1102,7 +1102,7 @@ func TestIoctlFileDedupeRange(t *testing.T) { // The second Info should be different if dedupe.Info[1].Status < 0 { errno := unix.Errno(-dedupe.Info[1].Status) - if errno == unix.EINVAL { + if errno == unix.EINVAL || errno == unix.EOPNOTSUPP { t.Skip("deduplication not supported on this filesystem") } t.Errorf("Unexpected error in FileDedupeRange: %s", unix.ErrnoName(errno))