Fix "exit from normal thread" test
authorPaul Khuong <pvk@pvk.ca>
Fri, 17 Aug 2012 22:11:47 +0000 (18:11 -0400)
committerDavid Lichteblau <david@lichteblau.com>
Tue, 18 Sep 2012 16:08:12 +0000 (18:08 +0200)
 The test did not wait for the child to exit, resulting in spurious
 failures on loaded or single-core machines.

tests/threads.test.sh

index cd5b446..c7d6374 100644 (file)
@@ -20,7 +20,7 @@ check_status_maybe_lose "return from main thread" $? 0 "ok"
 run_sbcl --eval '(sb-thread:abort-thread :allow-exit t)'
 check_status_maybe_lose "abort main thread" $? 1 "ok"
 
-run_sbcl --eval '#+sb-thread (sb-thread:make-thread (lambda () (sb-ext:exit :code 77))) #-sb-thread (sb-ext:exit :code 77)'
+run_sbcl --eval '#+sb-thread (sb-thread:join-thread (sb-thread:make-thread (lambda () (sb-ext:exit :code 77)))) #-sb-thread (sb-ext:exit :code 77)'
 check_status_maybe_lose "exit from normal thread" $? 77 "ok"
 
 flag="condition-wait-sigcont.tmp"