X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fthreads.test.sh;h=c7d637435b4034340029ddde287aa960c5349541;hb=9c9d6dbdc28a8bfe70be09f35263e9ec02411d0e;hp=2341b3d8a9d2c175921230b9ade785e464582d13;hpb=a42922aef908a1b45ae5420d51b2ca7ee1bafb9e;p=sbcl.git diff --git a/tests/threads.test.sh b/tests/threads.test.sh index 2341b3d..c7d6374 100644 --- a/tests/threads.test.sh +++ b/tests/threads.test.sh @@ -14,10 +14,21 @@ . ./subr.sh use_test_subdirectory +run_sbcl --eval '(sb-thread:return-from-thread t :allow-exit t)' +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: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" touch $flag -run_sbcl --load "$SBCL_PWD/condition-wait-sigcont.lisp" & +# $! is not set correctly when calling run_sbcl, do it directly +"$SBCL_RUNTIME" --core "$SBCL_CORE" $SBCL_ARGS \ + --load "$SBCL_PWD/condition-wait-sigcont.lisp" & sb_pid=$! while [ -f $flag ]; do sleep 1; done