Tk Library Source Code

View Ticket
Login
Ticket UUID: 1272913
Title: profiler - failed test with Tcl 8.5
Type: Bug Version: None
Submitter: dgp Created on: 2005-08-25 17:31:52
Subsystem: profiler Assigned To: andreas_kupries
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2006-09-27 23:40:34
Resolution: Fixed Closed By: andreas_kupries
    Closed on: 2006-09-27 16:40:34
Description:
==== profiler-7.2 sortFunctions FAILED
==== Contents of test case:

    set c [interp create]
    interp alias $c parentSet {} set
    set result [$c eval {
        set auto_path [parentSet auto_path]
        package require profiler
        profiler::init
        proc ::foo {} {
            set foobar 0
        }
        proc ::bar {} {
            set foobar 1
        }
        foo; foo; bar;
        profiler::sortFunctions calls
    }]
    interp delete $c
    set result

---- Result was:
{::tcl::clock::scan 0} {::tcl::clock::format 0}
{::tcl::clock::add 0} {::bar 1} {::foo 2}
---- Result should have been (exact matching):
{::bar 1} {::foo 2}
==== profiler-7.2 FAILED
User Comments: andreas_kupries added on 2006-09-27 23:40:34:
Logged In: YES 
user_id=75003

Duplicated the test. Original constrained to 8.4-, new
variant for 8.5+ with changed result. Committed.

dgp added on 2006-09-27 22:40:08:
Logged In: YES 
user_id=80530


still fails in profiler 0.3
(tcllib-1.9-rc1)

dgp added on 2005-08-26 00:40:15:
Logged In: YES 
user_id=80530


simplest thing would be a more
forgiving match like -match glob
or -match regexp.

andreas_kupries added on 2005-08-26 00:35:52:
Logged In: YES 
user_id=75003

Oh, oh, the profiler is using clock internally, and in 8.5
they are procedures and thus show up in the trace. Hm. I am
not sure if we can exclude them, as they may _also_ come in
due to the profiled code.

So maybe just using a version dependent test result to fix
this ?