From 702cdb35db11f8a0bb26e493b99ade1b76e16e07 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Sun, 25 Aug 2019 21:44:46 +0200 Subject: [PATCH] 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! --- test-suite/standalone/test-out-of-memory | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 ()