summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsebres <sebres@users.sourceforge.net>2024-09-13 13:29:00 (GMT)
committersebres <sebres@users.sourceforge.net>2024-09-13 13:29:00 (GMT)
commit2e33dd76188bc1e11ba0800b42b69acc9de6521d (patch)
tree35e19ad79a529892dc639e60f60ef64faa00531e
parentd0d47aa17e027a9bd1ccceec3ca1ecfea84c7658 (diff)
downloadtcl-2e33dd76188bc1e11ba0800b42b69acc9de6521d.zip
tcl-2e33dd76188bc1e11ba0800b42b69acc9de6521d.tar.gz
tcl-2e33dd76188bc1e11ba0800b42b69acc9de6521d.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)
-rw-r--r--tests/compile.test10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/compile.test b/tests/compile.test
index ac95c25..c2783fc 100644
--- a/tests/compile.test
+++ b/tests/compile.test
@@ -491,13 +491,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::pkgconfig get debug] ? 1500 : 1000}] $cmd]
if 1 $c