>From 9709890e50e82cc24e5066c056aace48d3592807 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 16 Dec 2018 08:54:44 +0100 Subject: [PATCH] tests: stack-overflow: Avoid test failure on some Linux/aarch64 systems. * tests/stack-overflow: If there is no bound on the stack size at the beginning of the script, limit it. --- tests/stack-overflow | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/stack-overflow b/tests/stack-overflow index fa7705e..ead965e 100755 --- a/tests/stack-overflow +++ b/tests/stack-overflow @@ -5,6 +5,13 @@ echo grep: stack overflow > exp || framework_failure_ +# If there is no bound on the stack size (for whatever reasons in the +# environment), limit it. +case `ulimit -s` in + [0-9]*) ;; + *) ulimit -s 8192 ;; +esac + # grep attempts to detect overflow via gnulib's c-stack module. # Trigger that with an input regex composed solely of open parentheses, # increasing the size of that input until grep emits the expected diagnostic. -- 2.7.4