summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2024-05-28 11:32:39 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2024-05-28 11:32:39 (GMT)
commit277825e13ed2db3cf16a3de3314dce35cae77e60 (patch)
treec66badfa540b6c0e4865b846a0ffb2489ad1a0bf
parenteefb507809e7f807b16728448c81c57c95057b20 (diff)
downloadtcl-277825e13ed2db3cf16a3de3314dce35cae77e60.zip
tcl-277825e13ed2db3cf16a3de3314dce35cae77e60.tar.gz
tcl-277825e13ed2db3cf16a3de3314dce35cae77e60.tar.bz2
Fix tests - need longer timer under valgrind. Close created channels.
-rw-r--r--tests/io.test14
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/io.test b/tests/io.test
index a41e56b..ad8d6b7 100644
--- a/tests/io.test
+++ b/tests/io.test
@@ -6331,7 +6331,8 @@ test io-44.6 {FileEventProc procedure: write-only non-blocking channel} -setup {
set x done
}
}]
- set token [after 10000 [namespace code {
+ # Note: timeout needs to be very long under valgrind
+ set token [after 240000 [namespace code {
set x timeout
}]]
vwait [namespace which -variable x]
@@ -6357,12 +6358,12 @@ test io-44.7 {refchan + coroutine yield error } -setup {
proc initialize {chan mode} {
return [list initialize finalize read watch]
}
-
- proc read {chan count} {
- }
-
+ proc finalize args {}
+ proc read {chan count} {}
proc watch {chan eventspec} {
- after idle after 0 chan postevent $chan $eventspec
+ foreach event $eventspec {
+ after idle after 0 chan postevent $chan $event
+ }
}
}
} -cleanup {
@@ -6377,6 +6378,7 @@ test io-44.7 {refchan + coroutine yield error } -setup {
set chan [schan::open]
chan event $chan readable [list [info coroutine]]
yield
+ close $chan
set ::io-44.7-result success
} [namespace current]]
vwait ::io-44.7-result