Tcl Source Code

Check-in [b0639b8475]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

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

Overview
Comment:Relax timing for some socket tests a little bit. Hopefully this fixes the spurious hangs on Travis builds there.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-6-branch
Files: files | file ages | folders
SHA3-256: b0639b8475af2cbbb230568a5156c138cf32d4370efa790834c05c30656974c8
User & Date: jan.nijtmans 2019-04-05 16:46:14
Context
2019-04-05
20:56
Take over recent improvements from libtommath after version 1.1.0. check-in: 57da792f43 user: jan.nijtmans tags: core-8-6-branch
16:46
Relax timing for some socket tests a little bit. Hopefully this fixes the spurious hangs on Travis b... check-in: b0639b8475 user: jan.nijtmans tags: core-8-6-branch
2019-04-02
18:21
Fix gcc warning on 32-bit platforms check-in: df5c902252 user: jan.nijtmans tags: core-8-6-branch
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to tests/socket.test.

   112    112   # additional [after]s in some tests that are not needed on systems that fail
   113    113   # immediately.
   114    114   set t1 [clock milliseconds]
   115    115   catch {socket 127.0.0.1 [randport]}
   116    116   set t2 [clock milliseconds]
   117    117   set lat2 [expr {($t2-$t1)*3}]
   118    118   
   119         -# Use the maximum of the two latency calculations, but at least 100ms
          119  +# Use the maximum of the two latency calculations, but at least 200ms
   120    120   set latency [expr {$lat1 > $lat2 ? $lat1 : $lat2}]
   121         -set latency [expr {$latency > 100 ? $latency : 1000}]
          121  +set latency [expr {$latency > 200 ? $latency : 200}]
   122    122   unset t1 t2 s1 s2 lat1 lat2 server
   123    123   
   124    124   # If remoteServerIP or remoteServerPort are not set, check in the environment
   125    125   # variables for externally set values.
   126    126   #
   127    127   
   128    128   if {![info exists remoteServerIP]} {
................................................................................
   640    640       set s [socket -server accept 0]
   641    641       set sock ""
   642    642   } -body {
   643    643       set s2 [socket $localhost [lindex [fconfigure $s -sockname] 2]]
   644    644       vwait sock
   645    645       puts $s2 one
   646    646       flush $s2
   647         -    after idle {set x 1}
          647  +    after $latency {set x 1}; # Spurious failures in Travis CI, if we do [after idle]
   648    648       vwait x
   649    649       fconfigure $sock -blocking 0
   650    650       set result a:[gets $sock]
   651    651       lappend result b:[gets $sock]
   652    652       fconfigure $sock -blocking 1
   653    653       puts $s2 two
   654    654       flush $s2