Check-in [7b1825af0d]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment: * tests/tlsIO.test: enabled tests 2.10, 7.[1245] (there is no 3), which now pass. Added some comments to other failing tests.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | tls-1-3-io-rewrite
Files: files | file ages | folders
SHA1:7b1825af0dd5fda14d8d84037aed20bc83c5cb86
User & Date: hobbs 2000-07-14 04:10:22
Context
2000-07-17
23:17
* pkgIndex.tcl.in: * configure.in: updated version to 1.4 check-in: 1e0de94a93 user: hobbs tags: tls-1-3-io-rewrite
2000-07-14
04:10
* tests/tlsIO.test: enabled tests 2.10, 7.[1245] (there is no 3), which now pass. Added some comments to other failing tests. check-in: 7b1825af0d user: hobbs tags: tls-1-3-io-rewrite
2000-07-12
01:54
* tlsIO.c: changed all the channel procs to start with Tls* for better parity when comparing with Transform channel procs. Rewrote TlsWatchProc, added TlsNotifyProc according to the new channel design, which also leaves TlsChannelHandler unused. * tlsBIO.c (BioCtrl): changed BIO_CTRL_FLUSH case to use Tcl_WriteRaw instead of Tcl_Flush (to operate on correct channel in the stack instead of starting at the top again). Would otherwise cause a recursive stack bomb when implicit handshaking took effect. check-in: a27c6affe5 user: hobbs tags: tls-1-3-io-rewrite
Changes

Changes to ChangeLog.

            1  +2000-07-13  Jeff Hobbs  <hobbs@scriptics.com>
            2  +
            3  +	* tests/tlsIO.test: enabled tests 2.10, 7.[1245] (there is no 3),
            4  +	which now pass.  Added some comments to other failing tests.
            5  +
     1      6   2000-07-11  Jeff Hobbs  <hobbs@scriptics.com>
     2      7   
     3      8   	* tlsIO.c: changed all the channel procs to start with Tls* for
     4      9   	better parity when comparing with Transform channel procs.
     5     10   	Rewrote TlsWatchProc, added TlsNotifyProc according to the new
     6     11   	channel design, which also leaves TlsChannelHandler unused.
     7     12   

Changes to tests/tlsIO.test.

     6      6   #
     7      7   # Copyright (c) 1994-1996 Sun Microsystems, Inc.
     8      8   # Copyright (c) 1998-2000 Ajuba Solutions. 
     9      9   #
    10     10   # See the file "license.terms" for information on usage and redistribution
    11     11   # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
    12     12   #
    13         -# RCS: @(#) $Id: tlsIO.test,v 1.14.2.2 2000/07/12 01:54:03 hobbs Exp $
           13  +# RCS: @(#) $Id: tlsIO.test,v 1.14.2.3 2000/07/14 04:10:23 hobbs Exp $
    14     14   
    15     15   # Running socket tests with a remote server:
    16     16   # ------------------------------------------
    17     17   # 
    18     18   # Some tests in socket.test depend on the existence of a remote server to
    19     19   # which they connect. The remote server must be an instance of tcltest and it
    20     20   # must run the script found in the file "remote.tcl" in this directory. You
