Index: tests/tlsIo.test ================================================================== --- tests/tlsIo.test +++ tests/tlsIo.test @@ -8,11 +8,11 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tlsIo.test,v 1.2 2000/06/02 19:17:11 awb Exp $ +# RCS: @(#) $Id: tlsIo.test,v 1.3 2000/06/02 20:45:38 awb Exp $ # Running socket tests with a remote server: # ------------------------------------------ # # Some tests in socket.test depend on the existence of a remote server to @@ -283,10 +283,11 @@ if [info exists port] { incr port } else { set port [expr 2048 + [pid]%1024] } + test socket-2.2 {tcp connection with client port specified} {socket stdio pcCrash} { removeFile script set f [open script w] puts $f { package require tls @@ -318,10 +319,11 @@ close $sock } close $f set x } [list ready "hello $port"] + test socket-2.3 {tcp connection with client interface specified} {socket stdio pcCrash} { removeFile script set f [open script w] puts $f { package require tls @@ -350,10 +352,11 @@ close $sock } close $f set x } {ready {hello 127.0.0.1}} + test socket-2.4 {tcp connection with server interface specified} {socket stdio pcCrash} { removeFile script set f [open script w] puts $f { package require tls @@ -588,10 +591,11 @@ test socket-3.1 {socket conflict} {socket stdio} { removeFile script set f [open script w] puts $f { + package require tls set f [tls::socket -server accept 2828] puts ready gets stdin close $f } @@ -607,10 +611,11 @@ test socket-3.2 {server with several clients} {socket stdio pcCrash} { removeFile script set f [open script w] puts $f { + package require tls set t1 [after 30000 "set x timed_out"] set t2 [after 31000 "set x timed_out"] set t3 [after 32000 "set x timed_out"] set counter 0 set s [tls::socket -server accept 2828] @@ -661,16 +666,17 @@ lappend x [gets $f] close $f set x } {ready done} -test socket-4.1 {server with several clients} {socket stdio} { +test socket-4.1 {server with several clients} {socket stdio pcCrash} { removeFile script set f [open script w] puts $f { + package require tls gets stdin - set s [socket 127.0.0.1 2828] + set s [tls::socket 127.0.0.1 2828] fconfigure $s -buffering line for {set i 0} {$i < 100} {incr i} { puts $s hello gets $s } @@ -723,10 +729,11 @@ close $p1 close $p2 close $p3 set l } {{p1 bye done} {p2 bye done} {p3 bye done}} + test socket-4.2 {byte order problems, socket numbers, htons} {socket} { set x ok if {[catch {tls::socket -server dodo 0x3000} msg]} { set x $msg } else { @@ -786,14 +793,15 @@ close $s rename bgerror {} set x } {{divide by zero}} -test socket-7.1 {testing socket specific options} {socket stdio} { +test socket-7.1 {testing socket specific options} {socket stdio pcCrash} { removeFile script set f [open script w] puts $f { + package require tls tls::socket -server accept 2820 proc accept args { global x set x done }