mirror of
https://https.git.savannah.gnu.org/git/coreutils.git
synced 2026-01-26 15:29:07 +00:00
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.
This commit is contained in:
parent
521a389635
commit
a96abcbbeb
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user