Skip to content
Tcl Source Code View Ticket
Login

View Ticket

unixInit-1.2 failure

Closed / Fixed438070ffffffffffffffffffffffffffffffffffCreated 25 years agoUpdated 25 years ago
Descriptionplain2001-07-02 23:15:43
On RedHat Linux 6.2, on Alpha XL-300.

Since the 2001-06-28 commits to
tests/unixInit.test:

==== unixInit-1.2 initialisation: channel type
deduction FAILED
==== Contents of test case:

    set pipe1 [open |[list $::tcltest::tcltest] r+]
    puts $pipe1 {
        proc accept {channel host port} {
            puts $channel {
                puts [fconfigure stdin -peername]
                flush stdout
                exit
            }
            flush $channel
            close $channel
            exit
        }
        set server [socket -server accept 0]
        puts stdout [fconfigure $server -sockname]
        flush stdout
        update
        vwait forever  }
    flush $pipe1
    set port [lindex [gets $pipe1] 2]
    set sock [socket localhost $port]
    set pipe2 [open |[list $::tcltest::tcltest <@$sock]
r]
    set result [gets $pipe2]
    close $pipe2
    close $pipe1
    catch {close $sock}
    set expected [list 127.0.0.1 localhost $port]
    if {[string equal $expected $result]} {
        subst "OK"
    } else {
        subst "Expected: $expected, Got $result"
    }

---- Result was:
error flushing "stdout": broken pipe
---- Result should have been (exact matching):
OK
---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
==== unixInit-1.2 FAILED

The error comes from the [close $pipe2] command.

After I comment out the [flush stdout] that seems to
be the cause of the trouble:

==== unixInit-1.2 initialisation: channel type
deduction FAILED
==== Contents of test case:
...
---- Result was:
Expected: 127.0.0.1 localhost 2949, Got 127.0.0.1
localhost.localdomain 2949
---- Result should have been (exact matching):
OK
==== unixInit-1.2 FAILED
dkfplain2001-07-03 17:51:03
Logged In: YES 
user_id=79902

I believe I've fixed this; let me know/reopen this bug if
not.
Log in (anonymous is fine) to add a comment.