mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-19 09:13:04 +00:00
* tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
command-line prefix. * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't miss Valgrind messages. (Exploding the Stack Size with Malloc): Likewise.
This commit is contained in:
@@ -1,3 +1,12 @@
|
|||||||
|
2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
|
||||||
|
|
||||||
|
* tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
|
||||||
|
command-line prefix.
|
||||||
|
* tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
|
||||||
|
ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
|
||||||
|
miss Valgrind messages.
|
||||||
|
(Exploding the Stack Size with Malloc): Likewise.
|
||||||
|
|
||||||
2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
|
2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
|
||||||
|
|
||||||
Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
|
Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
|
||||||
|
|||||||
@@ -198,11 +198,11 @@ AT_CHECK([$CXX $CXXFLAGS $CPPFLAGS m4_bmatch([$1], [[.]], [], [$LDFLAGS ])-o $1
|
|||||||
## Running a generated parser. ##
|
## Running a generated parser. ##
|
||||||
## ---------------------------- ##
|
## ---------------------------- ##
|
||||||
|
|
||||||
# AT_PARSER_CHECK(COMMAND, EXIT-STATUS, EXPOUT, EXPERR)
|
# AT_PARSER_CHECK(COMMAND, EXIT-STATUS, EXPOUT, EXPERR, [PRE])
|
||||||
# -----------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
# So that we can run `./testsuite PREPARSER='valgrind -q' for instance.
|
# So that we can run `./testsuite PREPARSER='valgrind -q' for instance.
|
||||||
m4_define([AT_PARSER_CHECK],
|
m4_define([AT_PARSER_CHECK],
|
||||||
[AT_CHECK([$PREPARSER $1], [$2], [$3], [$4])])
|
[AT_CHECK([$5 $PREPARSER $1], [$2], [$3], [$4])])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -483,12 +483,15 @@ m4_pushdef([AT_USE_ALLOCA], [[
|
|||||||
AT_DATA_STACK_TORTURE([AT_USE_ALLOCA])
|
AT_DATA_STACK_TORTURE([AT_USE_ALLOCA])
|
||||||
|
|
||||||
# Below the limit of 200.
|
# Below the limit of 200.
|
||||||
AT_PARSER_CHECK([./input 20], 0, [], [ignore])
|
AT_PARSER_CHECK([./input 20], 0, [], [ignore],
|
||||||
|
[[VALGRIND_OPTS="$VALGRIND_OPTS --log-fd=1"]])
|
||||||
# Two enlargements: 2 * 2 * 200.
|
# Two enlargements: 2 * 2 * 200.
|
||||||
AT_PARSER_CHECK([./input 900], 0, [], [ignore])
|
AT_PARSER_CHECK([./input 900], 0, [], [ignore],
|
||||||
|
[[VALGRIND_OPTS="$VALGRIND_OPTS --log-fd=1"]])
|
||||||
# Fails: beyond the limit of 10,000 (which we don't reach anyway since we
|
# Fails: beyond the limit of 10,000 (which we don't reach anyway since we
|
||||||
# multiply by two starting at 200 => 5120 is the last possible).
|
# multiply by two starting at 200 => 5120 is the last possible).
|
||||||
AT_PARSER_CHECK([./input 10000], 2, [], [ignore])
|
AT_PARSER_CHECK([./input 10000], 2, [], [ignore],
|
||||||
|
[[VALGRIND_OPTS="$VALGRIND_OPTS --log-fd=1"]])
|
||||||
|
|
||||||
# The push parser can't use alloca since the stacks can't be locals. This test
|
# The push parser can't use alloca since the stacks can't be locals. This test
|
||||||
# just helps guarantee we don't let the YYSTACK_USE_ALLOCA feature affect
|
# just helps guarantee we don't let the YYSTACK_USE_ALLOCA feature affect
|
||||||
@@ -496,9 +499,12 @@ AT_PARSER_CHECK([./input 10000], 2, [], [ignore])
|
|||||||
AT_DATA_STACK_TORTURE([AT_USE_ALLOCA],
|
AT_DATA_STACK_TORTURE([AT_USE_ALLOCA],
|
||||||
[[%push-pull-parser
|
[[%push-pull-parser
|
||||||
]])
|
]])
|
||||||
AT_PARSER_CHECK([./input 20], 0, [], [ignore])
|
AT_PARSER_CHECK([./input 20], 0, [], [ignore],
|
||||||
AT_PARSER_CHECK([./input 900], 0, [], [ignore])
|
[[VALGRIND_OPTS="$VALGRIND_OPTS --log-fd=1"]])
|
||||||
AT_PARSER_CHECK([./input 10000], 2, [], [ignore])
|
AT_PARSER_CHECK([./input 900], 0, [], [ignore],
|
||||||
|
[[VALGRIND_OPTS="$VALGRIND_OPTS --log-fd=1"]])
|
||||||
|
AT_PARSER_CHECK([./input 10000], 2, [], [ignore],
|
||||||
|
[[VALGRIND_OPTS="$VALGRIND_OPTS --log-fd=1"]])
|
||||||
|
|
||||||
m4_popdef([AT_USE_ALLOCA])
|
m4_popdef([AT_USE_ALLOCA])
|
||||||
|
|
||||||
@@ -518,19 +524,25 @@ m4_pushdef([AT_USE_ALLOCA], [[#define YYSTACK_USE_ALLOCA 0]])
|
|||||||
AT_DATA_STACK_TORTURE([AT_USE_ALLOCA])
|
AT_DATA_STACK_TORTURE([AT_USE_ALLOCA])
|
||||||
|
|
||||||
# Below the limit of 200.
|
# Below the limit of 200.
|
||||||
AT_PARSER_CHECK([./input 20], 0, [], [ignore])
|
AT_PARSER_CHECK([./input 20], 0, [], [ignore],
|
||||||
|
[[VALGRIND_OPTS="$VALGRIND_OPTS --log-fd=1"]])
|
||||||
# Two enlargements: 2 * 2 * 200.
|
# Two enlargements: 2 * 2 * 200.
|
||||||
AT_PARSER_CHECK([./input 900], 0, [], [ignore])
|
AT_PARSER_CHECK([./input 900], 0, [], [ignore],
|
||||||
|
[[VALGRIND_OPTS="$VALGRIND_OPTS --log-fd=1"]])
|
||||||
# Fails: beyond the limit of 10,000 (which we don't reach anyway since we
|
# Fails: beyond the limit of 10,000 (which we don't reach anyway since we
|
||||||
# multiply by two starting at 200 => 5120 is the possible).
|
# multiply by two starting at 200 => 5120 is the possible).
|
||||||
AT_PARSER_CHECK([./input 10000], 2, [], [ignore])
|
AT_PARSER_CHECK([./input 10000], 2, [], [ignore],
|
||||||
|
[[VALGRIND_OPTS="$VALGRIND_OPTS --log-fd=1"]])
|
||||||
|
|
||||||
AT_DATA_STACK_TORTURE([AT_USE_ALLOCA],
|
AT_DATA_STACK_TORTURE([AT_USE_ALLOCA],
|
||||||
[[%push-pull-parser
|
[[%push-pull-parser
|
||||||
]])
|
]])
|
||||||
AT_PARSER_CHECK([./input 20], 0, [], [ignore])
|
AT_PARSER_CHECK([./input 20], 0, [], [ignore],
|
||||||
AT_PARSER_CHECK([./input 900], 0, [], [ignore])
|
[[VALGRIND_OPTS="$VALGRIND_OPTS --log-fd=1"]])
|
||||||
AT_PARSER_CHECK([./input 10000], 2, [], [ignore])
|
AT_PARSER_CHECK([./input 900], 0, [], [ignore],
|
||||||
|
[[VALGRIND_OPTS="$VALGRIND_OPTS --log-fd=1"]])
|
||||||
|
AT_PARSER_CHECK([./input 10000], 2, [], [ignore],
|
||||||
|
[[VALGRIND_OPTS="$VALGRIND_OPTS --log-fd=1"]])
|
||||||
|
|
||||||
m4_popdef([AT_USE_ALLOCA])
|
m4_popdef([AT_USE_ALLOCA])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user