summaryrefslogtreecommitdiff
path: root/tests/stackovf.test
diff options
context:
space:
mode:
authorEric Blake <ebb9@byu.net>2009-12-14 13:52:15 -0700
committerEric Blake <ebb9@byu.net>2010-01-05 22:03:49 -0700
commitcdff6b56f2f9e848722f93e45803be19609641b5 (patch)
tree5db3706f72910fbd1ef87ff031a6e08f92c9f533 /tests/stackovf.test
parent1270f0e114d5b7f442362a4952f185920886045e (diff)
downloadm4-cdff6b56f2f9e848722f93e45803be19609641b5.tar.gz
Switch to indentation by space, not tab.
Now that gnulib has converted and git has better support for ignoring whitespace differences across this commit, we might as well be consistent with other GNU projects. Done with: t=$'\t' git ls-files \ | grep -vE '(^|/)(.*akefile|ChangeLog|HACKING|.*-aux/.*)|\.(am|mk)$' \ | xargs grep -lE "^ *$t" \ | xargs perl -MText::Tabs -ni -le \ '$m=/^( *\t[ \t]*)(.*)/; print $m ? expand($1) . $2 : $_' followed by tweaks to pass 'make check' again. * .gitmodules: Convert leading tabs to spaces. * TODO: Likewise. * bootstrap: Likewise. * configure.ac: Likewise. * examples/WWW/m4lib/html.m4: Likewise. * examples/WWW/m4lib/layout.m4: Likewise. * examples/WWW/m4lib/menu.m4: Likewise. * ltdl/m4/debug.m4: Likewise. * ltdl/m4/gmp.m4: Likewise. * ltdl/m4/m4-obstack.m4: Likewise. * ltdl/m4/stackovf.m4: Likewise. * m4/builtin.c: Likewise. * m4/debug.c: Likewise. * m4/hash.c: Likewise. * m4/hash.h: Likewise. * m4/input.c: Likewise. * m4/m4.c: Likewise. * m4/m4module.h: Likewise. * m4/m4private.h: Likewise. * m4/macro.c: Likewise. * m4/module.c: Likewise. * m4/output.c: Likewise. * m4/path.c: Likewise. * m4/resyntax.c: Likewise. * m4/symtab.c: Likewise. * m4/syntax.c: Likewise. * m4/utility.c: Likewise. * modules/evalparse.c: Likewise. * modules/format.c: Likewise. * modules/gnu.c: Likewise. * modules/load.c: Likewise. * modules/m4.c: Likewise. * modules/m4.h: Likewise. * modules/mpeval.c: Likewise. * modules/perl.c: Likewise. * modules/stdlib.c: Likewise. * modules/time.c: Likewise. * src/freeze.c: Likewise. * src/m4.h: Likewise. * src/main.c: Likewise. * src/stackovf.c: Likewise. * tests/builtins.at: Likewise. * tests/freeze.at: Likewise. * tests/generate.awk: Likewise. * tests/modules.at: Likewise. * tests/others.at: Likewise. * tests/stackovf.test: Likewise. * tests/testsuite.at: Likewise. Signed-off-by: Eric Blake <ebb9@byu.net> (cherry picked from commit 180b7d19bf95d2abb21bca587a0684eca69679ad)
Diffstat (limited to 'tests/stackovf.test')
-rwxr-xr-xtests/stackovf.test48
1 files changed, 24 insertions, 24 deletions
diff --git a/tests/stackovf.test b/tests/stackovf.test
index ba41e7ad..794e194a 100755
--- a/tests/stackovf.test
+++ b/tests/stackovf.test
@@ -26,13 +26,13 @@ exit 77
# On some systems the ulimit command is available in ksh or bash but not sh
(exec 2>/dev/null; ulimit -HSs 300) || {
for altshell in bash bsh ksh ; do
- if (exec >/dev/null 2>&1; $altshell -c 'ulimit -HSs 300') &&
- test -z "$1"
- then
- echo "Using $altshell because it supports ulimit"
- exec $altshell $0 running-with-$altshell
- exit 9
- fi
+ if (exec >/dev/null 2>&1; $altshell -c 'ulimit -HSs 300') &&
+ test -z "$1"
+ then
+ echo "Using $altshell because it supports ulimit"
+ exec $altshell $0 running-with-$altshell
+ exit 9
+ fi
done
}
@@ -48,26 +48,26 @@ perl -e '
# Generate nested define sequence
$max=1000000;
for ($i=0; $i<$max; $i++) {
- print "define(X$i,\n";
+ print "define(X$i,\n";
}
for ($i=$max-1; $i>=0; $i--) {
- print "body with substance no. $i)dnl\n"
+ print "body with substance no. $i)dnl\n"
}
' | \
(
# Limit the stack size if the shell we are running permits it
if (exec 2>/dev/null; ulimit -HSs 50)
then
- (exec >/dev/null 2>&1; ulimit -v) && ulimitdashv=ok
- ulimit -HSs 50
- #ulimit -HSd 8000
- #test -n "$ulimitdashv" && ulimit -HSv 8000
- echo "Stack limit is `ulimit -s`K";
- echo "Heap limit is `ulimit -d`K";
- test -n "$ulimitdashv" &&
- echo "VMem limit is `ulimit -v`K";
+ (exec >/dev/null 2>&1; ulimit -v) && ulimitdashv=ok
+ ulimit -HSs 50
+ #ulimit -HSd 8000
+ #test -n "$ulimitdashv" && ulimit -HSv 8000
+ echo "Stack limit is `ulimit -s`K";
+ echo "Heap limit is `ulimit -d`K";
+ test -n "$ulimitdashv" &&
+ echo "VMem limit is `ulimit -v`K";
else
- echo "Can't reset stack limit - this may take a while..."
+ echo "Can't reset stack limit - this may take a while..."
fi
#strace -o /tmp/aaa $M4 -L999999999 > $tmpfile 2>&1
$M4 -L999999999 > $tmpfile 2>&1
@@ -82,14 +82,14 @@ else
# See if stack overflow was diagnosed
case "`cat $tmpfile`" in
*overflow*)
- echo "Test succeeded.";
- exitcode=0
- ;;
+ echo "Test succeeded.";
+ exitcode=0
+ ;;
*ut*of*emory*|*emory*xhausted)
- echo "*** Test is INCONCLUSIVE (ran out of heap before stack overflow)";
- ;;
+ echo "*** Test is INCONCLUSIVE (ran out of heap before stack overflow)";
+ ;;
*) echo "*** Test FAILED. $M4 aborted unexpectedly. Output:";
- ;;
+ ;;
esac
fi