http://bugs.winehq.org/show_bug.cgi?id=28269
Summary: ws2_32: sock.ok test slow Product: Wine Version: 1.3.27 Platform: x86 OS/Version: Linux Status: NEW Severity: enhancement Priority: P2 Component: winsock AssignedTo: wine-bugs@winehq.org ReportedBy: dank@kegel.com
The ws2_32 sock tests take 30 to 55 seconds to run here. This is currently the slowest test in the suite.
http://bugs.winehq.org/show_bug.cgi?id=28269
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |00cpxxx@gmail.com
--- Comment #1 from Bruno Jesus 00cpxxx@gmail.com 2011-09-03 17:40:41 CDT --- Is it a really bad problem? My summary shows: sock: 2108231 tests executed (22 marked as todo, 0 failures), 0 skipped.
It does more than 2.000.000 tests, although most of them are receives of 1 byte to test the sockets implementation stability (as far as I can see). It sends 1Mb and then receives one byte at a time, maybe by reducing this buffer length the tests could complete much faster.
From tests/sock.c:
3005 const int buflen = 1024*1024; .. 3046 ret = send(src, buffer, buflen, 0); ... 3068 for (i = 0; i < buflen; ++i) 3069 { 3070 int j = 0; 3071 3072 ret = recv(src, buffer, 1, 0); 3073 while (ret == SOCKET_ERROR && GetLastError() == WSAEWOULDBLOCK && j < 100) 3074 { 3075 j++; 3076 Sleep(50); 3077 ret = recv(src, buffer, 1, 0); 3078 }
There are several Sleeps() and WaitForSingleObjects with values ranging from 50 to 1000 (ms).
https://bugs.winehq.org/show_bug.cgi?id=28269
--- Comment #2 from Bruno Jesus 00cpxxx@gmail.com --- Still in wine 1.7.15.
https://bugs.winehq.org/show_bug.cgi?id=28269
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|ws2_32: sock.ok test slow |ws2_32:sock test slow Keywords| |source, testcase CC| |fgouget@codeweavers.com