safepoint: Remove unused context argument.
[sbcl.git] / tests / save.impure.lisp
blob364451ce6324523324eaec6d405fb0c8750fdc4d
1 ;;;; Test errors signaled when saving a core fails early.
3 ;;;; This software is part of the SBCL system. See the README file for
4 ;;;; more information.
5 ;;;;
6 ;;;; While most of SBCL is derived from the CMU CL system, the test
7 ;;;; files (like this one) were written from scratch after the fork
8 ;;;; from CMU CL.
9 ;;;;
10 ;;;; This software is in the public domain and is provided with
11 ;;;; absolutely no warranty. See the COPYING and CREDITS files for
12 ;;;; more information.
14 (with-test (:name (sb-ext:save-lisp-and-die error :multiple-threads)
15 :skipped-on (:not :sb-thread))
16 (let* ((mutex (sb-thread:make-mutex))
17 (cvar (sb-thread:make-waitqueue))
18 (donep nil)
19 (thread (sb-thread:make-thread
20 (lambda ()
21 (sb-thread:with-mutex (mutex)
22 (loop until donep
23 do (sb-thread:condition-wait cvar mutex)))))))
24 (assert-error (save-lisp-and-die "./test")
25 sb-impl::save-with-multiple-threads-error)
26 (sb-thread:with-mutex (mutex)
27 (setf donep t)
28 (sb-thread:condition-notify cvar))
29 (sb-thread:join-thread thread)))