From c6346430e15ab44471e8740ffd7e5e581f933f36 Mon Sep 17 00:00:00 2001 From: Alastair Bridgewater Date: Wed, 30 Dec 2009 22:54:27 +0000 Subject: [PATCH] 1.0.34.2: Make threads.pure.lisp symbol-value-in-thread.[78] tests more reliable. * Actually assert that an error occurred (setf won't signal an unbound-variable if the thread still lives). * Join the thread before attempting to access the value (no more race condition). --- tests/threads.pure.lisp | 16 ++++++++++++---- version.lisp-expr | 2 +- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/tests/threads.pure.lisp b/tests/threads.pure.lisp index 8bfeea8..bc2b94c 100644 --- a/tests/threads.pure.lisp +++ b/tests/threads.pure.lisp @@ -265,22 +265,30 @@ #+sb-thread (with-test (:name symbol-value-in-thread.7) - (let ((child (make-thread (lambda ())))) + (let ((child (make-thread (lambda ()))) + (error-occurred nil)) + (join-thread child) (handler-case (symbol-value-in-thread 'this-is-new child) (symbol-value-in-thread-error (e) + (setf error-occurred t) (assert (eq child (thread-error-thread e))) (assert (eq 'this-is-new (cell-error-name e))) (assert (equal (list :read :thread-dead) - (sb-thread::symbol-value-in-thread-error-info e))))))) + (sb-thread::symbol-value-in-thread-error-info e))))) + (assert error-occurred))) #+sb-thread (with-test (:name symbol-value-in-thread.8) - (let ((child (make-thread (lambda ())))) + (let ((child (make-thread (lambda ()))) + (error-occurred nil)) + (join-thread child) (handler-case (setf (symbol-value-in-thread 'this-is-new child) t) (symbol-value-in-thread-error (e) + (setf error-occurred t) (assert (eq child (thread-error-thread e))) (assert (eq 'this-is-new (cell-error-name e))) (assert (equal (list :write :thread-dead) - (sb-thread::symbol-value-in-thread-error-info e))))))) + (sb-thread::symbol-value-in-thread-error-info e))))) + (assert error-occurred))) diff --git a/version.lisp-expr b/version.lisp-expr index ec1203b..f5b67bc 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,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.34.1" +"1.0.34.2" -- 1.7.10.4