-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from s-expressionists/vm-reorg
Vm reorg
- Loading branch information
Showing
6 changed files
with
389 additions
and
308 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
(in-package #:maclina.test) | ||
|
||
;;;; Tests of the timeout mechanism. | ||
|
||
(5am:def-suite timeout :in maclina-cross) | ||
(5am:in-suite timeout) | ||
|
||
(5am:test timeout | ||
(let ((spinner | ||
(ceval '#'(lambda (i) | ||
(block nil | ||
(tagbody | ||
loop | ||
(if (= 0 i) (return)) | ||
(setq i (- i 1)) | ||
(go loop))))))) | ||
(5am:finishes (maclina.vm-cross:with-timeout (1000000) | ||
;; It is unlikely that any future revisions will be | ||
;; dumb enough that a loop iteration takes 100k instructions. | ||
(funcall spinner 10))) | ||
(5am:signals maclina.vm-cross:timeout | ||
(maclina.vm-cross:with-timeout (10) | ||
(funcall spinner 1000))) | ||
;; make sure that without a timeout, we can run as long as we want. | ||
(5am:finishes (funcall spinner 1000)))) |
Oops, something went wrong.