Posted to tcl by oehhar at Wed May 21 13:08:31 GMT 2014view raw
- ==== 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
-
-
-
- ==== socket-14.6.1 [socket -async] with no event loop and server listening on IPv6 FAILED
- ==== Contents of test case:
-
- set client [socket -async localhost $port]
- for {set i 0} {$i < 50} {incr i } {
- update
- if {$x ne ""} {
- lappend x [gets $client]
- break
- }
- after 100
- }
- set x
-
- ---- Result was:
-
- ---- Result should have been (exact matching):
- ok bye
- ==== socket-14.6.1 FAILED
-
-
-
- ==== socket-14.7.1 pending [socket -async] and blocking [gets], server is IPv6 FAILED
- ==== Contents of test case:
-
- set sock [socket -async localhost $port]
- list [fconfigure $sock -error] [gets $sock] [fconfigure $sock -error]
-
- ---- Test generated error; Return code was: 1
- ---- Return code should have been one of: 0 2
- ---- errorInfo: error reading "sock12ba5b0": socket is not connected
- while executing
- "gets $sock"
- ("uplevel" body line 3)
- invoked from within
- "uplevel 1 $script"
- ---- errorCode: POSIX ENOTCONN {socket is not connected}
- ==== socket-14.7.1 FAILED
-
-
-
- ==== socket-14.8.1 pending [socket -async] and nonblocking [gets], server is IPv6 FAILED
- ==== Contents of test case:
-
- set sock [socket -async localhost $port]
- fconfigure $sock -blocking 0
- for {set i 0} {$i < 50} {incr i } {
- if {[catch {gets $sock} x] || $x ne "" || ![fblocked $sock]} break
- after 200
- }
- set x
-
- ---- Result was:
- error reading "sock12b3b10": socket is not connected
- ---- Result should have been (exact matching):
- ok