diff options
author | sebres <sebres@users.sourceforge.net> | 2024-05-28 13:08:11 (GMT) |
---|---|---|
committer | sebres <sebres@users.sourceforge.net> | 2024-05-28 13:08:11 (GMT) |
commit | bdba6200f51fe00a499cd9f4962faa16771792ec (patch) | |
tree | f77d9748a49066df58833cb540fe8961bdbe7ba1 | |
parent | 52ba0383a1573a0ee79922da0c02925fc257c083 (diff) | |
download | tcl-bdba6200f51fe00a499cd9f4962faa16771792ec.zip tcl-bdba6200f51fe00a499cd9f4962faa16771792ec.tar.gz tcl-bdba6200f51fe00a499cd9f4962faa16771792ec.tar.bz2 |
partial merge 8.7 (cherrypick of tests changes only)
-rw-r--r-- | tests/cmdMZ.test | 15 | ||||
-rw-r--r-- | tests/ioTrans.test | 2 |
2 files changed, 11 insertions, 6 deletions
diff --git a/tests/cmdMZ.test b/tests/cmdMZ.test index da7ce5c..9af30bd 100644 --- a/tests/cmdMZ.test +++ b/tests/cmdMZ.test @@ -320,11 +320,15 @@ test cmdMZ-4.13 {Tcl_SplitObjCmd: basic split commands} { # todo: rewrite this if monotonic clock is provided resp. command "after" # gets microsecond accuracy (RFE [fdfbd5e10] gets merged): proc _nrt_sleep {msec} { - set usec [expr {$msec * 1000}] set stime [clock microseconds] - while {abs([clock microseconds] - $stime) < $usec} { - # don't use after 0 unless it's NRT-capable, so yes - busy-wait (but it's more precise): - # after 0 + set usec [expr {$msec * 1000}] + set etime [expr {$stime + $usec}] + while {[set tm [clock microseconds]] < $etime} { + # don't use after 0 unless it's NRT-capable, so yes - busy-wait (but it's more precise): + # after 0 + if {$tm < $stime} { # avoid too long delays by backwards time jumps, simply skip test + tcltest::Skip "time-jump?" + } } } _nrt_sleep 0; # warm up (clock, compile, etc) @@ -404,6 +408,9 @@ test cmdMZ-6.5b {Tcl_TimeRateObjCmd: result format without iterations} { test cmdMZ-6.6 {Tcl_TimeRateObjCmd: slower commands take longer, but it remains almost the same time of measurement} -body { set m1 [timerate {_nrt_sleep 0.01} 50] set m2 [timerate {_nrt_sleep 1.00} 50] + if {[testConstraint valgrind] && ([lindex $m1 0] >= 100 || [lindex $m1 2] <= 500)} { + tcltest::Skip "too-slow-by-valgrind" + } list [list \ [expr {[lindex $m1 0] < [lindex $m2 0]}] \ [expr {[lindex $m1 0] < 100}] \ diff --git a/tests/ioTrans.test b/tests/ioTrans.test index 45d2530..265520a 100644 --- a/tests/ioTrans.test +++ b/tests/ioTrans.test @@ -2096,8 +2096,6 @@ test iortrans.tf-11.0 {origin thread of moved transform gone} -setup { thread::release $tidb } -result {1 {Owner lost} 0 0 1 {Owner lost} 1 {Owner lost} 1 {Owner lost}} -testConstraint notValgrind [expr {![testConstraint valgrind]}] - test iortrans.tf-11.1 {origin thread of moved transform destroyed during access} -setup { #puts <<$tcltest::mainThread>>main set tida [thread::create -preserved]; #puts <<$tida>> |