]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: dd: avoid EPERM false failure on Solaris
authorPádraig Brady <P@draigBrady.com>
Sat, 24 Jan 2026 13:58:29 +0000 (13:58 +0000)
committerPádraig Brady <P@draigBrady.com>
Sat, 24 Jan 2026 14:53:30 +0000 (14:53 +0000)
* tests/dd/fail-ftruncate-fstat.sh: Also map the "Not owner"
error for EPERM seen on earlier Solaris 11 releases.
Reported by Bruno Haible.

tests/dd/fail-ftruncate-fstat.sh

index 1d4edb36e244797a05703f969a1caf32736d190b..e438eb721f1b2a28ea0a2fd3e69ca7e146d77d00 100755 (executable)
@@ -64,8 +64,11 @@ ret=$?
 test -f x && test -f y \
   || skip_ "internal test failure: maybe LD_PRELOAD doesn't work?"
 
-# Solaris 11.4 gives a different, but reasonable, error message here.
-sed 's/Insufficient privileges/Operation not permitted/g' < errt > err
+# EPERM='Not owner'               on Solaris 11.4.0.15.0 (2018)
+# EPERM='Insufficient privileges' on Solaris 11.4.89.207 (2026)
+sed -e 's/Insufficient privileges/Operation not permitted/' \
+    -e 's/Not owner/Operation not permitted/' \
+    < errt > err || framework_failure_
 
 # After ftruncate fails, we use fstat to get the file type.
 echo "dd: cannot fstat 'out': Operation not permitted" > exp