summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2018-12-17 22:07:25 -0800
committerJim Meyering <meyering@fb.com>2018-12-17 22:07:25 -0800
commit71b19c5cbdaa5f130380bca2475b935fef0b1b21 (patch)
tree1a4dd408583cfbc9581387e49e3714889f6ca05d
parent41d17c3f0ef3043c66f40349358fe9e88ca48582 (diff)
downloadgrep-71b19c5cbdaa5f130380bca2475b935fef0b1b21.tar.gz
tests: stack-overflow: avoid unwarranted test failure on some hosts
* tests/stack-overflow: Use ulimit to limit stack size. Otherwise, at least on gcc113, grep would fail to overflow its stack, so this test would fail to find the required diagnostic and would fail.
-rwxr-xr-xtests/stack-overflow5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/stack-overflow b/tests/stack-overflow
index b80a8bed..1e100814 100755
--- a/tests/stack-overflow
+++ b/tests/stack-overflow
@@ -5,6 +5,11 @@
echo grep: stack overflow > exp || framework_failure_
+# Limit stack size. Otherwise, it appears to be too hard to overflow the
+# stack on some systems like gcc113, aarch64/linux-3.13.0 with 32GB of RAM
+# and 20GB of swap.
+ulimit -s 8192 2>/dev/null
+
# 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.