Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: dfe70dffd0326bdde9df480653a05a4f563e3023
Ticket: 13d3af3ad5b8e8eb20d673962d442dd64a40af40
IPV6 only used for IPV4/IPV6 sockets on windows
User & Date: oehhar on 2014-08-12 14:43:58
Changes

  1. icomment:
    The robustness issue was cured in branch [robust-async-connect-tests].
    
    The remaining test failures are:
    
    <h3>FreeBSD</h3>
    On tcl-core: date: Fri, 18 Jul 2014 12:18:38 +0200, from: Pietro Cerutti
    <verbatim>
    ==== socket-14.2 [socket -async] fileevent connection refused FAILED
    ==== Contents of test case:
    
            set client [socket -async localhost [randport]]
            fileevent $client writable {set x ok}
            set after [after $latency {set x timeout}]
            vwait x
            after cancel $after
            lappend x [fconfigure $client -error]
        
    ---- Test generated error; Return code was: 1
    ---- Return code should have been one of: 0 2
    ---- errorInfo: couldn't open socket: connection refused
        while executing
    "socket -async localhost [randport]"
        ("uplevel" body line 2)
        invoked from within
    "uplevel 1 $script"
    ---- errorCode: POSIX ECONNREFUSED {connection refused}
    ---- Test cleanup failed:
    can not find channel named "sock801aaed90"
    ---- errorInfo(cleanup): can not find channel named "sock801aaed90"
        while executing
    "close $client"
        ("uplevel" body line 3)
        invoked from within
    "uplevel 1 $cleanup"
    ---- errorCode(cleanup): TCL LOOKUP CHANNEL sock801aaed90
    ==== socket-14.2 FAILED
    
    
    
    ==== socket-14.7.0 pending [socket -async] and blocking [gets], server is IPv4 FAILED
    ==== Contents of test case:
    
            set sock [socket -async localhost $port]
            list [fconfigure $sock -error] [gets $sock] [fconfigure $sock -error]
        
    ---- Result was:
    {} {} {}
    ---- Result should have been (exact matching):
    {} ok {}
    ==== socket-14.7.0 FAILED
    
    
    
    ==== socket-14.7.2 pending [socket -async] and blocking [gets], no listener FAILED
    ==== Contents of test case:
    
            set sock [socket -async localhost [randport]]
            catch {gets $sock} x
            list $x [fconfigure $sock -error] [fconfigure $sock -error]
        
    ---- Test generated error; Return code was: 1
    ---- Return code should have been one of: 0 2
    ---- errorInfo: couldn't open socket: connection refused
        while executing
    "socket -async localhost [randport]"
        ("uplevel" body line 2)
        invoked from within
    "uplevel 1 $script"
    ---- errorCode: POSIX ECONNREFUSED {connection refused}
    ---- Test cleanup failed:
    can not find channel named "sock801c56210"
    ---- errorInfo(cleanup): can not find channel named "sock801c56210"
        while executing
    "close $sock"
        ("uplevel" body line 2)
        invoked from within
    "uplevel 1 $cleanup"
    ---- errorCode(cleanup): TCL LOOKUP CHANNEL sock801c56210
    ==== socket-14.7.2 FAILED
    
    
    
    ==== socket-14.8.2 pending [socket -async] and nonblocking [gets], no listener FAILED
    ==== Contents of test case:
    
            set sock [socket -async localhost [randport]]
            fconfigure $sock -blocking 0
            for {set i 0} {$i < 50} {incr i } {
                if {[catch {gets $sock} x] || $x ne "" || ![fblocked $sock]} break
                after 200
            }
            list $x [fconfigure $sock -error] [fconfigure $sock -error]
        
    ---- Test generated error; Return code was: 1
    ---- Return code should have been one of: 0 2
    ---- errorInfo: couldn't open socket: connection refused
        while executing
    "socket -async localhost [randport]"
        ("uplevel" body line 2)
        invoked from within
    "uplevel 1 $script"
    ---- errorCode: POSIX ECONNREFUSED {connection refused}
    ---- Test cleanup failed:
    can not find channel named "sock801965f10"
    ---- errorInfo(cleanup): can not find channel named "sock801965f10"
        while executing
    "close $sock"
        ("uplevel" body line 2)
        invoked from within
    "uplevel 1 $cleanup"
    ---- errorCode(cleanup): TCL LOOKUP CHANNEL sock801965f10
    ==== socket-14.8.2 FAILED
    
    
    
    ==== socket-14.11.0 pending [socket -async] and nonblocking [puts], no listener, no flush FAILED
    ==== Contents of test case:
    
            set sock [socket -async localhost [randport]]
            fconfigure $sock -blocking 0
            puts $sock ok
            fileevent $sock writable {set x 1}
            vwait x
            close $sock
        
    ---- Result was:
    couldn't open socket: connection refused
    ---- Result should have been (exact matching):
    socket is not connected
    ==== socket-14.11.0 FAILED
    
    
    
    ==== socket-14.11.1 pending [socket -async] and nonblocking [puts], no listener, flush FAILED
    ==== Contents of test case:
    
            set sock [socket -async localhost [randport]]
            fconfigure $sock -blocking 0
            puts $sock ok
            flush $sock
            fileevent $sock writable {set x 1}
            vwait x
            close $sock
        
    ---- Result was:
    couldn't open socket: connection refused
    ---- Result should have been (exact matching):
    socket is not connected
    ---- Test cleanup failed:
    can't unset "x": no such variable
    ---- errorInfo(cleanup): can't unset "x": no such variable
        while executing
    "unset x"
        ("uplevel" body line 3)
        invoked from within
    "uplevel 1 $cleanup"
    ---- errorCode(cleanup): TCL LOOKUP VARNAME x
    ==== socket-14.11.1 FAILED
    
    
    
    ==== socket-14.12 [socket -async] background progress triggered by [fconfigure -error] FAILED
    ==== Contents of test case:
    
            set s [socket -async localhost [randport]]
            for {set i 0} {$i < 50} {incr i} {
                set x [fconfigure $s -error]
                if {$x != ""} break
                after 200
            }
            set x
        
    ---- Test generated error; Return code was: 1
    ---- Return code should have been one of: 0 2
    ---- errorInfo: couldn't open socket: connection refused
        while executing
    "socket -async localhost [randport]"
        ("uplevel" body line 2)
        invoked from within
    "uplevel 1 $script"
    ---- errorCode: POSIX ECONNREFUSED {connection refused}
    ---- Test cleanup failed:
    can not find channel named "sock801965e10"
    ---- errorInfo(cleanup): can not find channel named "sock801965e10"
        while executing
    "close $s"
        ("uplevel" body line 2)
        invoked from within
    "uplevel 1 $cleanup"
    ---- errorCode(cleanup): TCL LOOKUP CHANNEL sock801965e10
    ==== socket-14.12 FAILED
    
    
    
    ==== socket-14.14 testing fileevent readable on failed async socket connect FAILED
    ==== Contents of test case:
    
        # Test for bug 581937ab1e
        
        set a1 [after 5000 {set x timeout}]
        # This connect should fail
        set s [socket -async localhost [randport]]
        fileevent $s readable {set x readable}
        vwait x
        set x
    
    ---- Test generated error; Return code was: 1
    ---- Return code should have been one of: 0 2
    ---- errorInfo: couldn't open socket: connection refused
        while executing
    "socket -async localhost [randport]"
        ("uplevel" body line 6)
        invoked from within
    "uplevel 1 $script"
    ---- errorCode: POSIX ECONNREFUSED {connection refused}
    ==== socket-14.14 FAILED
    
    
    
    ==== socket-14.15 blocking read on async socket should not trigger event handlers FAILED
    ==== Contents of test case:
    
            set s [socket -async localhost [randport]]
            set x ok
            fileevent $s writable {set x fail}
            catch {read $s}
            set x
        
    ---- Test generated error; Return code was: 1
    ---- Return code should have been one of: 0 2
    ---- errorInfo: couldn't open socket: connection refused
        while executing
    "socket -async localhost [randport]"
        ("uplevel" body line 2)
        invoked from within
    "uplevel 1 $script"
    ---- errorCode: POSIX ECONNREFUSED {connection refused}
    ==== socket-14.15 FAILED
    </verbatim>
    
    <h3>CentOS 5</h3>
    HaO on 2014-08-12
    <verbatim>
    ==== http-4.14 http::Event FAILED
    ==== Contents of test case:
    
        set token [http::geturl $badurl/?timeout=10 -timeout 10000 -command \#]
        if {$token eq ""} {
    	error "bogus return from http::geturl"
        }
        http::wait $token
        lindex [http::error $token] 0
    
    ---- Result was:
    
    ---- Result should have been (exact matching):
    connect failed connection refused
    ==== http-4.14 FAILED
    
    ==== socket_inet-2.13 Bug 1758a0b603 FAILED
    ==== Contents of test case:
    
        file delete $path(script)
        set f [open $path(script) w]
        puts $f {
    	set server [socket -server accept 0]
    	puts [lindex [chan configure $server -sockname] 2]
    	proc accept { client host port } {
    	    chan configure $client -blocking  0 -buffering line -buffersize 1
    	    puts $client [string repeat . 720000]
    	    puts ready
    	    chan event $client writable [list setup $client]
    	}
    	proc setup client {
    	    chan event $client writable {set forever write}
    	    after 5 {set forever timeout}
    	}
    	vwait forever
    	puts $forever
        }
        close $f
        set pipe [open |[list [interpreter] $path(script)] r]
        gets $pipe port
        set sock [socket $localhost $port]
        chan configure $sock -blocking  0 -buffering line
        chan event $sock readable [list read_lines $sock $pipe ]
        proc read_lines { sock pipe } {
    	gets $pipe
    	gets $sock line
    	after idle [list stop $sock $pipe]
    	chan event $sock readable {}
        }
        proc stop {sock pipe} {
    	variable done
    	close $sock
    	set done [gets $pipe]
        }
        variable done
        vwait [namespace which -variable done]
        close $pipe
        set done
    
    ---- Result was:
    timeout
    ---- Result should have been (exact matching):
    write
    ==== socket_inet-2.13 FAILED
    
    ==== socket_inet6-2.13 Bug 1758a0b603 FAILED
    ==== Contents of test case:
    
        file delete $path(script)
        set f [open $path(script) w]
        puts $f {
    	set server [socket -server accept 0]
    	puts [lindex [chan configure $server -sockname] 2]
    	proc accept { client host port } {
    	    chan configure $client -blocking  0 -buffering line -buffersize 1
    	    puts $client [string repeat . 720000]
    	    puts ready
    	    chan event $client writable [list setup $client]
    	}
    	proc setup client {
    	    chan event $client writable {set forever write}
    	    after 5 {set forever timeout}
    	}
    	vwait forever
    	puts $forever
        }
        close $f
        set pipe [open |[list [interpreter] $path(script)] r]
        gets $pipe port
        set sock [socket $localhost $port]
        chan configure $sock -blocking  0 -buffering line
        chan event $sock readable [list read_lines $sock $pipe ]
        proc read_lines { sock pipe } {
    	gets $pipe
    	gets $sock line
    	after idle [list stop $sock $pipe]
    	chan event $sock readable {}
        }
        proc stop {sock pipe} {
    	variable done
    	close $sock
    	set done [gets $pipe]
        }
        variable done
        vwait [namespace which -variable done]
        close $pipe
        set done
    
    ---- Result was:
    timeout
    ---- Result should have been (exact matching):
    write
    ==== socket_inet6-2.13 FAILED
    
    ==== socket-14.2 [socket -async] fileevent connection refused FAILED
    ==== Contents of test case:
    
            set client [socket -async localhost [randport]]
            fileevent $client writable {set x ok}
            set after [after $latency {set x timeout}]
            vwait x
            after cancel $after
            lappend x [fconfigure $client -error]
        
    ---- Result was:
    timeout {connection refused}
    ---- Result should have been (exact matching):
    ok {connection refused}
    ==== socket-14.2 FAILED
    </verbatim>
    
  2. login: "oehhar"
  3. mimetype: "text/x-fossil-wiki"
  4. username: "oehhar"