blob: 95d6318f644bd0c9c917104e053d82c82e5c4b3f [file] [log] [blame]
Andrew Geissler5f350902021-07-23 13:09:54 -04001The interp-36.7 patch has race conditions and is missing cleanup. This patch by
2a Tcl maintainer should improve matters.
3
4Upstream-Status: Pending
5Signed-off-by: Ross Burton <ross.burton@arm.com>
6
7diff --git a/tests/interp.test b/tests/interp.test
8index d7424847f..fc90990f3 100644
9--- a/tests/interp.test
10+++ b/tests/interp.test
11@@ -3595,17 +3595,18 @@ test interp-36.7 {ChildBgerror sets error handler of child [1999035]} -setup {
12 variable result
13 set result [lindex $args 0]
14 }
15+ set tout [after 5000 {set result timeout}]
16 } -body {
17 child eval {
18 variable done {}
19 after 0 error foo
20- after 10 [list ::set [namespace which -variable done] {}]
21- vwait [namespace which -variable done]
22 }
23+ vwait result
24 set result
25 } -cleanup {
26+ after cancel $tout
27 variable result {}
28- unset -nocomplain result
29+ unset -nocomplain result tout
30 interp delete child
31 } -result foo
32