0.8.8.25:
authorChristophe Rhodes <csr21@cam.ac.uk>
Mon, 15 Mar 2004 15:24:52 +0000 (15:24 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Mon, 15 Mar 2004 15:24:52 +0000 (15:24 +0000)
More SB-POSIX test fixes
... allow building as root again, since it seems that's a
desired feature
... test for not having EUID of 0 in EACCES posix tests instead

(this will probably annoy antifuchs, but I forgot to commit
version.lisp-expr for the last fix.  Since this is logically a
simple continuation, I haven't bothered to increment it again)

NEWS
contrib/sb-posix/posix-tests.lisp
make-config.sh
version.lisp-expr

diff --git a/NEWS b/NEWS
index 1183175..0b1ee32 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2320,11 +2320,6 @@ changes in sbcl-0.8.9 relative to sbcl-0.8.8:
     should matter to you only if you rebind the printer control
     variables and then find you want different bindings in the 
     debugger than in the ordinary execution of your program.)
-  * minor incompatible change: the system no longer allows itself to
-    be built as root.  This is primarily to allow the SB-POSIX contrib
-    module's test suite to assume that it is being run as an ordinary
-    user, with the attendant filesystem permissions semantics that
-    entails.
   * The runtime build system has been tweaked to support building
     (on SPARC/SunOS) using a C compiler which invokes Sun's own
     assembler and linker.  (thanks to Nikodemus Siivola)
index c304f7d..baadf8c 100644 (file)
   (defconstant +mode-rwx-all+ (logior sb-posix::s-irusr sb-posix::s-iwusr sb-posix::s-ixusr
                                      sb-posix::s-irgrp sb-posix::s-iwgrp sb-posix::s-ixgrp
                                      sb-posix::s-iroth sb-posix::s-iwoth sb-posix::s-ixoth)))
+
+(defmacro define-eacces-test (name form &rest values)
+  `(deftest ,name
+    (block ,name
+      (when (= (sb-posix:geteuid) 0)
+       (return-from ,name (values ,@values)))
+      ,form)
+    ,@values))
 \f
 (deftest chdir.1
   (sb-posix:chdir *test-directory*)
       (sb-posix:syscall-errno c)))
   #.sb-posix::eexist)
 
-(deftest mkdir.error.3
+(define-eacces-test mkdir.error.3
   (let* ((dir (merge-pathnames
               (make-pathname :directory '(:relative "mkdir.error.3"))
               *test-directory*))
          (or (= errno sb-posix::eexist) (= errno sb-posix::enotempty))))))
   t)
 
-(deftest rmdir.error.5
+(define-eacces-test rmdir.error.5
   (let* ((dir (merge-pathnames
               (make-pathname :directory '(:relative "rmdir.error.5"))
               *test-directory*))
       (sb-posix:syscall-errno c)))
   #.sb-posix::enoent)
 
-(deftest stat.error.2
+(define-eacces-test stat.error.2
   (let* ((dir (merge-pathnames
               (make-pathname :directory '(:relative "stat.error.2"))
               *test-directory*))
index 7664551..ff693d1 100644 (file)
@@ -18,9 +18,6 @@
 
 echo //entering make-config.sh
 
-echo //checking that we are not root
-if [ `id -u` -eq 0 ] ; then echo 'Argh! we are (fake)root!'; exit 1; fi;
-
 echo //ensuring the existence of output/ directory
 if [ ! -d output ] ; then mkdir output; fi
 
index 93413af..150d4f7 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.8.8.24"
+"0.8.8.25"