From: Andy Wingo Date: Sun, 25 Aug 2019 19:44:46 +0000 (+0200) Subject: Fix out-of-memory test for top-level inlining X-Git-Tag: v2.9.4~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=702cdb35db11f8a0bb26e493b99ade1b76e16e07;p=platform%2Fupstream%2Fguile.git Fix out-of-memory test for top-level inlining * test-suite/standalone/test-out-of-memory: Prevent the test harness from being inlined. If the test harness is inlined, it might cause the optimizer to omit the allocations being tested! --- diff --git a/test-suite/standalone/test-out-of-memory b/test-suite/standalone/test-out-of-memory index 221651270..31375a559 100755 --- a/test-suite/standalone/test-out-of-memory +++ b/test-suite/standalone/test-out-of-memory @@ -36,7 +36,7 @@ exec guile -q -s "$0" "$@" (lambda (k . args) (print-exception (current-error-port) #f k args) (write "Skipping test.\n" (current-error-port)) - (exit 0))) + (exit 77))) ; unresolved ;; 50 MB. (define *limit* (* 50 1024 1024)) @@ -54,6 +54,10 @@ exec guile -q -s "$0" "$@" (lambda _ #t))) +;; Prevent `test' from being inlined, which might cause an unused +;; allocation to be omitted. +(set! test test) + (use-modules (rnrs bytevectors)) (test (lambda ()