X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fcompare-and-swap.impure.lisp;h=e16e0cb86dc610e00a0a3f27c85b36be072db884;hb=a189a69454ef7635149319ae213b337f17c50d20;hp=1bbecf9d5b9709f196ab738f11a9bbbbba75e4c9;hpb=af3fdb98f2b8718dbb69eba5db56dee369b142c7;p=sbcl.git diff --git a/tests/compare-and-swap.impure.lisp b/tests/compare-and-swap.impure.lisp index 1bbecf9..e16e0cb 100644 --- a/tests/compare-and-swap.impure.lisp +++ b/tests/compare-and-swap.impure.lisp @@ -3,7 +3,7 @@ (defstruct xxx yyy) (macrolet ((test (init op) - `(with-test (:name (:cas :basics ,op)) + `(with-test (:name (:cas :basics ,(intern (symbol-name op) "KEYWORD"))) (let ((x ,init) (y (list 'foo)) (z (list 'bar))) @@ -120,6 +120,10 @@ (defstruct box (word 0 :type sb-vm:word)) +;; Have the following tests check that CAS access to the superclass +;; works in the presence of a subclass sharing the conc-name. +(defstruct (subbox (:include box) (:conc-name "BOX-"))) + (defun inc-box (box n) (declare (fixnum n) (box box)) (loop repeat n @@ -427,7 +431,7 @@ (assert (eq :ok (cas bar :ok nil))) (assert (not (cas bar nil t))))) -(with-test (:name atomic-push +(with-test (:name :atomic-push :skipped-on '(not :sb-thread)) (let ((store (cons nil nil)) (n 100000)) @@ -436,7 +440,7 @@ (dotimes (i n) (push i y)) (mapc #'sb-thread:join-thread - (loop repeat 1000 + (loop repeat (ecase sb-vm:n-word-bits (32 100) (64 1000)) collect (sb-thread:make-thread (lambda () (loop for z = (atomic-pop y)