From 2e33dd76188bc1e11ba0800b42b69acc9de6521d Mon Sep 17 00:00:00 2001 From: sebres Date: Fri, 13 Sep 2024 13:29:00 +0000 Subject: 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) --- tests/compile.test | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 -- cgit v0.12