logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git

sys-0.22.0-fileDedupeRange-EOPNOTSUPP.patch (1233B)


  1. From c5324d88c77ca2f40606149209558a06475e9d98 Mon Sep 17 00:00:00 2001
  2. From: Ian Lance Taylor <iant@golang.org>
  3. Date: Wed, 10 Jul 2024 10:50:10 -0700
  4. Subject: [PATCH] unix: skip TestIoctlFileDedupeRange on EOPNOTSUPP error
  5. Fixes golang/go#68372
  6. Change-Id: Id3b8fb920b1458e39e7370195591183ee7e450ff
  7. ---
  8. diff --git a/unix/syscall_linux_test.go b/unix/syscall_linux_test.go
  9. index 69c42b5..53e6445 100644
  10. --- a/sys-0.22.0/unix/syscall_linux_test.go
  11. +++ b/sys-0.22.0/unix/syscall_linux_test.go
  12. @@ -1087,7 +1087,7 @@
  13. // The first Info should be equal
  14. if dedupe.Info[0].Status < 0 {
  15. errno := unix.Errno(-dedupe.Info[0].Status)
  16. - if errno == unix.EINVAL {
  17. + if errno == unix.EINVAL || errno == unix.EOPNOTSUPP {
  18. t.Skip("deduplication not supported on this filesystem")
  19. }
  20. t.Errorf("Unexpected error in FileDedupeRange: %s", unix.ErrnoName(errno))
  21. @@ -1102,7 +1102,7 @@
  22. // The second Info should be different
  23. if dedupe.Info[1].Status < 0 {
  24. errno := unix.Errno(-dedupe.Info[1].Status)
  25. - if errno == unix.EINVAL {
  26. + if errno == unix.EINVAL || errno == unix.EOPNOTSUPP {
  27. t.Skip("deduplication not supported on this filesystem")
  28. }
  29. t.Errorf("Unexpected error in FileDedupeRange: %s", unix.ErrnoName(errno))