Posted to tcl by JH at Thu Jun 10 21:49:03 GMT 2010view raw
- chan.test
- ==== chan-16.9 chan command: pending input subcommand FAILED
- ==== Contents of test case:
- after idle chan-16.9-client
- vwait ::chan-16.9-done
- set ::chan-16.9-data
- ---- Test setup failed:
- couldn't open socket: no such device or address (Invalid flags in hints)
- ---- errorInfo(setup): couldn't open socket: no such device or address (Invalidflags in hints)
- while executing
- "socket -server chan-16.9-accept -myaddr 127.0.0.1 0"
- ("uplevel" body line 32)
- invoked from within
- "uplevel 1 $setup"
- ---- errorCode(setup): POSIX ENXIO {no such device or address}
- ==== chan-16.9 FAILED
- chanio.test
- ==== chan-io-28.7 Tcl_CloseEx (half-close) socket FAILED
- ==== Contents of test case:
- set ::ff [open "|[list [interpreter] $echo]" r]
- gets $::ff port
- set ::s [socket 127.0.0.1 $port]
- puts $::s Hey
- close $::s w
- set timer [after 1000 {set ::done Failed}]
- set ::acc {}
- fileevent $::s readable {
- if {[gets $::s line]<0} {
- set ::done Succeeded
- } else {
- lappend ::acc $line
- }
- }
- vwait ::done
- after cancel $timer
- close $::s r
- close $::ff
- list $::done $::acc
- ---- Test generated error; Return code was: 1
- ---- Return code should have been one of: 0 2
- ---- errorInfo: expected integer but got ""
- while executing
- "socket 127.0.0.1 $port"
- ("uplevel" body line 4)
- invoked from within
- "uplevel 1 $script"
- ---- errorCode: TCL VALUE NUMBER
- ==== chan-io-28.7 FAILED
- ==== chan-io-29.34 Tcl_Chan Close, async flush on chan close, using sockets FAILED
- ==== Contents of test case:
- variable c 0
- variable x running
- set l abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz
- proc writelots {s l} {
- for {set i 0} {$i < 2000} {incr i} {
- chan puts $s $l
- }
- }
- proc accept {s a p} {
- variable x
- chan event $s readable [namespace code [list readit $s]]
- chan configure $s -blocking off
- set x accepted
- }
- proc readit {s} {
- variable c
- variable x
- set l [chan gets $s]
- if {[chan eof $s]} {
- chan close $s
- set x done
- } elseif {([string length $l] > 0) || ![chan blocked $s]} {
- incr c
- }
- }
- set ss [socket -server [namespace code accept] -myaddr 127.0.0.1 0]
- set cs [socket 127.0.0.1 [lindex [chan configure $ss -sockname] 2]]
- vwait [namespace which -variable x]
- chan configure $cs -blocking off
- writelots $cs $l
- chan close $cs
- chan close $ss
- vwait [namespace which -variable x]
- set c
- ---- Test generated error; Return code was: 1
- ---- Return code should have been one of: 0 2
- ---- errorInfo: couldn't open socket: no such device or address (Invalid flags in hints)
- while executing
- "socket -server [namespace code accept] -myaddr 127.0.0.1 0"
- ("uplevel" body line 27)
- invoked from within
- "uplevel 1 $script"
- ---- errorCode: POSIX ENXIO {no such device or address}
- ==== chan-io-29.34 FAILED
- ==== chan-io-29.35 Tcl_Chan Close vs chan event vs multiple interpreters FAILED
- ==== Contents of test case:
- # On Mac, this test screws up sockets such that subsequent tests using
- # port 2828 either cause errors or panic().
- catch {interp delete x}
- catch {interp delete y}
- interp create x
- interp create y
- set s [socket -server [namespace code accept] -myaddr 127.0.0.1 0]
- proc accept {s a p} {
- chan puts $s hello
- chan close $s
- }
- set c [socket 127.0.0.1 [lindex [chan configure $s -sockname] 2]]
- interp share {} $c x
- interp share {} $c y
- chan close $c
- x eval {
- proc readit {s} {
- chan gets $s
- if {[chan eof $s]} {
- chan close $s
- }
- }
- }
- y eval {
- proc readit {s} {
- chan gets $s
- if {[chan eof $s]} {
- chan close $s
- }
- }
- }
- x eval "chan event $c readable \{readit $c\}"
- y eval "chan event $c readable \{readit $c\}"
- y eval [list chan close $c]
- update
- chan close $s
- interp delete x
- interp delete y
- ---- Test generated error; Return code was: 1
- ---- Return code should have been one of: 0 2
- ---- errorInfo: couldn't open socket: no such device or address (Invalid flags in hints)
- while executing
- "socket -server [namespace code accept] -myaddr 127.0.0.1 0"
- ("uplevel" body line 8)
- invoked from within
- "uplevel 1 $script"
- ---- errorCode: POSIX ENXIO {no such device or address}
- ==== chan-io-29.35 FAILED
- ==== chan-io-39.18 Tcl_SetChannelOption, setting read mode independently FAILED
- ==== Contents of test case:
- proc accept {s a p} {chan close $s}
- set s1 [socket -server [namespace code accept] -myaddr 127.0.0.1 0]
- set port [lindex [chan configure $s1 -sockname] 2]
- set s2 [socket 127.0.0.1 $port]
- update
- chan configure $s2 -translation {auto lf}
- set modes [chan configure $s2 -translation]
- chan close $s1
- chan close $s2
- set modes
- ---- Test generated error; Return code was: 1
- ---- Return code should have been one of: 0 2
- ---- errorInfo: couldn't open socket: no such device or address (Invalid flags in hints)
- while executing
- "socket -server [namespace code accept] -myaddr 127.0.0.1 0"
- ("uplevel" body line 3)
- invoked from within
- "uplevel 1 $script"
- ---- errorCode: POSIX ENXIO {no such device or address}
- ==== chan-io-39.18 FAILED
- ==== chan-io-39.19 Tcl_SetChannelOption, setting read mode independently FAILED
- ==== Contents of test case:
- proc accept {s a p} {chan close $s}
- set s1 [socket -server [namespace code accept] -myaddr 127.0.0.1 0]
- set port [lindex [chan configure $s1 -sockname] 2]
- set s2 [socket 127.0.0.1 $port]
- update
- chan configure $s2 -translation {auto crlf}
- set modes [chan configure $s2 -translation]
- chan close $s1
- chan close $s2
- set modes
- ---- Test generated error; Return code was: 1
- ---- Return code should have been one of: 0 2
- ---- errorInfo: couldn't open socket: no such device or address (Invalid flags in hints)
- while executing
- "socket -server [namespace code accept] -myaddr 127.0.0.1 0"
- ("uplevel" body line 3)
- invoked from within
- "uplevel 1 $script"
- ---- errorCode: POSIX ENXIO {no such device or address}
- ==== chan-io-39.19 FAILED