2 # prior to coreutils-4.5.3, du -D didn't work in some cases
3 # Based on an example from Andreas Schwab and/or Michal Svec.
5 if test "$VERBOSE" = yes; then
11 t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
12 trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0
13 trap '(exit $?); exit $?' 1 2 13 15
16 mkdir -p $tmp || framework_failure=1
17 cd $tmp || framework_failure=1
18 mkdir -p a/sub || framework_failure=1
19 ln -s a/sub slink || framework_failure=1
20 touch b || framework_failure=1
22 if test $framework_failure = 1; then
23 echo "$0: failure in testing framework" 1>&2
29 # This used to fail with the following diagnostic:
30 # du: `b': No such file or directory
31 du -sD slink b > /dev/null 2>&1 || fail=1
33 (exit $fail); exit $fail