X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=contrib%2Fsb-posix%2Fposix-tests.lisp;h=1108583aac43e55d839458691d9239819c57b56d;hb=ca8272a7473ff5673b2da1ec7b6f9eeb87354a76;hp=baadf8c8dde914e6409988ff0bb0950811d99694;hpb=286cb407fcf618572b874ace57c119fe284d14c5;p=sbcl.git diff --git a/contrib/sb-posix/posix-tests.lisp b/contrib/sb-posix/posix-tests.lisp index baadf8c..1108583 100644 --- a/contrib/sb-posix/posix-tests.lisp +++ b/contrib/sb-posix/posix-tests.lisp @@ -355,7 +355,35 @@ (sb-posix:syscall-errno c))) #.sb-posix::eisdir) +#-(and x86-64 linux) (deftest fcntl.1 (let ((fd (sb-posix:open "/dev/null" sb-posix::o-nonblock))) (= (sb-posix:fcntl fd sb-posix::f-getfl) sb-posix::o-nonblock)) t) +;; On AMD64/Linux O_LARGEFILE is always set, even though the whole +;; flag makes no sense. +#+(and x86-64 linux) +(deftest fcntl.1 + (let ((fd (sb-posix:open "/dev/null" sb-posix::o-nonblock))) + (/= 0 (logand (sb-posix:fcntl fd sb-posix::f-getfl) + sb-posix::o-nonblock))) + t) + +(deftest opendir.1 + (let ((dir (sb-posix:opendir "/"))) + (unwind-protect (sb-alien:null-alien dir) + (unless (sb-alien:null-alien dir) + (sb-posix:closedir dir)))) + nil) + +(deftest readdir.1 + (let ((dir (sb-posix:opendir "/"))) + (unwind-protect + (block dir-loop + (loop for dirent = (sb-posix:readdir dir) + until (sb-alien:null-alien dirent) + when (not (stringp (sb-posix:dirent-name dirent))) + do (return-from dir-loop nil) + finally (return t))) + (sb-posix:closedir dir))) + t)