raise the limit for the problematic test, and compensate by doing more iterations

svn: r12855
This commit is contained in:
Eli Barzilay 2008-12-15 18:18:06 +00:00
parent 0cd1b5fea9
commit 04d0b55134

View File

@ -423,32 +423,17 @@
--top-- --top--
(set! ev (parameterize ([sandbox-output 'bytes] (set! ev (parameterize ([sandbox-output 'bytes]
[sandbox-error-output current-output-port] [sandbox-error-output current-output-port]
[sandbox-memory-limit 5] [sandbox-memory-limit 20]
[sandbox-eval-limits '(0.25 1/2)]) [sandbox-eval-limits '(0.25 15)])
(make-evaluator 'scheme/base))) (make-evaluator 'scheme/base)))
;; GCing is needed to allow these to happen (note: the memory limit is very ;; GCing is needed to allow these to happen (note: the memory limit is very
;; tight here, this test usually fails if the sandbox library is not ;; tight here, this test usually fails if the sandbox library is not
;; compiled) ;; compiled)
--eval-- (display (make-bytes 400000 65)) (collect-garbage) (let ([t (lambda ()
--top-- (bytes-length (get-output ev)) => 400000 (t --eval-- (display (make-bytes 400000 65)) (collect-garbage)
--eval-- (display (make-bytes 400000 65)) (collect-garbage) --top-- (bytes-length (get-output ev)) => 400000))])
--top-- (bytes-length (get-output ev)) => 400000 ;; can go arbitrarily high here
--eval-- (display (make-bytes 400000 65)) (collect-garbage) (for ([i (in-range 20)]) (t)))
--top-- (bytes-length (get-output ev)) => 400000
--eval-- (display (make-bytes 400000 65)) (collect-garbage)
--top-- (bytes-length (get-output ev)) => 400000
--eval-- (display (make-bytes 400000 65)) (collect-garbage)
--top-- (bytes-length (get-output ev)) => 400000
--eval-- (display (make-bytes 400000 65)) (collect-garbage)
--top-- (bytes-length (get-output ev)) => 400000
--eval-- (display (make-bytes 400000 65)) (collect-garbage)
--top-- (bytes-length (get-output ev)) => 400000
--eval-- (display (make-bytes 400000 65)) (collect-garbage)
--top-- (bytes-length (get-output ev)) => 400000
--eval-- (display (make-bytes 400000 65)) (collect-garbage)
--top-- (bytes-length (get-output ev)) => 400000
--eval-- (display (make-bytes 400000 65)) (collect-garbage)
--top-- (bytes-length (get-output ev)) => 400000
;; test that killing the custodian works fine ;; test that killing the custodian works fine
;; first try it without limits (limits imply a nested thread/custodian) ;; first try it without limits (limits imply a nested thread/custodian)