X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fthreads.impure.lisp;h=788862bd83870c1f533166c8fea4e4f84195baf0;hb=b14a61c6af3e3005c94e633e727177346240066e;hp=c5ff8f24c4d7e05b37f555edfb0b14a5309e191f;hpb=1d9fe1f6d7d64aa05993d414c1cd683a2ce231cc;p=sbcl.git diff --git a/tests/threads.impure.lisp b/tests/threads.impure.lisp index c5ff8f2..788862b 100644 --- a/tests/threads.impure.lisp +++ b/tests/threads.impure.lisp @@ -212,8 +212,7 @@ (format o "void loop_forever() { while(1) ; }~%")) (sb-ext:run-program "/bin/sh" '("run-compiler.sh" "-sbcl-pic" "-sbcl-shared" - "-o" "threads-foreign.so" "threads-foreign.c") - :environment (test-util::test-env)) + "-o" "threads-foreign.so" "threads-foreign.c")) (sb-alien:load-shared-object (truename "threads-foreign.so")) (sb-alien:define-alien-routine loop-forever sb-alien:void) (delete-file "threads-foreign.c")) @@ -1555,11 +1554,10 @@ (assert (eq result :ok)))) (with-test (:name :thread-alloca) - (sb-ext:run-program "/bin/sh" + (sb-ext:run-program "sh" '("run-compiler.sh" "-sbcl-pic" "-sbcl-shared" "alloca.c" "-o" "alloca.so") - :environment (test-util::test-env)) - + :search t) (load-shared-object (truename "alloca.so")) (alien-funcall (extern-alien "alloca_test" (function void))) @@ -1567,3 +1565,22 @@ (sb-thread:make-thread (lambda () (alien-funcall (extern-alien "alloca_test" (function void))))))) + +(with-test (:name :fp-mode-inheritance-threads) + (flet ((test () + (let ((thread-fp-mode) + (fp-mode (dpb 0 sb-vm::float-sticky-bits (sb-vm:floating-point-modes)))) + (sb-thread:join-thread + (sb-thread:make-thread + (lambda () + (setf thread-fp-mode + (dpb 0 sb-vm::float-sticky-bits (sb-vm:floating-point-modes)))))) + (assert (= fp-mode thread-fp-mode))))) + (test) + (sb-int:with-float-traps-masked (:divide-by-zero) + (test)) + (setf (sb-vm:floating-point-modes) + (dpb sb-vm:float-divide-by-zero-trap-bit + sb-vm::float-traps-byte + (sb-vm:floating-point-modes))) + (test)))