* tests/rm/inaccessible.sh: Remove AIX specific handling.
* tests/cp/fail-perm.sh: Likeise. Also remove confusing
EPERM/HPUX mentions.
* tests/misc/sync.sh: Don't hardcode EISDIR and EACCES.
. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
print_ver_ cp
skip_if_root_
+getlimits_
chmod g-s . || framework_failure_
mkdir D D/D || framework_failure_
chmod 0 D
ln -s D/D symlink
touch F
-cat > exp <<\EOF
-cp: cannot stat 'symlink': Permission denied
+cat > exp <<EOF
+cp: cannot stat 'symlink': $EACCES
EOF
cp F symlink 2> out && fail=1
-# HPUX appears to fail with EACCES rather than EPERM.
-# Transform their diagnostic
-# ...: The file access permissions do not allow the specified action.
-# to the expected one:
-sed 's/: The file access permissions.*/: Permission denied/'<out>o1;mv o1 out
compare exp out || fail=1
cp --no-target-directory F symlink 2> out && fail=1
-sed 's/: The file access permissions.*/: Permission denied/'<out>o1;mv o1 out
compare exp out || fail=1
-cat > exp <<\EOF
-cp: target directory 'symlink': Permission denied
+cat > exp <<EOF
+cp: target directory 'symlink': $EACCES
EOF
cp --target-directory=symlink F 2> out && fail=1
-sed 's/: The file access permissions.*/: Permission denied/'<out>o1;mv o1 out
compare exp out || fail=1
chmod 700 D
. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
print_ver_ sync
+getlimits_
touch file || framework_failure_
if ! test -r norw; then
returns_ 1 sync norw 2>errt || fail=1
# AIX gives "Is a directory"
- sed 's/Is a directory/Permission denied/' <errt >err || framework_failure_
- printf "sync: error opening 'norw': Permission denied\n" >exp
+ sed "s/$EISDIR/$EACCES/" <errt >err || framework_failure_
+ printf "sync: error opening 'norw': $EACCES\n" >exp
compare exp err || fail=1
fi
. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
print_ver_ rm
+skip_if_root_
+getlimits_
# Skip this test if your system has neither the openat-style functions
# nor /proc/self/fd support with which to emulate them.
require_openat_support_
-skip_if_root_
p=$(pwd)
mkdir abs1 abs2 no-access || framework_failure_
test -d "$p/abs1" && fail=1
test -d "$p/abs2" && fail=1
-cat <<\EOF > exp || framework_failure_
-rm: cannot remove 'rel': Permission denied
+cat <<EOF > exp || framework_failure_
+rm: cannot remove 'rel': $EACCES
EOF
-# AIX 4.3.3 fails with a different diagnostic.
-# Transform their diagnostic
-# ...: The file access permissions do not allow the specified action.
-# to the expected one:
-sed 's/: The file access permissions.*/: Permission denied/'<out>o1;mv o1 out
-
compare exp out || fail=1
Exit $fail