Tcl Source Code

View Ticket
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Ticket UUID: 42d50ebd0c001f77a55fbed21f469a57d85f2526
Title: Unix test results on socket -async depend on timing and network configuration
Type: Bug Version: 8.6.4
Submitter: oehhar Created on: 2015-05-29 12:52:08
Subsystem: 25. Channel System Assigned To: nobody
Priority: 5 Medium Severity: Minor
Status: Open Last Modified: 2015-05-29 12:52:08
Resolution: None Closed By: nobody
    Closed on:
Description:

Bug [13d3af3ad] was started as a windows bug and is fixed, but contains many information about the following unix issue. I decided to close the upper bug and continue the discussion for Unix in this thread.

'socket -async' tests all IPs available for a certain host until one succeeds. This list might be quite long if IPV6 is used. The test (failure) may take minuits if internet is involved until microseconds on the localhost.

In the scope of this, it is difficult to test the internal functioning of 'socket -async' and the interaction with other commands gets/read/puts/fconfigure/close/eof.

In addition, the tcl channel system is demanded in a high level, as "E_WOULDBLOCK" is returned internally while the connection is in progress. This may result in a pile of buffered writes and buffered errors, which should show up later.

So the issue of this ticket is:

  • failing tests with some configurations on unix: socket-14.2, socket-14.7.0, socket-14.7.2, socket-14.8.2,socket-14.11.0, socket-14.11.1, socket-14.12, socket-14.14, socket-14.15, socket_inet-2.13, http-4.14. Details are in the comments of bug [13d3af3ad]
  • unix and macos only. Windows takes around one second to fail a localhost connect, enough time for all tests to pass.

Solutions are:

  • Control the processing by a test command. Implemented in this branch: [robust-async-connect-tests]

See also: http://wiki.tcl.tk/39687