diff options
author | dgp <dgp@users.sourceforge.net> | 2018-06-13 16:58:38 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2018-06-13 16:58:38 (GMT) |
commit | 919ec44584344d71c8ddad8d14d58adfdec28e8b (patch) | |
tree | 2caeabb7b528a2b71c976c9aaf60c70a69bb5a13 | |
parent | eccaf23657cbf949e58c4ef65a12125ec872d306 (diff) | |
parent | e5de25734f90aa0da97c63f5beeaa017fedb572a (diff) | |
download | tcl-919ec44584344d71c8ddad8d14d58adfdec28e8b.zip tcl-919ec44584344d71c8ddad8d14d58adfdec28e8b.tar.gz tcl-919ec44584344d71c8ddad8d14d58adfdec28e8b.tar.bz2 |
merge 8.7
-rw-r--r-- | tests/async.test | 33 | ||||
-rw-r--r-- | tests/main.test | 2 |
2 files changed, 23 insertions, 12 deletions
diff --git a/tests/async.test b/tests/async.test index fa3aae1..34c2fdc 100644 --- a/tests/async.test +++ b/tests/async.test @@ -156,19 +156,24 @@ test async-4.1 {async interrupting bytecode sequence} -constraints { } } -body { apply {{handle} { - global aresult - set aresult {Async event not delivered} - testasync marklater $handle - # allow plenty of time to pass in case valgrind is running - set start [clock seconds] - while { - [clock seconds] - $start < 180 && $aresult eq "Async event not delivered" - } { - nothing - } + global aresult + set aresult {Async event not delivered} + testasync marklater $handle + # allow plenty of time to pass in case valgrind is running + set start [clock seconds] + while { + [clock seconds] - $start < 180 && $aresult eq "Async event not delivered" + } { + # be less busy + after 100 + nothing + } return $aresult }} $hm } -result {test pattern} -cleanup { + # give other threads some time to go way so that valgrind doesn't pick up + # "still reachable" cases from early thread termination + after 100 testasync delete $hm } test async-4.2 {async interrupting straight bytecode sequence} -constraints { @@ -185,10 +190,15 @@ test async-4.2 {async interrupting straight bytecode sequence} -constraints { while { [clock seconds] - $start < 180 && $aresult eq "Async event not delivered" } { + # be less busy + after 100 } return $aresult }} $hm } -result {test pattern} -cleanup { + # give other threads some time to go way so that valgrind doesn't pick up + # "still reachable" cases from early thread termination + after 100 testasync delete $hm } test async-4.3 {async interrupting loop-less bytecode sequence} -constraints { @@ -205,6 +215,9 @@ test async-4.3 {async interrupting loop-less bytecode sequence} -constraints { return $aresult }]] $hm } -result {test pattern} -cleanup { + # give other threads some time to go way so that valgrind doesn't pick up + # "still reachable" cases from early thread termination + after 100 testasync delete $hm } diff --git a/tests/main.test b/tests/main.test index ab66b38..5b43b43 100644 --- a/tests/main.test +++ b/tests/main.test @@ -1210,8 +1210,6 @@ namespace eval ::tcl::test::main { Bug 1775878 } -constraints { exec Tcltest - } -setup { - catch {set f [open "|[list [interpreter]]" w+]} } -body { exec [interpreter] << "testsetmainloop\nputs \\\npwd\ntestexitmainloop" >& result set f [open result] |