testsuite: do not fail on systems without read permissions.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 14 Apr 2009 21:42:14 +0000 (23:42 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 14 Apr 2009 21:42:14 +0000 (23:42 +0200)
* tests/instfail-info.test: Do not use the `non-root'
requirement for testing whether files may be made unreadable;
instead use `test -r' and skip the test if that still works.
* tests/instfail-java.test: Likewise.
* tests/instfail-libtool.test: Likewise.
* tests/instfail.test: Likewise.
* tests/instmany-mans.test: Likewise.
* tests/instmany-python.test: Likewise.
* tests/instmany.test: Likewise.
* tests/parallel-tests9.test: Likewise.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
tests/instfail-info.test
tests/instfail-java.test
tests/instfail-libtool.test
tests/instfail.test
tests/instmany-mans.test
tests/instmany-python.test
tests/instmany.test
tests/parallel-tests9.test

index 047a032..8dae4db 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
 2009-04-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
+       testsuite: do not fail on systems without read permissions.
+       * tests/instfail-info.test: Do not use the `non-root'
+       requirement for testing whether files may be made unreadable;
+       instead use `test -r' and skip the test if that still works.
+       * tests/instfail-java.test: Likewise.
+       * tests/instfail-libtool.test: Likewise.
+       * tests/instfail.test: Likewise.
+       * tests/instmany-mans.test: Likewise.
+       * tests/instmany-python.test: Likewise.
+       * tests/instmany.test: Likewise.
+       * tests/parallel-tests9.test: Likewise.
+
        testsuite: parallel make fixes.
        This patch fixes a couple of testsuite bugs exposed with
        `MAKE=make\ -jN make check'.
index ba2b5b6..f2590f4 100755 (executable)
@@ -19,9 +19,7 @@
 
 # This test has a few sister tests, for java, info, libtool.
 
-
-# non-root should catch 'chmod a-r'-challenged file systems.
-required='non-root makeinfo'
+required='makeinfo'
 . ./defs || Exit 1
 
 set -e
@@ -59,6 +57,7 @@ $MAKE uninstall
 for file in info1.info
 do
   chmod a-r $file
+  test ! -r $file || Exit 77
   $MAKE install-data && Exit 1
   chmod u+r $file
 done
index 44b5971..5df8a6d 100755 (executable)
@@ -19,9 +19,6 @@
 
 # This is the java sister test of instfail.test.
 
-
-# non-root should catch 'chmod a-r'-challenged file systems.
-required='non-root'
 . ./defs || Exit 1
 
 set -e
@@ -59,6 +56,7 @@ $MAKE uninstall
 for file in java1.class
 do
   chmod a-r $file
+  test ! -r $file || Exit 77
   $MAKE install-data && Exit 1
   chmod u+r $file
 done
index 1b6bd2b..d7a78ae 100755 (executable)
@@ -19,9 +19,7 @@
 
 # This is the libtool sister test of instfail.test
 
-
-# non-root should catch 'chmod a-r'-challenged file systems.
-required='non-root libtool libtoolize'
+required='libtool libtoolize'
 . ./defs || Exit 1
 
 set -e
@@ -65,6 +63,14 @@ $MAKE
 $MAKE install
 $MAKE uninstall
 
+for file in liblt1.la libltn1.la
+do
+  chmod a-r $file
+  test ! -r $file || Exit 77
+  $MAKE install-exec && Exit 1
+  chmod u+r $file
+done
+
 $MAKE unreadable-prog
 $MAKE install-exec && Exit 1
 $MAKE readable-prog
@@ -73,11 +79,4 @@ $MAKE unreadable-progn
 $MAKE install-exec && Exit 1
 $MAKE readable-progn
 
-for file in liblt1.la libltn1.la
-do
-  chmod a-r $file
-  $MAKE install-exec && Exit 1
-  chmod u+r $file
-done
-
 :
index a09ca17..8b928cc 100755 (executable)
@@ -19,9 +19,6 @@
 
 # This test has a few sister tests, for java, info, libtool.
 
-
-# non-root should catch 'chmod a-r'-challenged file systems.
-required=non-root
 . ./defs || Exit 1
 
 set -e
@@ -70,6 +67,14 @@ $MAKE
 $MAKE install
 $MAKE uninstall
 
+for file in lib1.a libn1.a
+do
+  chmod a-r $file
+  test ! -r $file || Exit 77
+  $MAKE install-exec && Exit 1
+  chmod u+r $file
+done
+
 $MAKE unreadable-prog
 $MAKE install-exec && Exit 1
 $MAKE readable-prog
@@ -78,13 +83,6 @@ $MAKE unreadable-progn
 $MAKE install-exec && Exit 1
 $MAKE readable-progn
 
-for file in lib1.a libn1.a
-do
-  chmod a-r $file
-  $MAKE install-exec && Exit 1
-  chmod u+r $file
-done
-
 if grep "^EMACS = no" Makefile; then :; else
   for file in lisp1.el lisp1.elc
   do
index 773fa76..c01d0da 100755 (executable)
@@ -18,7 +18,6 @@
 
 # This is the mans sister test of instmany.test, see there for details.
 
-required=non-root    # hope to catch 'chmod a-r'-challenged file systems.
 . ./defs || Exit 1
 
 set -e
@@ -137,6 +136,7 @@ srcdir=../../$subdir
 
 for file in page3.1 page$nfiles.1 npage3.1 npage$nfiles.1; do
   chmod a-r $srcdir/$file
+  test ! -r $srcdir/$file || Exit 77
   $MAKE install-man1 && Exit 1
   chmod u+r $srcdir/$file
 done
index 9f65237..1d0b91b 100755 (executable)
@@ -18,7 +18,7 @@
 
 # This is the python sister test of instmany.test, see there for details.
 
-required='non-root python'
+required='python'
 . ./defs || Exit 1
 
 set -e
@@ -123,6 +123,7 @@ srcdir=../../$subdir
 for file in python3.py python$nfiles.py
 do
   chmod a-r $srcdir/$file
+  test ! -r $srcdir/$file || Exit 77
   $MAKE install && Exit 1
   chmod u+r $srcdir/$file
 done
index 31176d7..a1409dc 100755 (executable)
@@ -26,8 +26,6 @@
 # For texinfos, we expand names using $(srcdir) in the first place.
 # Let's hope nobody uses many texinfos.
 
-
-required=non-root    # hope to catch 'chmod a-r'-challenged file systems.
 . ./defs || Exit 1
 
 set -e
@@ -153,6 +151,7 @@ srcdir=../../$subdir
 for file in script3 script$nfiles
 do
   chmod a-r $srcdir/$file
+  test ! -r $srcdir/$file || Exit 77
   $MAKE install-binSCRIPTS && Exit 1
   chmod u+r $srcdir/$file
 done
index 6678920..e1f088b 100755 (executable)
@@ -68,9 +68,11 @@ grep baz.test stdout || Exit 1
 
 # If we cannot read the log file, then redo it as well.
 chmod a-r foo.log
-$MAKE recheck >stdout && { cat stdout; Exit 1; }
-cat stdout
-grep foo.test stdout || Exit 1
+if test ! -r foo.log; then
+   $MAKE recheck >stdout && { cat stdout; Exit 1; }
+   cat stdout
+   grep foo.test stdout || Exit 1
+fi
 
 # Ensure that recheck builds check_SCRIPTS, and that
 # recheck reruns nothing if check has not been run.