2 # Exercise a bug that was fixed in shred-4.0l
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
20 # The length of the basename is what matters.
21 # In this case, shred would try to rename the file 256^10 times
24 touch $file || framework_failure=1
25 chmod u-w $file || framework_failure=1
27 if test $framework_failure = 1; then
28 echo 'failure in testing framework'
34 # This would take so long that it appears to infloop
35 # when using version from fileutils-4.0k.
36 # When the command completes, expect it to fail.
37 shred -u $file > /dev/null 2>&1 && fail=1 || :