From a96abcbbeb39576e4fdfba60d624898bcebf7d92 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Mon, 19 Jan 2026 18:26:45 -0800 Subject: [PATCH] tests: dd: avoid a false test failure on Solaris 11.4 * tests/dd/fail-ftruncate-fstat.sh: Replace the message used by Solaris 11.4 for strerror (EPERM) with the one we expect. --- tests/dd/fail-ftruncate-fstat.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/dd/fail-ftruncate-fstat.sh b/tests/dd/fail-ftruncate-fstat.sh index 381d329ae..1d4edb36e 100755 --- a/tests/dd/fail-ftruncate-fstat.sh +++ b/tests/dd/fail-ftruncate-fstat.sh @@ -58,12 +58,15 @@ yes | head -n 2048 | tr -d '\n' > out || framework_failure_ cp out exp-out || framework_failure_ LD_PRELOAD=$LD_PRELOAD:./k.so dd if=/dev/zero of=out count=1 \ - seek=1 status=none 2>err + seek=1 status=none 2>errt 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 + # After ftruncate fails, we use fstat to get the file type. echo "dd: cannot fstat 'out': Operation not permitted" > exp compare exp err || fail=1