Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 147af4df666a9c40322dbea42054eeaadb8c16ee
Ticket: 1473164fffffffffffffffffffffffffffffffff
8.4.13 tcl test suite: 127.0.0.0 vs 0.0.0.0
User & Date: nobody on 2006-04-19 18:30:00
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    platform: sparc sun c compiler, solaris 2.8
    Tcl 8.4.13 - release version, not really development 
    
    I've been away for a couple of weeks. However, these
    failures are, I believe relatively new - I don't recall
    seeing them when testing 8.4.12 .
    
    These errors all seem related ; tests expecting to get
    the IP of 127.* are getting 0.* instead.
    
    socket.test
    
    ==== socket-2.3 tcp connection with client interface
    specified FAILED
    ==== Contents of test case:
    
        file delete $path(script)
        set f [open $path(script) w]
        puts $f {
            set timer [after 2000 "set x done"]
            set f [socket  -server accept 2830]
            proc accept {file addr port} {
                global x
                puts "[gets $file] $addr"
                close $file
                set x done
            }
            puts ready
            vwait x
            after cancel $timer
            close $f
        }
        close $f
        set f [open "|[list [interpreter] $path(script)]" r]
        gets $f x
        if {[catch {socket -myaddr 127.0.0.1 127.0.0.1
    2830} sock]} {
            set x $sock
        } else {
            puts $sock hello
            flush $sock
    
            lappend x [gets $f]
            close $sock
        }
        close $f
        set x
    
    ---- Result was:
    ready {hello 0.0.0.0}
    ---- Result should have been (exact matching):
    ready {hello 127.0.0.1}
    ==== socket-2.3 FAILED
    
    
    ==== socket-7.1 testing socket specific options FAILED
    ==== Contents of test case:
    
        file delete $path(script)
        set f [open $path(script) w]
        puts $f {
            set ss [socket -server accept 0]
            proc accept args {
                global x
                set x done
            }
            puts ready
            puts [lindex [fconfigure $ss -sockname] 2]
            set timer [after 10000 "set x timed_out"]
            vwait x
            after cancel $timer
        }
        close $f
        set f [open "|[list [interpreter] $path(script)]" r]
        gets $f
        gets $f listen
        set s [socket 127.0.0.1 $listen]
        set p [fconfigure $s -peername]
        close $s
        close $f
        set l ""
        lappend l [string compare [lindex $p 0] 127.0.0.1]
        lappend l [string compare [lindex $p 2] $listen]
        lappend l [llength $p]
    
    ---- Result was:
    -1 0 3
    ---- Result should have been (exact matching):
    0 0 3
    ==== socket-7.1 FAILED
    ==== socket-7.5 testing socket specific options FAILED
    ==== Contents of test case:
    
        set s [socket -server accept 0]
        proc accept {s a p} {
            global x
            set x [fconfigure $s -sockname]
            close $s
        }
        set listen [lindex [fconfigure $s -sockname] 2]
        set s1 [socket 127.0.0.1 $listen]
        set timer [after 10000 "set x timed_out"]
        vwait x
        after cancel $timer
        close $s
        close $s1
        set l ""
        lappend l [lindex $x 0] [expr {[lindex $x 2] ==
    $listen}] [llength $x]
    
    ---- Result was:
    0.0.0.0 1 3
    ---- Result should have been (exact matching):
    127.0.0.1 1 3
    ==== socket-7.5 FAILED
    
    unixInit.test
    
    ==== unixInit-1.2 initialisation: standard channel type
    deduction FAILED
    ==== Contents of test case:
    
        # pipe1 is a connection to a server that reports
    what port it
        # starts on, and delivers a constant string to the
    first client to
        # connect to that port before exiting.
        set pipe1 [open "|[list [interpreter]]" r+]
        puts $pipe1 {
            proc accept {channel host port} {
                puts $channel {puts [fconfigure stdin
    -peername]; exit}
                close $channel
                exit
            }
            puts [fconfigure [socket -server accept 0]
    -sockname]
            vwait forever  }
        # Note the backslash above; this is important to
    make sure that the
        # whole string is read before an [exit] can happen...
        flush $pipe1
        set port [lindex [gets $pipe1] 2]
        set sock [socket localhost $port]
        # pipe2 is a connection to a Tcl interpreter that
    takes its orders
        # from the socket we hand it (i.e. the server we
    create above.)
        # These orders will tell it to print out the
    details about the
        # socket it is taking instructions from, hopefully
    identifying it
        # as a socket.  Which is what this test is all about.
        set pipe2 [open "|[list [interpreter] <@$sock]" r]
        set result [gets $pipe2]
    
        # Clear any pending data; stops certain kinds of
    (non-important) errors
        fconfigure $pipe1 -blocking 0; gets $pipe1
        fconfigure $pipe2 -blocking 0; gets $pipe2
    
        # Close the pipes and the socket.
        close $pipe2
        close $pipe1
        catch {close $sock}
    
        # Can't use normal comparison, as hostname varies
    due to some
        # installations having a messed up /etc/hosts file.
        if {
            [string equal 127.0.0.1 [lindex $result 0]] &&
            [string equal $port     [lindex $result 2]]
        } then {
            subst "OK"
        } else {
            subst "Expected: `[list 127.0.0.1 localhost
    $port]', Got `$result'"
        }
    ---- Result was:
    Expected: `127.0.0.1 localhost 54016', Got `0.0.0.0
    localhost 54016'
    ---- Result should have been (exact matching):
    OK
    ==== unixInit-1.2 FAILED
    
    
    
    
  4. foundin changed to: "obsolete: 8.4.13"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "None"
  10. title changed to: "8.4.13 tcl test suite: 127.0.0.0 vs 0.0.0.0"
  11. type changed to: "Bug"