Ticket UUID: | 523470 | |||
Title: | socket-2.5 failure: timing sensitive | |||
Type: | Bug | Version: | obsolete: 8.4a4 | |
Submitter: | dgp | Created on: | 2002-02-27 16:56:33 | |
Subsystem: | 27. Channel Types | Assigned To: | dgp | |
Priority: | 5 Medium | Severity: | ||
Status: | Closed | Last Modified: | 2002-04-16 06:28:23 | |
Resolution: | Fixed | Closed By: | dgp | |
Closed on: | 2002-04-15 23:28:23 | |||
Description: |
The test socket-2.7 can fail on slow machines because a timeout occurs before the client-server activity being tested can complete. Here's a patch that lengthens the timeout to avoid the problem, and also modifies the output when a timeout occurs so that it's more obvious why the test is failing. | |||
User Comments: |
dgp added on 2002-04-16 06:28:23:
Logged In: YES user_id=80530 well. maybe not. At least a simple [time] on [socket] does not show a big difference. But there is a *huge* difference in the time required to complete socket.test in Tcl 8.3 and in Tcl 8.4. tests pass now, so that's good enough for me; someone else can track down the mystery. dgp added on 2002-04-16 06:21:15: Logged In: YES user_id=80530 The increased delay appear to be necessary because the tests were re-written to stop using hard-coded ports and start asking for a free port from the OS by opening "port 0". Apparently, searching for a free port to return can take a ****LOOOOONNNNNNGGGG**** time. dgp added on 2002-04-16 06:13:57: Logged In: YES user_id=80530 fixed in HEAD (8.4a5) dgp added on 2002-04-16 06:05:52: File Added - 21251: 523470.patch Logged In: YES user_id=80530 Here's a patch that increases timeout values so that I no longer see failures even when I make my machine busy. Conceivably, the socket.test file could be further improved by actually timing how long a particular operations takes, and then using the measured data to determine "good" values for the timeouts. This patch should do until someone tries something better, though. dgp added on 2002-04-16 05:35:04: Logged In: YES user_id=80530 that patch appears to correct the failure of socket-2.1 and socket-2.5 on my machine (when busy). A similar change corrects a similar problem with test socket-2.2. socket-12.2 remains a problem. I see it fail frequently, even when my machine is not particularly busy. andreas_kupries added on 2002-04-02 01:54:54: File Added - 20397: 523470.diff Logged In: YES user_id=75003 Enclosed a patch for 2.1 and 2.5 passing the testsuite on the local machine. I did not change anything for test 12.2. This one is more complicated and I currently see no obvioud place where I am allowed to extend the timeout value. dgp added on 2002-03-21 02:02:17: Logged In: YES user_id=80530 I'm seeing socket-2.1 and socket-12.2 fail occasionally too. dgp added on 2002-03-05 08:13:24: Logged In: YES user_id=80530 re-opening this because test socket-2.5 has similar timing sensitivity. Should look over all the socket-* tests for similar trouble. andreas_kupries added on 2002-02-28 03:56:27: Logged In: YES user_id=75003 Committed to HEAD. dgp added on 2002-02-27 23:56:34: File Added - 18527: socktest.patch |