Skip to content

Commit ee0e627

Browse files
ianlancetaylorgopherbot
authored andcommitted
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>
1 parent 47fe916 commit ee0e627

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

unix/syscall_linux_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1087,7 +1087,7 @@ func TestIoctlFileDedupeRange(t *testing.T) {
10871087
// The first Info should be equal
10881088
if dedupe.Info[0].Status < 0 {
10891089
errno := unix.Errno(-dedupe.Info[0].Status)
1090-
if errno == unix.EINVAL {
1090+
if errno == unix.EINVAL || errno == unix.EOPNOTSUPP {
10911091
t.Skip("deduplication not supported on this filesystem")
10921092
}
10931093
t.Errorf("Unexpected error in FileDedupeRange: %s", unix.ErrnoName(errno))
@@ -1102,7 +1102,7 @@ func TestIoctlFileDedupeRange(t *testing.T) {
11021102
// The second Info should be different
11031103
if dedupe.Info[1].Status < 0 {
11041104
errno := unix.Errno(-dedupe.Info[1].Status)
1105-
if errno == unix.EINVAL {
1105+
if errno == unix.EINVAL || errno == unix.EOPNOTSUPP {
11061106
t.Skip("deduplication not supported on this filesystem")
11071107
}
11081108
t.Errorf("Unexpected error in FileDedupeRange: %s", unix.ErrnoName(errno))

0 commit comments

Comments
 (0)