Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2019-04-09
10:35 • Closed ticket [1e5e25cf2b]: valgrind foils timerate expectations plus 7 ot... artifact: 88b5172e72 user: sebres
10:31
closes [1e5e25cf2b] - tests/cmdMZ.test: fixed NRT-related sleeps (and time-related corner cases and ... check-in: 84e29e7149 user: sebres tags: core-8-5-branch
2019-04-08
17:14 • New ticket [1e5e25cf2b] valgrind foils timerate expectations. artifact: a26b76f876 user: dgp

valgrind foils [timerate] expectations

Closed / Fixed1e5e25cf2b86a91a1bcb6012a67509ff4097cb7aCreated 8 years agoUpdated 8 years ago
Descriptionplain2019-04-08 17:14:53
cmdMZ.test
M1:65.6328 µs/# 305 # 15236.3 #/sec 20.018 nett-ms
M2:1273.69 µs/# 16 # 785.12 #/sec 20.379 nett-ms


==== cmdMZ-6.6 Tcl_TimeRateObjCmd: slower commands take longer, but it remains almost the same time of measument FAILED
==== Contents of test case:

    set m1 [timerate {after 0} 20]
    set m2 [timerate {after 1} 20]
puts M1:$m1
puts M2:$m2
    list  [expr {[lindex $m1 0] < [lindex $m2 0]}]  [expr {[lindex $m1 0] < 100}]  [expr {[lindex $m2 0] >= 500}]  [expr {[lindex $m1 2] > 1000}]  [expr {[lindex $m2 2] <= 50}]  [expr {[lindex $m1 4] > 10000}]  [expr {[lindex $m2 4] < 10000}]  [expr {[lindex $m1 6] > 10 && [lindex $m1 6] < 50}]  [expr {[lindex $m2 6] > 10 && [lindex $m2 6] < 50}]

---- Result was:
1 1 1 0 1 1 1 1 1
---- Result should have been (exact matching):
1 1 1 1 1 1 1 1 1
==== cmdMZ-6.6 FAILED
Referenced by1
  • 84e29e7149closes [1e5e25cf2b] - tests/cmdMZ.test: fixed NRT-related sleeps (and time-related corner cases and test expectations); todo: rewrite several tests if monotonic clock is provided resp. command "after" gets microsecond accuracy (RFE [fdfbd5e10] gets merged) check-in2019-04-09 10:31:36
sebresplain2019-04-09 10:35:47
I doubt valgrind alone is to blame for this disruption. Rather it is simply a timing issue, because "after" (resp. timer/sleep mechanism) is not yet NRT-capable, despite I'd reserved the ample buffer in ranges of this test.

Anyway should be fixed now in [84e29e7149] (for >= 8.5).
Log in (anonymous is fine) to add a comment.