2 # Ensure that rm -rf removes an empty-and-inaccessible directory.
4 if test "$VERBOSE" = yes; then
9 PRIV_CHECK_ARG=require-non-root . $srcdir/../priv-check
12 t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
13 trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0
14 trap '(exit $?); exit $?' 1 2 13 15
17 mkdir -p $tmp || framework_failure=1
18 cd $tmp || framework_failure=1
19 mkdir -m0 inacc || framework_failure=1
21 # Also exercise the different code path that's taken for a directory
22 # that is empty (hence removable) and unreadable.
23 mkdir -m a-r -p a/unreadable
25 if test $framework_failure = 1; then
26 echo "$0: failure in testing framework" 1>&2
32 # This would fail for e.g., coreutils-5.93.
33 rm -rf inacc || fail=1
34 test -d inacc && fail=1
36 # This would fail for e.g., coreutils-5.97.
40 (exit $fail); exit $fail