summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/014/socket-basic.tl2
-rw-r--r--tests/017/glob-carray.tl2
-rw-r--r--tests/017/glob-zarray.tl2
-rw-r--r--tests/018/chmod.tl55
-rw-r--r--tests/common.tl5
5 files changed, 34 insertions, 32 deletions
diff --git a/tests/014/socket-basic.tl b/tests/014/socket-basic.tl
index bbdab7f9..1b4464fb 100644
--- a/tests/014/socket-basic.tl
+++ b/tests/014/socket-basic.tl
@@ -3,7 +3,7 @@
(defvar socktype)
-(defvar %iters% (if (eql :macos (os-symbol)) 2000 5000))
+(defvar %iters% (if (meql (os-symbol) :macos :openbsd) 2000 5000))
(defun client (addr)
(with-stream (cli-sock (open-socket af-inet socktype))
diff --git a/tests/017/glob-carray.tl b/tests/017/glob-carray.tl
index 7913701b..3ce52980 100644
--- a/tests/017/glob-carray.tl
+++ b/tests/017/glob-carray.tl
@@ -12,7 +12,7 @@
(nil int)
(pathv (carray str))
(nil (array 4 cptr)))))
- ((:cygnal :cygwin :android)
+ ((:cygnal :cygwin :android :openbsd)
(deffi-type glob-t (struct glob-t
(pathc size-t)
(nil size-t)
diff --git a/tests/017/glob-zarray.tl b/tests/017/glob-zarray.tl
index e3f6d08b..4b804167 100644
--- a/tests/017/glob-zarray.tl
+++ b/tests/017/glob-zarray.tl
@@ -12,7 +12,7 @@
(nil int)
(pathv (ptr-out (zarray str)))
(nil (array 4 cptr)))))
- ((:cygnal :cygwin :android)
+ ((:cygnal :cygwin :android :openbsd)
(deffi-type glob-t (struct glob-t
(pathc size-t)
(nil size-t)
diff --git a/tests/018/chmod.tl b/tests/018/chmod.tl
index 04b63fe7..cadfb077 100644
--- a/tests/018/chmod.tl
+++ b/tests/018/chmod.tl
@@ -7,7 +7,9 @@
(with-stream (s (open-file tgt "w")))
(umask #o022)
-(defvarl test-sticky (progn
+(defvarl os (os-symbol)
+
+(defvarl test-sticky (unless (eq os :openbsd)
(chmod tgt s-isvtx)
(let ((st (stat tgt)))
(plusp (logand s-isvtx st.mode)))))
@@ -33,29 +35,28 @@
(error "failed to set mode with ~s: expected ~s, actual ~s"
mode expected (enc-perm m)))))))
-(let ((os (os-symbol)))
- (cht "------------" "a+strwx" "sgtrwxrwxrwx")
- (cht "------------" "+strwx" "sgtrwxr-xr-x")
- (cht "------------" "u+s" "s-----------")
- (cht "------------" "g+s" "-g----------")
- (cht "------------" "+t" "--t---------")
- (cht "sgtrwxrwxrwx" "=" "------------")
- ;; These tests don't work on Cygwin 3.1.7, Windows 10.
- ;; They worked on Cygwin 2.5 on Windows 7.
- (unless (eq os :cygwin)
- (cht "sgtrwxrwxrwx" "u=" "-gt---rwxrwx")
- (cht "sgtrwxrwxrwx" "g=" "s-trwx---rwx")
- (cht "sgtrwxrwxrwx" "o=" "sg-rwxrwx---"))
- (cht "------------" "u+s,g+s" "sg----------")
- (cht "------------" "u+r,g+r,o+r,+t,+s" "sgtr--r--r--")
- (cht "------------" "+rwx,g-r+w,o-r+w" "---rwx-wx-wx")
- (cht "---------rwx" "u=rwsx" "s--rwx---rwx")
- (unless (eq os :cygwin)
- (cht "---------rwx" "u=rwsx,g=rwx,go-x" "s--rwxrw-rw-")
- (cht "---------rwx" "g=o,g-w+s,u=g,o-x" "-g-r-xr-xrw-"))
- (cht "---------rwx" "o=o" "---------rwx")
- (cht "-----x------" "a+X" "-----x--x--x")
- (cht "-----x------" "=,a+X" "------------")
- (cht "-----x------" "a-x+X" "------------")
- (cht "------------" "u+x-X" "------------")
- (cht "------------" "o+x=o" "-----------x"))
+(cht "------------" "a+strwx" "sgtrwxrwxrwx")
+(cht "------------" "+strwx" "sgtrwxr-xr-x")
+(cht "------------" "u+s" "s-----------")
+(cht "------------" "g+s" "-g----------")
+(cht "------------" "+t" "--t---------")
+(cht "sgtrwxrwxrwx" "=" "------------")
+;; These tests don't work on Cygwin 3.1.7, Windows 10.
+;; They worked on Cygwin 2.5 on Windows 7.
+(unless (eq os :cygwin)
+ (cht "sgtrwxrwxrwx" "u=" "-gt---rwxrwx")
+ (cht "sgtrwxrwxrwx" "g=" "s-trwx---rwx")
+ (cht "sgtrwxrwxrwx" "o=" "sg-rwxrwx---"))
+(cht "------------" "u+s,g+s" "sg----------")
+(cht "------------" "u+r,g+r,o+r,+t,+s" "sgtr--r--r--")
+(cht "------------" "+rwx,g-r+w,o-r+w" "---rwx-wx-wx")
+(cht "---------rwx" "u=rwsx" "s--rwx---rwx")
+(unless (eq os :cygwin)
+ (cht "---------rwx" "u=rwsx,g=rwx,go-x" "s--rwxrw-rw-")
+ (cht "---------rwx" "g=o,g-w+s,u=g,o-x" "-g-r-xr-xrw-"))
+(cht "---------rwx" "o=o" "---------rwx")
+(cht "-----x------" "a+X" "-----x--x--x")
+(cht "-----x------" "=,a+X" "------------")
+(cht "-----x------" "a-x+X" "------------")
+(cht "------------" "u+x-X" "------------")
+(cht "------------" "o+x=o" "-----------x"))
diff --git a/tests/common.tl b/tests/common.tl
index accbf1f7..157cd7e1 100644
--- a/tests/common.tl
+++ b/tests/common.tl
@@ -32,13 +32,14 @@
(iff (f^ #/CYGWIN/) (ret :cygwin))
(iff (f^ #/CYGNAL/) (ret :cygnal))
(iff (f^ #/Darwin/) (ret :macos))
+ (iff (f^ #/OpenBSD/) (ret :openbsd))
(ret :unknown))
u.sysname])))
(defun libc ()
(caseql (os-symbol)
- ((:linux :solaris :macos :android) (dlopen nil))
- ((:cygwin) (dlopen "cygwin1.dll"))))
+ ((:cygwin :cygnal) (dlopen "cygwin1.dll"))
+ (t (dlopen nil))))
(defmacro macro-time-let (:env env bindings . body)
(with-gensyms (invoke)