1.0.46.13: hopefully fix SB-POSIX tests on Windows 7
authorNikodemus Siivola <nikodemus@random-state.net>
Thu, 24 Feb 2011 08:48:31 +0000 (08:48 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Thu, 24 Feb 2011 08:48:31 +0000 (08:48 +0000)
 Based on patch by Marko Kocić on sbcl-devel.

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

index 1d46cdf..d56cc82 100644 (file)
   (handler-case
       (sb-posix:mkdir #-win32 "/" #+win32 "C:/" 0)
     (sb-posix:syscall-error (c)
-      (sb-posix:syscall-errno c)))
-  #+darwin
-  #.sb-posix:eisdir
-  #+win32
-  #.sb-posix:eacces
-  #-(or darwin win32)
-  #.sb-posix::eexist)
+      ;; The results aren't the most consistent ones across platforms. Darwin
+      ;; likes EISDIR, Windows either EACCESS or EEXIST, others EEXIST.
+      ;; ...let's just accept them all.
+      (when (member (sb-posix:syscall-errno c)
+                    (list #.sb-posix:eisdir
+                          #.sb-posix:eacces
+                          #.sb-posix::eexist)
+                    :test #'eql)
+        :ok)))
+  :ok)
 
 (define-eacces-test mkdir.error.3
   (let* ((dir (merge-pathnames
 (deftest stat.5
     (let* ((stat-1 (sb-posix:stat "/"))
            (mode-1 (sb-posix:stat-mode stat-1))
-           (stat-2 (sb-posix:stat "C:\\CONFIG.SYS"
+           (stat-2 (sb-posix:stat "C:\\pagefile.sys"
                                    stat-1))
            (mode-2 (sb-posix:stat-mode stat-2)))
       (values
index d5e6857..a51d9aa 100644 (file)
@@ -20,4 +20,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".)
-"1.0.46.12"
+"1.0.46.13"