2 # Verify that chmod's --changes (-c) option works.
4 if test "$VERBOSE" = yes; then
9 . $srcdir/../lang-default
13 trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0
14 trap '(exit $?); exit' 1 2 13 15
18 # Record absolute path of srcdir.
19 cd $srcdir || framework_failure=1
22 cd $pwd || framework_failure=1
23 mkdir $tmp || framework_failure=1
24 cd $tmp || framework_failure=1
28 touch $file || framework_failure=1
29 chmod 444 $file || framework_failure=1
31 if test $framework_failure = 1; then
32 echo 'failure in testing framework'
36 . $abs_srcdir/../setgid-check
40 chmod u=rwx $file || fail=1
41 chmod -c g=rwx $file > out || fail=1
42 chmod -c g=rwx $file > empty || fail=1
44 test -s empty && fail=1
46 "mode of \`f' changed to 0774 "?rwxrwxr--?) ;;
50 (exit $fail); exit $fail