summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@arm.com>2021-07-12 14:50:13 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-07-13 14:27:53 +0100
commitb59f420deaf15fe20a2bc7ee4edef698f5592f44 (patch)
tree5bb08a1cd7478d8c5330f96ed7a95927d2529c50
parent3a4da0d8f72d77701c6f522b1d4afc85caa13f63 (diff)
downloadpoky-b59f420deaf15fe20a2bc7ee4edef698f5592f44.tar.gz
tcl: fix race in interp.test
There's a timeout race in interp which is exposed when running under load. (From OE-Core rev: bcd792270676beeac73f3900346184dec24d00a1) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/tcltk/tcl/interp.patch32
-rw-r--r--meta/recipes-devtools/tcltk/tcl_8.6.11.bb1
2 files changed, 33 insertions, 0 deletions
diff --git a/meta/recipes-devtools/tcltk/tcl/interp.patch b/meta/recipes-devtools/tcltk/tcl/interp.patch
new file mode 100644
index 0000000000..95d6318f64
--- /dev/null
+++ b/meta/recipes-devtools/tcltk/tcl/interp.patch
@@ -0,0 +1,32 @@
1The 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
diff --git a/meta/recipes-devtools/tcltk/tcl_8.6.11.bb b/meta/recipes-devtools/tcltk/tcl_8.6.11.bb
index 0d7c2e4ac3..57a86e4c64 100644
--- a/meta/recipes-devtools/tcltk/tcl_8.6.11.bb
+++ b/meta/recipes-devtools/tcltk/tcl_8.6.11.bb
@@ -22,6 +22,7 @@ SRC_URI = "${BASE_SRC_URI} \
22 file://fix_issue_with_old_distro_glibc.patch \ 22 file://fix_issue_with_old_distro_glibc.patch \
23 file://tcl-remove-hardcoded-install-path.patch \ 23 file://tcl-remove-hardcoded-install-path.patch \
24 file://alter-includedir.patch \ 24 file://alter-includedir.patch \
25 file://interp.patch \
25 file://run-ptest \ 26 file://run-ptest \
26" 27"
27SRC_URI[sha256sum] = "cfb49aab82bd179651e23eeeb69606f51b0ddc575ca55c3d35e2457469024cfa" 28SRC_URI[sha256sum] = "cfb49aab82bd179651e23eeeb69606f51b0ddc575ca55c3d35e2457469024cfa"