]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
dd: skip some alloc tests on ZFS
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 17 May 2024 06:30:33 +0000 (23:30 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 17 May 2024 06:30:55 +0000 (23:30 -0700)
* tests/dd/sparse.sh: Skip some tests on ZFS.

tests/dd/sparse.sh

index 5194606aa15ae7a82449fe0d904d0e276089a387..1ac1920fff5fd4b8176abf9b182128baf5f915e0 100755 (executable)
@@ -58,7 +58,10 @@ kb_alloc() { du -k "$1"|cut -f1; }
 # skip the remaining tests.  On at least Solaris 10 with NFS,
 # file.in is reported to occupy <= 1KiB for about 50 seconds
 # after its creation.
-if test $(kb_alloc file.in) -gt 3000; then
+# Also, ZFS allocation reports can be delayed or off (problem
+# observed on Ubuntu 23.10), so don’t trust this test on ZFS.
+if test $(kb_alloc file.in) -gt 3000 && test "$(stat -f -c %T file.in)" != zfs
+then
 
   # Ensure NUL blocks smaller than the *output* block size are not made sparse.
   # Here, with a 2MiB block size, dd's conv=sparse must *not* introduce a hole.