Posted to tcl by oehhar at Wed May 21 13:08:31 GMT 2014view raw

  1. ==== socket-14.2 [socket -async] fileevent connection refused FAILED
  2. ==== Contents of test case:
  3.  
  4. set client [socket -async localhost [randport]]
  5. fileevent $client writable {set x ok}
  6. set after [after $latency {set x timeout}]
  7. vwait x
  8. after cancel $after
  9. lappend x [fconfigure $client -error]
  10.  
  11. ---- Result was:
  12. timeout {connection refused}
  13. ---- Result should have been (exact matching):
  14. ok {connection refused}
  15. ==== socket-14.2 FAILED
  16.  
  17.  
  18.  
  19. ==== socket-14.6.1 [socket -async] with no event loop and server listening on IPv6 FAILED
  20. ==== Contents of test case:
  21.  
  22. set client [socket -async localhost $port]
  23. for {set i 0} {$i < 50} {incr i } {
  24. update
  25. if {$x ne ""} {
  26. lappend x [gets $client]
  27. break
  28. }
  29. after 100
  30. }
  31. set x
  32.  
  33. ---- Result was:
  34.  
  35. ---- Result should have been (exact matching):
  36. ok bye
  37. ==== socket-14.6.1 FAILED
  38.  
  39.  
  40.  
  41. ==== socket-14.7.1 pending [socket -async] and blocking [gets], server is IPv6 FAILED
  42. ==== Contents of test case:
  43.  
  44. set sock [socket -async localhost $port]
  45. list [fconfigure $sock -error] [gets $sock] [fconfigure $sock -error]
  46.  
  47. ---- Test generated error; Return code was: 1
  48. ---- Return code should have been one of: 0 2
  49. ---- errorInfo: error reading "sock12ba5b0": socket is not connected
  50. while executing
  51. "gets $sock"
  52. ("uplevel" body line 3)
  53. invoked from within
  54. "uplevel 1 $script"
  55. ---- errorCode: POSIX ENOTCONN {socket is not connected}
  56. ==== socket-14.7.1 FAILED
  57.  
  58.  
  59.  
  60. ==== socket-14.8.1 pending [socket -async] and nonblocking [gets], server is IPv6 FAILED
  61. ==== Contents of test case:
  62.  
  63. set sock [socket -async localhost $port]
  64. fconfigure $sock -blocking 0
  65. for {set i 0} {$i < 50} {incr i } {
  66. if {[catch {gets $sock} x] || $x ne "" || ![fblocked $sock]} break
  67. after 200
  68. }
  69. set x
  70.  
  71. ---- Result was:
  72. error reading "sock12b3b10": socket is not connected
  73. ---- Result should have been (exact matching):
  74. ok