mirror of
https://github.com/golang/sys.git
synced 2026-01-29 07:02:06 +03:00
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>
This commit is contained in:
committed by
Gopher Robot
parent
47fe916942
commit
ee0e627958
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user