Overview
| Artifact ID: | 9eedc1a2775a261de160b1a2261de01f61cd2ab6 |
|---|---|
| Ticket: | 767676ffffffffffffffffffffffffffffffffff
Patch for failing tests |
| User & Date: | hgiese on 2003-07-08 11:08:32 |
Changes
- assignee changed to: "andreas_kupries"
- cmimetype changed to: "text/plain"
- 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 - foundin changed to: "None"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "hgiese"
- subsystem changed to: "25. Channel System"
- title changed to: "Patch for failing tests"
- type changed to: "Patch"