Skip to content

Commit

Permalink
unix: skip TestIoctlFileDedupeRange on EOPNOTSUPP error
Browse files Browse the repository at this point in the history
Fixes golang/go#68372

Change-Id: Id3b8fb920b1458e39e7370195591183ee7e450ff
Reviewed-on: https://go-review.googlesource.com/c/sys/+/597555
Reviewed-by: Cherry Mui <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Auto-Submit: Ian Lance Taylor <[email protected]>
Reviewed-by: Ian Lance Taylor <[email protected]>
Commit-Queue: Ian Lance Taylor <[email protected]>
  • Loading branch information
ianlancetaylor authored and gopherbot committed Jul 11, 2024
1 parent 47fe916 commit ee0e627
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions unix/syscall_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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))
Expand Down

0 comments on commit ee0e627

Please sign in to comment.