diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-09-14 21:14:57 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-09-14 21:14:57 (GMT) |
commit | ccd91024213075307a8b1285eb9dfd374b14f09d (patch) | |
tree | 5f06075da5688fb9b56527a26bd25efd0464a2df /tests | |
parent | 26170566462bcc460ecf59c175aa263e886cc61e (diff) | |
parent | 2e33dd76188bc1e11ba0800b42b69acc9de6521d (diff) | |
download | tcl-ccd91024213075307a8b1285eb9dfd374b14f09d.zip tcl-ccd91024213075307a8b1285eb9dfd374b14f09d.tar.gz tcl-ccd91024213075307a8b1285eb9dfd374b14f09d.tar.bz2 |
compile-13.2: added dynamic constraint for unix boxes (avoid SO for small stack limit) - ensure the stack is large enough for this test (larger than 2048)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/compile.test | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/compile.test b/tests/compile.test index 36b4f3a..34a7ab4 100644 --- a/tests/compile.test +++ b/tests/compile.test @@ -492,13 +492,21 @@ proc _ti_gencode {} { }} } test compile-13.2 {TclCompileScript: testing expected nested scripts compilation} -setup { + # dynamic constraint - ensure the stack is large enough on this box for this test: + if { + [testConstraint unix] && + ![catch { exec sh -c {ulimit -s} } stsz] && + $stsz ne "unlimited" && $stsz <= 2048 + } { + tcltest::Skip "too small stack limit ($stsz <= 2048)" + } _ti_gencode interp recursionlimit ti [expr {10000+50}] ti eval {set result {}} } -body { # Test different compilation variants (instructions evalStk, invokeStk, etc), # with 1500 (1000 in debug) nested scripts (bodies). If you get SO/SF exceptions on some low-stack - # boxes or systems, please don't decrease it (either provide a constraint) + # boxes or systems, please don't decrease it (either provide new or extend a constraint above) ti eval {foreach cmd {eval "if 1" try catch} { set c [gencode [expr {[tcl::build-info debug] ? 1500 : 1000}] $cmd] if 1 $c |