Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 9eedc1a2775a261de160b1a2261de01f61cd2ab6
Ticket: 767676ffffffffffffffffffffffffffffffffff
Patch for failing tests
User & Date: hgiese on 2003-07-08 11:08:32
Changes

  1. assignee changed to: "andreas_kupries"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    Hello out there,
    on Win98 there are 4 failing tests in winpipe.test (not
    Borland specific). They all follow this pattern:
    
    ==== winpipe-4.2 Tcl_WaitPid: return of exception
    codes, SIGFPE FAILED
    ==== Contents of test case:
    
        set f [open "|[tcltest::interpreter]" w+]
        set pid [pid $f]
        puts $f "testexcept float_underflow"
        set status [catch {close $f}]
        list $status [expr {$pid == [lindex $::errorCode
    1]}] [lindex $::errorCode 2]
    
    ---- Result was:
    1 0 SIGFPE
    ---- Result should have been (exact matching):
    1 1 SIGFPE
    
    The reason:
    - On Win9x PIDs are *large* values (like 0xFFFFhhhh)
    - TclCleanupChildren() (in tclpipe.c) uses
    TclFormatInt() to convert the PID to a string,
    resulting in something like -5432.
    - [pid ...] aparently returns an unsigned int (or its
    string equivalent)
    - and the test on equality fails.
    
    The patch proposes to do instead (see the attached diff
    file)
    
    #ifdef __WIN32__
            sprintf(msg1, "%lu", resolvedPid);
    #else
            TclFormatInt(msg1, (long) resolvedPid);
    #endif
    
    (and the equivalent for msg2).
    
    I used a conditional __WIN32__, however it seems to me
    that on *any* platform the PID should be considered
    unsigned, so IMHO there is no need for a conditional.
    Best regards
    Helmut Giese
    
  4. foundin changed to: "None"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "hgiese"
  9. subsystem changed to: "25. Channel System"
  10. title changed to: "Patch for failing tests"
  11. type changed to: "Patch"