mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
tests: avoid false failure when running as root
* tests/misc/sync.sh: Ensure dir is unreadable before including the permission check.
This commit is contained in:
1 parent
1d82751e2c
commit
cacd9bf9c2
1 file changed
+5
-3
+5
-3
@@ -36,9 +36,11 @@ returns_ 1 sync file nofile || fail=1
|
||||
# Ensure inaccessible dirs give an appropriate error
|
||||
mkdir norw || framework_failure_
|
||||
chmod 0 norw || framework_failure_
|
||||
sync norw 2>err
|
||||
printf "sync: error opening 'norw': Permission denied\n" >exp
|
||||
compare exp err || fail=1
|
||||
if ! test -r norw; then
|
||||
sync norw 2>err
|
||||
printf "sync: error opening 'norw': Permission denied\n" >exp
|
||||
compare exp err || fail=1
|
||||
fi
|
||||
|
||||
if test "$fail" != '1'; then
|
||||
# Ensure a fifo doesn't block
|
||||
|
||||
Reference in new issue
Block a user