Posted to tcl by JH at Thu Jun 10 21:49:03 GMT 2010view raw

  1. chan.test
  2.  
  3.  
  4. ==== chan-16.9 chan command: pending input subcommand FAILED
  5. ==== Contents of test case:
  6.  
  7. after idle chan-16.9-client
  8. vwait ::chan-16.9-done
  9. set ::chan-16.9-data
  10.  
  11. ---- Test setup failed:
  12. couldn't open socket: no such device or address (Invalid flags in hints)
  13. ---- errorInfo(setup): couldn't open socket: no such device or address (Invalidflags in hints)
  14. while executing
  15. "socket -server chan-16.9-accept -myaddr 127.0.0.1 0"
  16. ("uplevel" body line 32)
  17. invoked from within
  18. "uplevel 1 $setup"
  19. ---- errorCode(setup): POSIX ENXIO {no such device or address}
  20. ==== chan-16.9 FAILED
  21.  
  22. chanio.test
  23.  
  24.  
  25. ==== chan-io-28.7 Tcl_CloseEx (half-close) socket FAILED
  26. ==== Contents of test case:
  27.  
  28. set ::ff [open "|[list [interpreter] $echo]" r]
  29. gets $::ff port
  30. set ::s [socket 127.0.0.1 $port]
  31. puts $::s Hey
  32. close $::s w
  33. set timer [after 1000 {set ::done Failed}]
  34. set ::acc {}
  35. fileevent $::s readable {
  36. if {[gets $::s line]<0} {
  37. set ::done Succeeded
  38. } else {
  39. lappend ::acc $line
  40. }
  41. }
  42. vwait ::done
  43. after cancel $timer
  44. close $::s r
  45. close $::ff
  46. list $::done $::acc
  47.  
  48. ---- Test generated error; Return code was: 1
  49. ---- Return code should have been one of: 0 2
  50. ---- errorInfo: expected integer but got ""
  51. while executing
  52. "socket 127.0.0.1 $port"
  53. ("uplevel" body line 4)
  54. invoked from within
  55. "uplevel 1 $script"
  56. ---- errorCode: TCL VALUE NUMBER
  57. ==== chan-io-28.7 FAILED
  58.  
  59.  
  60.  
  61. ==== chan-io-29.34 Tcl_Chan Close, async flush on chan close, using sockets FAILED
  62. ==== Contents of test case:
  63.  
  64. variable c 0
  65. variable x running
  66. set l abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz
  67. proc writelots {s l} {
  68. for {set i 0} {$i < 2000} {incr i} {
  69. chan puts $s $l
  70. }
  71. }
  72. proc accept {s a p} {
  73. variable x
  74. chan event $s readable [namespace code [list readit $s]]
  75. chan configure $s -blocking off
  76. set x accepted
  77. }
  78. proc readit {s} {
  79. variable c
  80. variable x
  81. set l [chan gets $s]
  82. if {[chan eof $s]} {
  83. chan close $s
  84. set x done
  85. } elseif {([string length $l] > 0) || ![chan blocked $s]} {
  86. incr c
  87. }
  88. }
  89. set ss [socket -server [namespace code accept] -myaddr 127.0.0.1 0]
  90. set cs [socket 127.0.0.1 [lindex [chan configure $ss -sockname] 2]]
  91. vwait [namespace which -variable x]
  92. chan configure $cs -blocking off
  93. writelots $cs $l
  94. chan close $cs
  95. chan close $ss
  96. vwait [namespace which -variable x]
  97. set c
  98.  
  99. ---- Test generated error; Return code was: 1
  100. ---- Return code should have been one of: 0 2
  101. ---- errorInfo: couldn't open socket: no such device or address (Invalid flags in hints)
  102. while executing
  103. "socket -server [namespace code accept] -myaddr 127.0.0.1 0"
  104. ("uplevel" body line 27)
  105. invoked from within
  106. "uplevel 1 $script"
  107. ---- errorCode: POSIX ENXIO {no such device or address}
  108. ==== chan-io-29.34 FAILED
  109.  
  110.  
  111.  
  112. ==== chan-io-29.35 Tcl_Chan Close vs chan event vs multiple interpreters FAILED
  113. ==== Contents of test case:
  114.  
  115. # On Mac, this test screws up sockets such that subsequent tests using
  116. # port 2828 either cause errors or panic().
  117. catch {interp delete x}
  118. catch {interp delete y}
  119. interp create x
  120. interp create y
  121. set s [socket -server [namespace code accept] -myaddr 127.0.0.1 0]
  122. proc accept {s a p} {
  123. chan puts $s hello
  124. chan close $s
  125. }
  126. set c [socket 127.0.0.1 [lindex [chan configure $s -sockname] 2]]
  127. interp share {} $c x
  128. interp share {} $c y
  129. chan close $c
  130. x eval {
  131. proc readit {s} {
  132. chan gets $s
  133. if {[chan eof $s]} {
  134. chan close $s
  135. }
  136. }
  137. }
  138. y eval {
  139. proc readit {s} {
  140. chan gets $s
  141. if {[chan eof $s]} {
  142. chan close $s
  143. }
  144. }
  145. }
  146. x eval "chan event $c readable \{readit $c\}"
  147. y eval "chan event $c readable \{readit $c\}"
  148. y eval [list chan close $c]
  149. update
  150. chan close $s
  151. interp delete x
  152. interp delete y
  153.  
  154. ---- Test generated error; Return code was: 1
  155. ---- Return code should have been one of: 0 2
  156. ---- errorInfo: couldn't open socket: no such device or address (Invalid flags in hints)
  157. while executing
  158. "socket -server [namespace code accept] -myaddr 127.0.0.1 0"
  159. ("uplevel" body line 8)
  160. invoked from within
  161. "uplevel 1 $script"
  162. ---- errorCode: POSIX ENXIO {no such device or address}
  163. ==== chan-io-29.35 FAILED
  164.  
  165.  
  166.  
  167. ==== chan-io-39.18 Tcl_SetChannelOption, setting read mode independently FAILED
  168. ==== Contents of test case:
  169.  
  170. proc accept {s a p} {chan close $s}
  171. set s1 [socket -server [namespace code accept] -myaddr 127.0.0.1 0]
  172. set port [lindex [chan configure $s1 -sockname] 2]
  173. set s2 [socket 127.0.0.1 $port]
  174. update
  175. chan configure $s2 -translation {auto lf}
  176. set modes [chan configure $s2 -translation]
  177. chan close $s1
  178. chan close $s2
  179. set modes
  180.  
  181. ---- Test generated error; Return code was: 1
  182. ---- Return code should have been one of: 0 2
  183. ---- errorInfo: couldn't open socket: no such device or address (Invalid flags in hints)
  184. while executing
  185. "socket -server [namespace code accept] -myaddr 127.0.0.1 0"
  186. ("uplevel" body line 3)
  187. invoked from within
  188. "uplevel 1 $script"
  189. ---- errorCode: POSIX ENXIO {no such device or address}
  190. ==== chan-io-39.18 FAILED
  191.  
  192.  
  193.  
  194. ==== chan-io-39.19 Tcl_SetChannelOption, setting read mode independently FAILED
  195. ==== Contents of test case:
  196.  
  197. proc accept {s a p} {chan close $s}
  198. set s1 [socket -server [namespace code accept] -myaddr 127.0.0.1 0]
  199. set port [lindex [chan configure $s1 -sockname] 2]
  200. set s2 [socket 127.0.0.1 $port]
  201. update
  202. chan configure $s2 -translation {auto crlf}
  203. set modes [chan configure $s2 -translation]
  204. chan close $s1
  205. chan close $s2
  206. set modes
  207.  
  208. ---- Test generated error; Return code was: 1
  209. ---- Return code should have been one of: 0 2
  210. ---- errorInfo: couldn't open socket: no such device or address (Invalid flags in hints)
  211. while executing
  212. "socket -server [namespace code accept] -myaddr 127.0.0.1 0"
  213. ("uplevel" body line 3)
  214. invoked from within
  215. "uplevel 1 $script"
  216. ---- errorCode: POSIX ENXIO {no such device or address}
  217. ==== chan-io-39.19 FAILED
  218.