automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-2046


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-2046-gb79511a
Date: Fri, 02 Mar 2012 20:39:58 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=b79511a10c43788dd03a0d32a70b8bf68d9a29a8

The branch, master has been updated
       via  b79511a10c43788dd03a0d32a70b8bf68d9a29a8 (commit)
      from  5aa495f5a2133013ef0adf768974779f517ac34d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b79511a10c43788dd03a0d32a70b8bf68d9a29a8
Author: Stefano Lattarini <address@hidden>
Date:   Sun Feb 26 14:17:36 2012 +0100

    self checks: relax tests on cleanup
    
    Some find(1) implementations have problems operating recursively on
    directories having subdirectories with null permissions, even when
    the permissions of such subdirectory should be fixed by find before
    it descends into them; for example, with this setup:
    
      % mkdir a a/b
      % chmod 000 a/b
    
    a command like this:
    
      % find a -type d ! -perm -700 -exec chmod u+rwx '{}' ';'
    
    fails with this diagnostic on MacOS X 10.7:
    
      find: a/b: Permission denied
    
    and with this diagnostic on Solaris 10:
    
      find: cannot read dir a/b: Permission denied
    
    The problem is that our self checks were simply demanding too much
    from our cleanup trap: our tests never use subdirectories with null
    permissions, so it doesn't matter if the cleanup trap fails to
    handle those.  Just relax the self checks to avoid such useless
    testsuite noise.
    
    * tests/self-check-cleanup.tap: Only try directories missing
    write permissions, not with null permission.  That should be
    enough for our usages.

-----------------------------------------------------------------------

Summary of changes:
 tests/self-check-cleanup.tap |   17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/tests/self-check-cleanup.tap b/tests/self-check-cleanup.tap
index 932bb42..bd59657 100755
--- a/tests/self-check-cleanup.tap
+++ b/tests/self-check-cleanup.tap
@@ -46,7 +46,11 @@ dir=dummy.dir
 do_clean ()
 {
   test -d $dir || return 0
-  find $dir -type d -exec chmod u+rwx '{}' ';' || :
+  # Don't try to be smart and use find here, that has caused issues
+  # and extra ERROR results in the past.  Be dumb and safe.
+  chmod u+rwx $dir || :
+  for d in $dir/*; do test ! -d $d || chmod u+rwx $d || :; done
+  for d in $dir/*/*; do test ! -d $d || chmod u+rwx $d || :; done
   rm -rf $dir
 }
 
@@ -62,17 +66,17 @@ fi
 cd ..
 chmod 000 $dir/sub/* $dir/file
 test $have_symlinks = yes && chmod 000 $dir/symlink
-chmod 000 $dir/sub $dir
-command_ok_ "pre-cleanup can deal with null-perms testdir" \
+chmod 500 $dir/sub $dir
+command_ok_ "pre-cleanup can deal with low-perms testdir" \
             $SHELL -c  '. ./defs' dummy.test
-command_ok_ "pre-cleanup removed null-perms testdir" \
+command_ok_ "pre-cleanup removed low-perms testdir" \
             eval 'test ! -f $dir && test ! -d $dir && test ! -r $dir'
 
 do_clean
 
 # Check that post-test cleanup works also with directories with
 # "null" permissions, and containing broken symlinks.
-command_ok_ "post-cleanup can deal with null-perms testdir" \
+command_ok_ "post-cleanup can deal with low-perms testdir" \
             $SHELL -c  '
   stderr_fileno_=2
   . ./defs || Exit 1
@@ -87,7 +91,7 @@ command_ok_ "post-cleanup can deal with null-perms testdir" \
   cd ..
   chmod 000 dir/sub/* dir/file
   test $have_symlinks = yes && chmod 000 dir/symlink
-  chmod 000 dir/sub dir
+  chmod 500 dir/sub dir
   :
 ' dummy.test
 command_ok_ "post-cleanup removed null-perms testdir" \
@@ -130,6 +134,7 @@ if test $have_symlinks = yes; then
   command_ok_ "post-cleanup chmod doesn't follow symlinks to dirs" \
               eval 'ls -ld dir | grep "^d---------.*dir"'
 
+  chmod u+rwx dir file
   rmdir dir
   rm -f file
 


hooks/post-receive
-- 
GNU Automake



reply via email to

[Prev in Thread] Current Thread [Next in Thread]