mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-02-16 04:12:26 +02:00
Also allow a slightly different diagnostic -- the
one you get when using openat-enabled fts.c and du (coming soon).
This commit is contained in:
@@ -30,11 +30,27 @@ fail=0
|
||||
|
||||
# This must exit nonzero.
|
||||
chmod -R o=r d >/dev/null 2>out && fail=1
|
||||
|
||||
cat <<\EOF > exp
|
||||
chmod: `d/no-x': Permission denied
|
||||
EOF
|
||||
|
||||
cmp out exp || fail=1
|
||||
# With native openat, du uses a different code path.
|
||||
cat <<\EOF > exp-native-openat
|
||||
chmod: cannot access `d/no-x/y': Permission denied
|
||||
chmod: fts_read failed: Permission denied
|
||||
EOF
|
||||
|
||||
if cmp out exp >/dev/null 2>&1; then
|
||||
:
|
||||
else
|
||||
if cmp out exp-native-openat; then
|
||||
:
|
||||
else
|
||||
fail=1
|
||||
fi
|
||||
fi
|
||||
|
||||
test $fail = 1 && diff out exp 2> /dev/null
|
||||
|
||||
(exit $fail); exit $fail
|
||||
|
||||
Reference in New Issue
Block a user