From 1bdeaea06e156311beb3940ea3b4d31d737da50a Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 28 Oct 2004 04:16:19 +0000 Subject: * tests/socket.test (socket-13.1): Balanced [makeFile] and [removeFile] commands. * generic/tclCmdAH.c (Tcl_FormatObjCmd): Restored missing line from yesterdays' 868486 backport that caused failed alloc's on LP64 systems. --- ChangeLog | 4 ++++ generic/tclCmdAH.c | 3 ++- tests/socket.test | 21 ++++++++++----------- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index bf7f3dc..84eec09 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2004-10-27 Don Porter + * generic/tclCmdAH.c (Tcl_FormatObjCmd): Restored missing + line from yesterdays' 868486 backport that caused failed alloc's + on LP64 systems. + * tests/appendComp.test: Backport test suite fixes of errors * tests/autoMkindex.test: revealed by -singleproc 1 -debug 1 * tests/exec.test: options to make test. diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index 4c43b87..c015b1b 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdAH.c,v 1.27.2.9 2004/10/27 15:39:35 kennykb Exp $ + * RCS: @(#) $Id: tclCmdAH.c,v 1.27.2.10 2004/10/28 04:16:20 dgp Exp $ */ #include "tclInt.h" @@ -2220,6 +2220,7 @@ Tcl_FormatObjCmd(dummy, interp, objc, objv) newPtr[-2] = 'l'; #endif /* LONG_MAX > INT_MAX */ whichValue = INT_VALUE; + size = 40 + precision; break; case 's': /* diff --git a/tests/socket.test b/tests/socket.test index ab5c89c..f1777a3 100644 --- a/tests/socket.test +++ b/tests/socket.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: socket.test,v 1.26.2.3 2004/07/16 19:20:25 andreas_kupries Exp $ +# RCS: @(#) $Id: socket.test,v 1.26.2.4 2004/10/28 04:16:22 dgp Exp $ # Running socket tests with a remote server: # ------------------------------------------ @@ -1627,12 +1627,11 @@ test socket-12.3 {testing inheritance of accepted sockets} {socket stdio exec} { } {accepted socket was not inherited} test socket-13.1 {Testing use of shared socket between two threads} \ - {socket testthread} { + -constraints {socket testthread} -setup { - file delete $path(script1) threadReap - makeFile { + set path(script) [makeFile { set f [socket -server accept 0] set listen [lindex [fconfigure $f -sockname] 2] proc accept {s a p} { @@ -1657,10 +1656,11 @@ test socket-13.1 {Testing use of shared socket between two threads} \ # thread cleans itself up. testthread exit - } script - + } script] + +} -body { # create a thread - set serverthread [testthread create { source script } ] + set serverthread [testthread create { source $path(script) } ] update set port [testthread send $serverthread {set listen}] update @@ -1678,10 +1678,9 @@ test socket-13.1 {Testing use of shared socket between two threads} \ after 2000 lappend result [threadReap] - - set result - -} {hello 1} +} -cleanup { + removeFile script +} -result {hello 1} removeFile script1 removeFile script2 -- cgit v0.12