0.8.6.7:
authorAndreas Fuchs <asf@boinkor.net>
Thu, 27 Nov 2003 21:50:02 +0000 (21:50 +0000)
committerAndreas Fuchs <asf@boinkor.net>
Thu, 27 Nov 2003 21:50:02 +0000 (21:50 +0000)
Fix sb-posix tests for BSDs:
* Replace #xffffffff for directory modes with a more portable
  constant (BSD's mode_t is 16 bits, so this makes the type
  checker happy)
* Conditionalize the (buggy) return value for mkdir/rmdir on
  *BSD.

contrib/sb-posix/posix-tests.lisp
version.lisp-expr

index dd5784c..1a3eb6f 100644 (file)
 (defvar *current-directory* *default-pathname-defaults*)
 
 (defvar *this-file* *load-truename*)
+
+(eval-when (:compile-toplevel :load-toplevel)
+  (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)))
 \f
 (deftest chdir.1
   (sb-posix:chdir *test-directory*)
@@ -76,7 +81,8 @@
       (sb-posix:mkdir "/" 0)
     (sb-posix:syscall-error (c)
       (sb-posix:syscall-errno c)))
-  #.sb-posix::eexist)
+  #-bsd #.sb-posix::eexist
+  #+bsd #.sb-posix::eisdir)
 
 (deftest mkdir.error.3
   (handler-case
       (sb-posix:rmdir "/")
     (sb-posix:syscall-error (c)
       (sb-posix:syscall-errno c)))
-  #.sb-posix::ebusy)
+  #-bsd #.sb-posix::ebusy
+  #+bsd #.sb-posix::eisdir)
 
 (deftest rmdir.error.4
   (let* ((dir (ensure-directories-exist
         (dir2 (merge-pathnames
                (make-pathname :directory '(:relative "unremovable"))
                dir)))
-    (sb-posix:mkdir dir #xffffffff)
-    (sb-posix:mkdir dir2 #xffffffff)
+    (sb-posix:mkdir dir +mode-rwx-all+)
+    (sb-posix:mkdir dir2 +mode-rwx-all+)
     (sb-posix:chmod dir 0)
     (handler-case
        (sb-posix:rmdir dir2)
         (file (merge-pathnames
                (make-pathname :name "unstatable")
                dir)))
-    (sb-posix:mkdir dir #xffffffff)
+    (sb-posix:mkdir dir +mode-rwx-all+)
     (with-open-file (s file :direction :output)
       (write "" :stream s))
     (sb-posix:chmod dir 0)
index 62d7642..e8d8df7 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.6.6"
+"0.8.6.7"