1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
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 <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Commit-Queue: Ian Lance Taylor <iant@google.com>
diff --git a/unix/syscall_linux_test.go b/unix/syscall_linux_test.go
index 69c42b5..53e6445 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))
|