................................................................................
   574    574       invoked from within
   575    575   "eval ::socket $sopts"
   576    576       (procedure "tls::socket" line 62)
   577    577       invoked from within
   578    578   "tls::socket -server accept 8828"
   579    579       (file "script" line 1)}}
   580    580   
   581         -test tlsIO-2.10 {close on accept, accepted socket lives} {socket knownBug} {
          581  +test tlsIO-2.10 {close on accept, accepted socket lives} {socket} {
   582    582       set done 0
   583    583       set timer [after 20000 "set done timed_out"]
   584    584       set ss [tls::socket -server accept -certfile $serverCert -cafile $caCert \
   585    585   	-keyfile $serverKey 8830]
   586    586       proc accept {s a p} {
   587    587   	global ss
   588    588   	close $ss
................................................................................
   601    601   
   602    602       vwait done
   603    603       after cancel $timer
   604    604       set done
   605    605   } 1
   606    606   
   607    607   test tlsIO-2.11 {detecting new data} {socket knownBug} {
          608  +    # HOBBS: hung pre-rewrite, hangs post-rewrite
   608    609       proc accept {s a p} {
   609    610   	global sock
   610    611   	set sock $s
   611    612   	set f [open awb.log w]
   612    613   	puts $f [catch {tls::handshake $sock} err]
   613    614   	puts $f "err: $err"
   614    615   	puts $f "[tls::status $sock]"
................................................................................
   864    865   	set x {htons problem, should be disallowed, are you running as SU?}
   865    866   	close $msg
   866    867       }
   867    868       set x
   868    869   } {couldn't open socket: not owner}
   869    870   
   870    871   test tlsIO-6.1 {accept callback error} {unexplainedFailure socket stdio pcCrash} {
          872  +    # HOBBS: still fails post-rewrite
   871    873       removeFile script
   872    874       set f [open script w]
   873    875       puts $f {
   874    876       	package require tls
   875    877   	gets stdin
   876    878   	tls::socket 127.0.0.1 8848
   877    879       }
................................................................................
   891    893       close $s
   892    894       rename bgerror {}
   893    895       set x
   894    896   } {{divide by zero}}
   895    897   
   896    898   # bug report #5812 fconfigure doesn't return value for '-peername'
   897    899   
   898         -test tlsIO-7.1 {testing socket specific options} {knownBug socket stdio} {
          900  +test tlsIO-7.1 {testing socket specific options} {socket stdio} {
   899    901       removeFile script
   900    902       set f [open script w]
   901    903       puts $f {
   902    904   	package require tls
   903    905       }
   904    906       puts $f "tls::socket -server accept -certfile $serverCert -cafile $caCert -keyfile $serverKey 8820"
   905    907       puts $f {
................................................................................
   925    927       lappend l [string compare [lindex $p 0] 127.0.0.1]
   926    928       lappend l [string compare [lindex $p 2] 8820]
   927    929       lappend l [llength $p]
   928    930   } {0 0 3}
   929    931   
   930    932   # bug report #5812 fconfigure doesn't return value for '-sockname'
   931    933   
   932         -test tlsIO-7.2 {testing socket specific options} {knownBug socket stdio} {
          934  +test tlsIO-7.2 {testing socket specific options} {socket stdio} {
   933    935       removeFile script
   934    936       set f [open script w]
   935    937       puts $f {
   936    938   	package require tls
   937    939       }
   938    940       puts $f "tls::socket -server accept -certfile $serverCert -cafile $caCert -keyfile $serverKey 8821"
   939    941       puts $f {
................................................................................
   969    971       close $s
   970    972       update
   971    973       llength $l
   972    974   } 12
   973    975   
   974    976   # bug report #5812 fconfigure doesn't return value for '-sockname'
   975    977   
   976         -test tlsIO-7.4 {testing socket specific options} {knownBug socket} {
          978  +test tlsIO-7.4 {testing socket specific options} {socket} {
   977    979       set s [tls::socket \
   978    980   	-certfile $serverCert -cafile $caCert -keyfile $serverKey \
   979    981       	-server accept 8823]
   980    982       proc accept {s a p} {
   981    983   	global x
   982    984   	set x [fconfigure $s -sockname]
   983    985   	close $s
................................................................................
   992    994       close $s1
   993    995       set l ""
   994    996       lappend l [lindex $x 2] [llength $x]
   995    997   } {8823 3}
   996    998   
   997    999   # bug report #5812 fconfigure doesn't return value for '-sockname'
   998   1000   
   999         -test tlsIO-7.5 {testing socket specific options} {knownBug socket unixOrPc} {
         1001  +test tlsIO-7.5 {testing socket specific options} {socket unixOrPc} {
  1000   1002       set s [tls::socket \
  1001   1003   	-certfile $serverCert -cafile $caCert -keyfile $serverKey \
  1002   1004       	-server accept 8829]
  1003   1005       proc accept {s a p} {
  1004   1006   	global x
  1005   1007   	set x [fconfigure $s -sockname]
  1006   1008   	close $s
................................................................................
  1014   1016       close $s
  1015   1017       close $s1
  1016   1018       set l ""
  1017   1019       lappend l [lindex $x 0] [lindex $x 2] [llength $x]
  1018   1020   } {127.0.0.1 8829 3}
  1019   1021   
  1020   1022   test tlsIO-8.1 {testing -async flag on sockets} {unexplainedHang socket} {
         1023  +    # HOBBS: still fails post-rewrite
  1021   1024       # test seems to hang -- awb 6/2/2000
  1022   1025       # NOTE: This test may fail on some Solaris 2.4 systems. If it does,
  1023   1026       # check that you have these patches installed (using showrev -p):
  1024   1027       #
  1025   1028       # 101907-05, 101925-02, 101945-14, 101959-03, 101969-05, 101973-03,
  1026   1029       # 101977-03, 101981-02, 101985-01, 102001-03, 102003-01, 102007-01,
  1027   1030       # 102011-02, 102024-01, 102039-01, 102044-01, 102048-01, 102062-03,
................................................................................
  1049   1052       set z [gets $s1]
  1050   1053       close $s
  1051   1054       close $s1
  1052   1055       set z
  1053   1056   } bye
  1054   1057   
  1055   1058   test tlsIO-9.1 {testing spurious events} {unexplainedHang socket} {
         1059  +    # HOBBS: still fails post-rewrite
  1056   1060       # locks up 
  1057   1061       set len 0
  1058   1062       set spurious 0
  1059   1063       set done 0
  1060   1064       proc readlittle {s} {
  1061   1065   	global spurious done len
  1062   1066   	set l [read $s 1]
................................................................................
  1087   1091       vwait done
  1088   1092       after cancel $timer
  1089   1093       close $s
  1090   1094       list $spurious $len
  1091   1095   } {0 50}
  1092   1096   
  1093   1097   test tlsIO-9.2 {testing async write, fileevents, flush on close} {socket} {
         1098  +    # HOBBS: This hangs when I turn blocking on.
         1099  +    #
  1094   1100       set firstblock ""
  1095   1101       for {set i 0} {$i < 5} {incr i} {set firstblock "a$firstblock$firstblock"}
  1096   1102       set secondblock ""
  1097   1103       for {set i 0} {$i < 16} {incr i} {
  1098   1104   	set secondblock "b$secondblock$secondblock"
  1099   1105       }
  1100   1106       set l [tls::socket \
................................................................................
  1132   1138   	incr count [string length $l]
  1133   1139   	if {[eof $s]} {
  1134   1140   	    close $s
  1135   1141   	    set done 1
  1136   1142   	}
  1137   1143       }
  1138   1144       fileevent $s readable "readit $s"
         1145  +    set done 0
  1139   1146       set timer [after 10000 "set done timed_out"]
  1140   1147       vwait done
  1141   1148       after cancel $timer
  1142   1149       close $l
  1143         -    set count
  1144         -} 65566
         1150  +    list $count $done
         1151  +} {65566 1}
  1145   1152   
  1146   1153   test tlsIO-9.3 {testing EOF stickyness} {unexplainedHang socket} {
         1154  +    # HOBBS: still fails post-rewrite
  1147   1155       # hangs
  1148   1156       proc count_to_eof {s} {
  1149   1157   	global count done timer
  1150   1158   	set l [gets $s]
  1151   1159   	if {[eof $s]} {
  1152   1160   	    incr count
  1153   1161   	    if {$count > 9} {