]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Ignore tests that require read-only directories under root.
authorEric Blake <ebb9@byu.net>
Tue, 4 Mar 2008 21:28:54 +0000 (14:28 -0700)
committerEric Blake <ebb9@byu.net>
Tue, 4 Mar 2008 22:05:45 +0000 (15:05 -0700)
* tests/torture.at (AT_CHECK_CONFIG_CREATION_NOWRITE): Skip
no-write portion if user has root-like privileges.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
tests/torture.at

index 0bb35a93fec67b143e2ec9e975b95abb2ccdb438..d4e3b03cb779ce02045b28b7137ff5c39fdd1ea6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-03-04  Eric Blake  <ebb9@byu.net>
+
+       Ignore tests that require read-only directories under root.
+       * tests/torture.at (AT_CHECK_CONFIG_CREATION_NOWRITE): Skip
+       no-write portion if user has root-like privileges.
+
 2008-03-04  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        * lib/autotest/general.m4 (AT_INIT): Fix detection of '-C -'.
index 58785aee2e5abfcc81865675857f2d22deb6776f..d8ae8f364e155d8becf11617de67c3e901ee524b 100644 (file)
@@ -211,9 +211,17 @@ AT_CHECK([grep OK $1], [], [OK
 AT_CHECK_CONFIGURE([what_to_test=var-$1 --no-create])
 # config.status might be stupidly expecting data on stdin, if it's
 # really broken...
+# Skip check if user can rename files into a read-only directory (when
+# run by root or on w32).
+touch t
 chmod a-w .
-AT_CHECK([./config.status var-$1 </dev/null], [1], [ignore], [ignore])
+if mv t t1 >/dev/null 2>&1 ; then
+  :
+else
+  AT_CHECK([./config.status var-$1 </dev/null], [1], [ignore], [ignore])
+fi
 chmod u+w .
+rm -rf t t1
 ])# AT_CHECK_CONFIG_CREATION_NOWRITE