From: Nikodemus Siivola Date: Sun, 29 Apr 2012 17:55:35 +0000 (+0300) Subject: tune bug-981106 test based on the heap size X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=4ce962e92568e52624959d8abc83f609abc3605c;p=sbcl.git tune bug-981106 test based on the heap size Fixes lp#983807. --- diff --git a/tests/gc.impure.lisp b/tests/gc.impure.lisp index cb9e3e7..ef4313a 100644 --- a/tests/gc.impure.lisp +++ b/tests/gc.impure.lisp @@ -85,10 +85,11 @@ (assert (eq :ok (handler-case (dotimes (runs 100 :ok) - (let ((len (length - (with-output-to-string (string) - (dotimes (i 1000000) - (write-sequence "hi there!" string)))))) - (assert (eql len (* 1000000 (length "hi there!")))))) + (let* ((n (truncate (dynamic-space-size) 1200)) + (len (length + (with-output-to-string (string) + (dotimes (i n) + (write-sequence "hi there!" string)))))) + (assert (eql len (* n (length "hi there!")))))) (storage-condition () :oom))))))