From 9687334ff52a2def369e7abb8563401351db9be7 Mon Sep 17 00:00:00 2001 From: Daniel Llorens Date: Fri, 24 Jun 2016 16:31:45 +0200 Subject: [PATCH] On Darwin, skip tests that depend on setrlimit On Darwin, setrlimit is ignored, and these tests do not terminate. There doesn't seem to be another way to limit the memory allocated by a process. * test-suite/standalone/test-stack-overflow: Skip this test on Darwin. * test-suite/standalone/test-out-of-memory: Skip this test on Darwin. --- test-suite/standalone/test-out-of-memory | 6 ++++++ test-suite/standalone/test-stack-overflow | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/test-suite/standalone/test-out-of-memory b/test-suite/standalone/test-out-of-memory index 2ae3ee69b..bda42cb44 100755 --- a/test-suite/standalone/test-out-of-memory +++ b/test-suite/standalone/test-out-of-memory @@ -9,6 +9,12 @@ exec guile -q -s "$0" "$@" ;; should run as part of an automated test suite. (exit 0)) +(when (string-ci= "darwin" (vector-ref (uname) 0)) + ;; setrlimits are ignored in OS X (tested on 10.9 and 10.10). Proceeding + ;; with the test would fill all available memory and probably end in a crash. + ;; See also test-stack-overflow. + (exit 77)) ; unresolved + (catch #t ;; Silence GC warnings. (lambda () diff --git a/test-suite/standalone/test-stack-overflow b/test-suite/standalone/test-stack-overflow index 3b979a99e..74bc7b874 100755 --- a/test-suite/standalone/test-stack-overflow +++ b/test-suite/standalone/test-stack-overflow @@ -9,6 +9,12 @@ exec guile -q -s "$0" "$@" ;; something we should run as part of an automated test suite. (exit 0)) +(when (string-ci= "darwin" (vector-ref (uname) 0)) + ;; setrlimits are ignored in OS X (tested on 10.9 and 10.10). Proceeding + ;; with the test would fill all available memory and probably end in a crash. + ;; See also test-stack-overflow. + (exit 77)) ; uresolved + ;; 100 MB. (define *limit* (* 100 1024 1024)) @@ -28,6 +34,7 @@ exec guile -q -s "$0" "$@" ;; Run the test a few times. The stack will only be enlarged and ;; relocated on the first one. + (test) (test) (test)