diff options
| author | Glenn Morris | 2018-07-13 09:28:15 -0700 |
|---|---|---|
| committer | Glenn Morris | 2018-07-13 09:28:15 -0700 |
| commit | cda7e1850f2f19a5025fd163ff2c6c6cba275acf (patch) | |
| tree | 1fdb0014a632e936da813128ead6353051436cbd /test | |
| parent | 1013e0392b78ee0e2199fb51859dc9e939315f9b (diff) | |
| parent | 17ebb6e5ae9cdd2586d1b4d6f2347ae09c6f653f (diff) | |
| download | emacs-cda7e1850f2f19a5025fd163ff2c6c6cba275acf.tar.gz emacs-cda7e1850f2f19a5025fd163ff2c6c6cba275acf.zip | |
Merge from origin/emacs-26
17ebb6e (origin/emacs-26) Use consistent function names in thread-tes...
1c86229 Fix format error in Faccept_process_output
b38b91a Lessen stack consumption in recursive read1
3eb4603 Match w32 paths in grep sans --null hits (Bug#32051)
5cc7c4b Fix previous make-network-process change
d6a1b69 Another documentation improvement in flyspell.el
9b49a8e Improve documentation of Flyspell
3744fda Provide feature 'threads
ef9025f Save the server alias on reconnect (Bug#29657)
db3874b Refer to "proper lists" instead of "true lists"
35e0305 Avoid turning on the global-minor-mode recursively
51bf4e4 Fix Bug#32085
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/progmodes/compile-tests.el | 46 | ||||
| -rw-r--r-- | test/src/thread-tests.el | 93 |
2 files changed, 102 insertions, 37 deletions
diff --git a/test/lisp/progmodes/compile-tests.el b/test/lisp/progmodes/compile-tests.el index a106030aea1..4e2dc86eae0 100644 --- a/test/lisp/progmodes/compile-tests.el +++ b/test/lisp/progmodes/compile-tests.el | |||
| @@ -343,6 +343,29 @@ meaning a range of columns starting on LINE and ending on | |||
| 343 | END-LINE, if that matched. TYPE can be left out, in which case | 343 | END-LINE, if that matched. TYPE can be left out, in which case |
| 344 | any message type is accepted.") | 344 | any message type is accepted.") |
| 345 | 345 | ||
| 346 | (defconst compile-tests--grep-regexp-testcases | ||
| 347 | ;; Bug#32051. | ||
| 348 | '(("c:/Users/my.name/src/project\\src\\kbhit.hpp\0\ 29:#include <termios.h>" | ||
| 349 | 1 nil 29 "c:/Users/my.name/src/project\\src\\kbhit.hpp") | ||
| 350 | ("d:/gnu/emacs/branch/src/callproc.c\0\ 214:#ifdef DOS_NT" | ||
| 351 | 1 nil 214 "d:/gnu/emacs/branch/src/callproc.c") | ||
| 352 | ("/gnu/emacs/branch/src/callproc.c\0\ 214:#ifdef DOS_NT" | ||
| 353 | 1 nil 214 "/gnu/emacs/branch/src/callproc.c")) | ||
| 354 | "List of tests for `grep-regexp-list'. | ||
| 355 | The format is the same as `compile-tests--test-regexps-data', but | ||
| 356 | the match is expected to be the same when NUL bytes are replaced | ||
| 357 | with colon.") | ||
| 358 | |||
| 359 | (defconst compile-tests--grep-regexp-tricky-testcases | ||
| 360 | ;; Bug#7378. | ||
| 361 | '(("./x11-libs---nx/3.4.0:0:C.30253.1289557929.792611.C/nx-3.4.0.exheres-0\0\ 42:some text" | ||
| 362 | 1 nil 42 "./x11-libs---nx/3.4.0:0:C.30253.1289557929.792611.C/nx-3.4.0.exheres-0") | ||
| 363 | ("2011-08-31_11:57:03_1\0\ 7:Date: Wed, 31 Aug 2011 11:57:03 +0000" | ||
| 364 | 1 nil 7 "2011-08-31_11:57:03_1")) | ||
| 365 | "List of tricky tests for `grep-regexp-list'. | ||
| 366 | Same as `compile-tests--grep-regexp-testcases', but these cases | ||
| 367 | can only work with the NUL byte to disambiguate colons.") | ||
| 368 | |||
| 346 | (defun compile--test-error-line (test) | 369 | (defun compile--test-error-line (test) |
| 347 | (erase-buffer) | 370 | (erase-buffer) |
| 348 | (setq compilation-locs (make-hash-table)) | 371 | (setq compilation-locs (make-hash-table)) |
| @@ -370,7 +393,8 @@ any message type is accepted.") | |||
| 370 | (should (equal (car (nth 2 (compilation--loc->file-struct loc))) | 393 | (should (equal (car (nth 2 (compilation--loc->file-struct loc))) |
| 371 | (or end-line line))) | 394 | (or end-line line))) |
| 372 | (when type | 395 | (when type |
| 373 | (should (equal type (compilation--message->type msg))))))) | 396 | (should (equal type (compilation--message->type msg))))) |
| 397 | msg)) | ||
| 374 | 398 | ||
| 375 | (ert-deftest compile-test-error-regexps () | 399 | (ert-deftest compile-test-error-regexps () |
| 376 | "Test the `compilation-error-regexp-alist' regexps. | 400 | "Test the `compilation-error-regexp-alist' regexps. |
| @@ -379,4 +403,24 @@ The test data is in `compile-tests--test-regexps-data'." | |||
| 379 | (font-lock-mode -1) | 403 | (font-lock-mode -1) |
| 380 | (mapc #'compile--test-error-line compile-tests--test-regexps-data))) | 404 | (mapc #'compile--test-error-line compile-tests--test-regexps-data))) |
| 381 | 405 | ||
| 406 | (ert-deftest compile-test-grep-regexps () | ||
| 407 | "Test the `grep-regexp-alist' regexps. | ||
| 408 | The test data is in `compile-tests--grep-regexp-testcases'." | ||
| 409 | (with-temp-buffer | ||
| 410 | (grep-mode) | ||
| 411 | (setq buffer-read-only nil) | ||
| 412 | (font-lock-mode -1) | ||
| 413 | (dolist (testcase compile-tests--grep-regexp-testcases) | ||
| 414 | (let (msg1 msg2) | ||
| 415 | (setq msg1 (ert-info ((format "%S" testcase) :prefix "testcase: ") | ||
| 416 | (compile--test-error-line testcase))) | ||
| 417 | ;; Make sure replacing the NUL character with a colon still matches. | ||
| 418 | (setf (car testcase) (replace-regexp-in-string "\0" ":" (car testcase))) | ||
| 419 | (setq msg2 (ert-info ((format "%S" testcase) :prefix "testcase: ") | ||
| 420 | (compile--test-error-line testcase))) | ||
| 421 | (should (equal msg1 msg2)))) | ||
| 422 | (dolist (testcase compile-tests--grep-regexp-tricky-testcases) | ||
| 423 | (ert-info ((format "%S" testcase) :prefix "testcase: ") | ||
| 424 | (compile--test-error-line testcase))))) | ||
| 425 | |||
| 382 | ;;; compile-tests.el ends here | 426 | ;;; compile-tests.el ends here |
diff --git a/test/src/thread-tests.el b/test/src/thread-tests.el index 0e909d3e511..a00a9c84bd6 100644 --- a/test/src/thread-tests.el +++ b/test/src/thread-tests.el | |||
| @@ -19,36 +19,56 @@ | |||
| 19 | 19 | ||
| 20 | ;;; Code: | 20 | ;;; Code: |
| 21 | 21 | ||
| 22 | ;; Declare the functions in case Emacs has been configured --without-threads. | ||
| 23 | (declare-function all-threads "thread.c" ()) | ||
| 24 | (declare-function condition-mutex "thread.c" (cond)) | ||
| 25 | (declare-function condition-name "thread.c" (cond)) | ||
| 26 | (declare-function condition-notify "thread.c" (cond &optional all)) | ||
| 27 | (declare-function condition-wait "thread.c" (cond)) | ||
| 28 | (declare-function current-thread "thread.c" ()) | ||
| 29 | (declare-function make-condition-variable "thread.c" (mutex &optional name)) | ||
| 30 | (declare-function make-mutex "thread.c" (&optional name)) | ||
| 31 | (declare-function make-thread "thread.c" (function &optional name)) | ||
| 32 | (declare-function mutex-lock "thread.c" (mutex)) | ||
| 33 | (declare-function mutex-unlock "thread.c" (mutex)) | ||
| 34 | (declare-function thread--blocker "thread.c" (thread)) | ||
| 35 | (declare-function thread-alive-p "thread.c" (thread)) | ||
| 36 | (declare-function thread-join "thread.c" (thread)) | ||
| 37 | (declare-function thread-last-error "thread.c" ()) | ||
| 38 | (declare-function thread-name "thread.c" (thread)) | ||
| 39 | (declare-function thread-signal "thread.c" (thread error-symbol data)) | ||
| 40 | (declare-function thread-yield "thread.c" ()) | ||
| 41 | |||
| 22 | (ert-deftest threads-is-one () | 42 | (ert-deftest threads-is-one () |
| 23 | "Test for existence of a thread." | 43 | "Test for existence of a thread." |
| 24 | (skip-unless (fboundp 'make-thread)) | 44 | (skip-unless (featurep 'threads)) |
| 25 | (should (current-thread))) | 45 | (should (current-thread))) |
| 26 | 46 | ||
| 27 | (ert-deftest threads-threadp () | 47 | (ert-deftest threads-threadp () |
| 28 | "Test of threadp." | 48 | "Test of threadp." |
| 29 | (skip-unless (fboundp 'make-thread)) | 49 | (skip-unless (featurep 'threads)) |
| 30 | (should (threadp (current-thread)))) | 50 | (should (threadp (current-thread)))) |
| 31 | 51 | ||
| 32 | (ert-deftest threads-type () | 52 | (ert-deftest threads-type () |
| 33 | "Test of thread type." | 53 | "Test of thread type." |
| 34 | (skip-unless (fboundp 'make-thread)) | 54 | (skip-unless (featurep 'threads)) |
| 35 | (should (eq (type-of (current-thread)) 'thread))) | 55 | (should (eq (type-of (current-thread)) 'thread))) |
| 36 | 56 | ||
| 37 | (ert-deftest threads-name () | 57 | (ert-deftest threads-name () |
| 38 | "Test for name of a thread." | 58 | "Test for name of a thread." |
| 39 | (skip-unless (fboundp 'make-thread)) | 59 | (skip-unless (featurep 'threads)) |
| 40 | (should | 60 | (should |
| 41 | (string= "hi bob" (thread-name (make-thread #'ignore "hi bob"))))) | 61 | (string= "hi bob" (thread-name (make-thread #'ignore "hi bob"))))) |
| 42 | 62 | ||
| 43 | (ert-deftest threads-alive () | 63 | (ert-deftest threads-alive () |
| 44 | "Test for thread liveness." | 64 | "Test for thread liveness." |
| 45 | (skip-unless (fboundp 'make-thread)) | 65 | (skip-unless (featurep 'threads)) |
| 46 | (should | 66 | (should |
| 47 | (thread-alive-p (make-thread #'ignore)))) | 67 | (thread-alive-p (make-thread #'ignore)))) |
| 48 | 68 | ||
| 49 | (ert-deftest threads-all-threads () | 69 | (ert-deftest threads-all-threads () |
| 50 | "Simple test for all-threads." | 70 | "Simple test for all-threads." |
| 51 | (skip-unless (fboundp 'make-thread)) | 71 | (skip-unless (featurep 'threads)) |
| 52 | (should (listp (all-threads)))) | 72 | (should (listp (all-threads)))) |
| 53 | 73 | ||
| 54 | (defvar threads-test-global nil) | 74 | (defvar threads-test-global nil) |
| @@ -58,7 +78,7 @@ | |||
| 58 | 78 | ||
| 59 | (ert-deftest threads-basic () | 79 | (ert-deftest threads-basic () |
| 60 | "Basic thread test." | 80 | "Basic thread test." |
| 61 | (skip-unless (fboundp 'make-thread)) | 81 | (skip-unless (featurep 'threads)) |
| 62 | (should | 82 | (should |
| 63 | (progn | 83 | (progn |
| 64 | (setq threads-test-global nil) | 84 | (setq threads-test-global nil) |
| @@ -69,7 +89,7 @@ | |||
| 69 | 89 | ||
| 70 | (ert-deftest threads-join () | 90 | (ert-deftest threads-join () |
| 71 | "Test of `thread-join'." | 91 | "Test of `thread-join'." |
| 72 | (skip-unless (fboundp 'make-thread)) | 92 | (skip-unless (featurep 'threads)) |
| 73 | (should | 93 | (should |
| 74 | (progn | 94 | (progn |
| 75 | (setq threads-test-global nil) | 95 | (setq threads-test-global nil) |
| @@ -80,7 +100,7 @@ | |||
| 80 | 100 | ||
| 81 | (ert-deftest threads-join-self () | 101 | (ert-deftest threads-join-self () |
| 82 | "Cannot `thread-join' the current thread." | 102 | "Cannot `thread-join' the current thread." |
| 83 | (skip-unless (fboundp 'make-thread)) | 103 | (skip-unless (featurep 'threads)) |
| 84 | (should-error (thread-join (current-thread)))) | 104 | (should-error (thread-join (current-thread)))) |
| 85 | 105 | ||
| 86 | (defvar threads-test-binding nil) | 106 | (defvar threads-test-binding nil) |
| @@ -92,7 +112,7 @@ | |||
| 92 | 112 | ||
| 93 | (ert-deftest threads-let-binding () | 113 | (ert-deftest threads-let-binding () |
| 94 | "Simple test of threads and let bindings." | 114 | "Simple test of threads and let bindings." |
| 95 | (skip-unless (fboundp 'make-thread)) | 115 | (skip-unless (featurep 'threads)) |
| 96 | (should | 116 | (should |
| 97 | (progn | 117 | (progn |
| 98 | (setq threads-test-global nil) | 118 | (setq threads-test-global nil) |
| @@ -104,22 +124,22 @@ | |||
| 104 | 124 | ||
| 105 | (ert-deftest threads-mutexp () | 125 | (ert-deftest threads-mutexp () |
| 106 | "Simple test of `mutexp'." | 126 | "Simple test of `mutexp'." |
| 107 | (skip-unless (fboundp 'make-thread)) | 127 | (skip-unless (featurep 'threads)) |
| 108 | (should-not (mutexp 'hi))) | 128 | (should-not (mutexp 'hi))) |
| 109 | 129 | ||
| 110 | (ert-deftest threads-mutexp-2 () | 130 | (ert-deftest threads-mutexp-2 () |
| 111 | "Another simple test of `mutexp'." | 131 | "Another simple test of `mutexp'." |
| 112 | (skip-unless (fboundp 'make-thread)) | 132 | (skip-unless (featurep 'threads)) |
| 113 | (should (mutexp (make-mutex)))) | 133 | (should (mutexp (make-mutex)))) |
| 114 | 134 | ||
| 115 | (ert-deftest threads-mutex-type () | 135 | (ert-deftest threads-mutex-type () |
| 116 | "type-of mutex." | 136 | "type-of mutex." |
| 117 | (skip-unless (fboundp 'make-thread)) | 137 | (skip-unless (featurep 'threads)) |
| 118 | (should (eq (type-of (make-mutex)) 'mutex))) | 138 | (should (eq (type-of (make-mutex)) 'mutex))) |
| 119 | 139 | ||
| 120 | (ert-deftest threads-mutex-lock-unlock () | 140 | (ert-deftest threads-mutex-lock-unlock () |
| 121 | "Test mutex-lock and unlock." | 141 | "Test mutex-lock and unlock." |
| 122 | (skip-unless (fboundp 'make-thread)) | 142 | (skip-unless (featurep 'threads)) |
| 123 | (should | 143 | (should |
| 124 | (let ((mx (make-mutex))) | 144 | (let ((mx (make-mutex))) |
| 125 | (mutex-lock mx) | 145 | (mutex-lock mx) |
| @@ -128,7 +148,7 @@ | |||
| 128 | 148 | ||
| 129 | (ert-deftest threads-mutex-recursive () | 149 | (ert-deftest threads-mutex-recursive () |
| 130 | "Test mutex recursion." | 150 | "Test mutex recursion." |
| 131 | (skip-unless (fboundp 'make-thread)) | 151 | (skip-unless (featurep 'threads)) |
| 132 | (should | 152 | (should |
| 133 | (let ((mx (make-mutex))) | 153 | (let ((mx (make-mutex))) |
| 134 | (mutex-lock mx) | 154 | (mutex-lock mx) |
| @@ -149,7 +169,7 @@ | |||
| 149 | 169 | ||
| 150 | (ert-deftest threads-mutex-contention () | 170 | (ert-deftest threads-mutex-contention () |
| 151 | "Test of mutex contention." | 171 | "Test of mutex contention." |
| 152 | (skip-unless (fboundp 'make-thread)) | 172 | (skip-unless (featurep 'threads)) |
| 153 | (should | 173 | (should |
| 154 | (progn | 174 | (progn |
| 155 | (setq threads-mutex (make-mutex)) | 175 | (setq threads-mutex (make-mutex)) |
| @@ -170,7 +190,7 @@ | |||
| 170 | 190 | ||
| 171 | (ert-deftest threads-mutex-signal () | 191 | (ert-deftest threads-mutex-signal () |
| 172 | "Test signaling a blocked thread." | 192 | "Test signaling a blocked thread." |
| 173 | (skip-unless (fboundp 'make-thread)) | 193 | (skip-unless (featurep 'threads)) |
| 174 | (should | 194 | (should |
| 175 | (progn | 195 | (progn |
| 176 | (setq threads-mutex (make-mutex)) | 196 | (setq threads-mutex (make-mutex)) |
| @@ -188,7 +208,7 @@ | |||
| 188 | 208 | ||
| 189 | (ert-deftest threads-io-switch () | 209 | (ert-deftest threads-io-switch () |
| 190 | "Test that `accept-process-output' causes thread switch." | 210 | "Test that `accept-process-output' causes thread switch." |
| 191 | (skip-unless (fboundp 'make-thread)) | 211 | (skip-unless (featurep 'threads)) |
| 192 | (should | 212 | (should |
| 193 | (progn | 213 | (progn |
| 194 | (setq threads-test-global nil) | 214 | (setq threads-test-global nil) |
| @@ -199,67 +219,68 @@ | |||
| 199 | 219 | ||
| 200 | (ert-deftest threads-condvarp () | 220 | (ert-deftest threads-condvarp () |
| 201 | "Simple test of `condition-variable-p'." | 221 | "Simple test of `condition-variable-p'." |
| 202 | (skip-unless (fboundp 'make-thread)) | 222 | (skip-unless (featurep 'threads)) |
| 203 | (should-not (condition-variable-p 'hi))) | 223 | (should-not (condition-variable-p 'hi))) |
| 204 | 224 | ||
| 205 | (ert-deftest threads-condvarp-2 () | 225 | (ert-deftest threads-condvarp-2 () |
| 206 | "Another simple test of `condition-variable-p'." | 226 | "Another simple test of `condition-variable-p'." |
| 207 | (skip-unless (fboundp 'make-thread)) | 227 | (skip-unless (featurep 'threads)) |
| 208 | (should (condition-variable-p (make-condition-variable (make-mutex))))) | 228 | (should (condition-variable-p (make-condition-variable (make-mutex))))) |
| 209 | 229 | ||
| 210 | (ert-deftest threads-condvar-type () | 230 | (ert-deftest threads-condvar-type () |
| 211 | "type-of condvar" | 231 | "type-of condvar" |
| 212 | (skip-unless (fboundp 'make-thread)) | 232 | (skip-unless (featurep 'threads)) |
| 213 | (should (eq (type-of (make-condition-variable (make-mutex))) | 233 | (should (eq (type-of (make-condition-variable (make-mutex))) |
| 214 | 'condition-variable))) | 234 | 'condition-variable))) |
| 215 | 235 | ||
| 216 | (ert-deftest threads-condvar-mutex () | 236 | (ert-deftest threads-condvar-mutex () |
| 217 | "Simple test of `condition-mutex'." | 237 | "Simple test of `condition-mutex'." |
| 218 | (skip-unless (fboundp 'make-thread)) | 238 | (skip-unless (featurep 'threads)) |
| 219 | (should | 239 | (should |
| 220 | (let ((m (make-mutex))) | 240 | (let ((m (make-mutex))) |
| 221 | (eq m (condition-mutex (make-condition-variable m)))))) | 241 | (eq m (condition-mutex (make-condition-variable m)))))) |
| 222 | 242 | ||
| 223 | (ert-deftest threads-condvar-name () | 243 | (ert-deftest threads-condvar-name () |
| 224 | "Simple test of `condition-name'." | 244 | "Simple test of `condition-name'." |
| 225 | (skip-unless (fboundp 'make-thread)) | 245 | (skip-unless (featurep 'threads)) |
| 226 | (should | 246 | (should |
| 227 | (eq nil (condition-name (make-condition-variable (make-mutex)))))) | 247 | (eq nil (condition-name (make-condition-variable (make-mutex)))))) |
| 228 | 248 | ||
| 229 | (ert-deftest threads-condvar-name-2 () | 249 | (ert-deftest threads-condvar-name-2 () |
| 230 | "Another simple test of `condition-name'." | 250 | "Another simple test of `condition-name'." |
| 231 | (skip-unless (fboundp 'make-thread)) | 251 | (skip-unless (featurep 'threads)) |
| 232 | (should | 252 | (should |
| 233 | (string= "hi bob" | 253 | (string= "hi bob" |
| 234 | (condition-name (make-condition-variable (make-mutex) | 254 | (condition-name (make-condition-variable (make-mutex) |
| 235 | "hi bob"))))) | 255 | "hi bob"))))) |
| 236 | (defun call-error () | 256 | |
| 257 | (defun threads-call-error () | ||
| 237 | "Call `error'." | 258 | "Call `error'." |
| 238 | (error "Error is called")) | 259 | (error "Error is called")) |
| 239 | 260 | ||
| 240 | ;; This signals an error internally; the error should be caught. | 261 | ;; This signals an error internally; the error should be caught. |
| 241 | (defun thread-custom () | 262 | (defun threads-custom () |
| 242 | (defcustom thread-custom-face 'highlight | 263 | (defcustom threads-custom-face 'highlight |
| 243 | "Face used for thread customizations." | 264 | "Face used for thread customizations." |
| 244 | :type 'face | 265 | :type 'face |
| 245 | :group 'widget-faces)) | 266 | :group 'widget-faces)) |
| 246 | 267 | ||
| 247 | (ert-deftest thread-errors () | 268 | (ert-deftest threads-errors () |
| 248 | "Test what happens when a thread signals an error." | 269 | "Test what happens when a thread signals an error." |
| 249 | (skip-unless (fboundp 'make-thread)) | 270 | (skip-unless (featurep 'threads)) |
| 250 | (let (th1 th2) | 271 | (let (th1 th2) |
| 251 | (setq th1 (make-thread #'call-error "call-error")) | 272 | (setq th1 (make-thread #'threads-call-error "call-error")) |
| 252 | (should (threadp th1)) | 273 | (should (threadp th1)) |
| 253 | (while (thread-alive-p th1) | 274 | (while (thread-alive-p th1) |
| 254 | (thread-yield)) | 275 | (thread-yield)) |
| 255 | (should (equal (thread-last-error) | 276 | (should (equal (thread-last-error) |
| 256 | '(error "Error is called"))) | 277 | '(error "Error is called"))) |
| 257 | (setq th2 (make-thread #'thread-custom "thread-custom")) | 278 | (setq th2 (make-thread #'threads-custom "threads-custom")) |
| 258 | (should (threadp th2)))) | 279 | (should (threadp th2)))) |
| 259 | 280 | ||
| 260 | (ert-deftest thread-sticky-point () | 281 | (ert-deftest threads-sticky-point () |
| 261 | "Test bug #25165 with point movement in cloned buffer." | 282 | "Test bug #25165 with point movement in cloned buffer." |
| 262 | (skip-unless (fboundp 'make-thread)) | 283 | (skip-unless (featurep 'threads)) |
| 263 | (with-temp-buffer | 284 | (with-temp-buffer |
| 264 | (insert "Lorem ipsum dolor sit amet, consectetur adipiscing elit.") | 285 | (insert "Lorem ipsum dolor sit amet, consectetur adipiscing elit.") |
| 265 | (goto-char (point-min)) | 286 | (goto-char (point-min)) |
| @@ -268,9 +289,9 @@ | |||
| 268 | (sit-for 1) | 289 | (sit-for 1) |
| 269 | (should (= (point) 21)))) | 290 | (should (= (point) 21)))) |
| 270 | 291 | ||
| 271 | (ert-deftest thread-signal-early () | 292 | (ert-deftest threads-signal-early () |
| 272 | "Test signaling a thread as soon as it is started by the OS." | 293 | "Test signaling a thread as soon as it is started by the OS." |
| 273 | (skip-unless (fboundp 'make-thread)) | 294 | (skip-unless (featurep 'threads)) |
| 274 | (let ((thread | 295 | (let ((thread |
| 275 | (make-thread #'(lambda () | 296 | (make-thread #'(lambda () |
| 276 | (while t (thread-yield)))))) | 297 | (while t (thread-yield)))))) |
| @@ -291,7 +312,7 @@ | |||
| 291 | 312 | ||
| 292 | (ert-deftest threads-condvar-wait () | 313 | (ert-deftest threads-condvar-wait () |
| 293 | "Test waiting on conditional variable." | 314 | "Test waiting on conditional variable." |
| 294 | (skip-unless (fboundp 'make-thread)) | 315 | (skip-unless (featurep 'threads)) |
| 295 | (let ((cv-mutex (make-mutex)) | 316 | (let ((cv-mutex (make-mutex)) |
| 296 | new-thread) | 317 | new-thread) |
| 297 | ;; We could have spurious threads from the previous tests still | 318 | ;; We could have spurious threads from the previous tests still |