[PATCH 2/2] ws2_32/tests: test a WSARecv error condition

Mike Kaplinskiy mike.kaplinskiy at gmail.com
Tue Mar 23 21:51:32 CDT 2010


On Tue, Mar 23, 2010 at 3:56 PM, Paul Vriens <paul.vriens.wine at gmail.com> wrote:
> On 03/22/2010 07:56 PM, Mike Kaplinskiy wrote:
>>
>> +
>> +    bret = GetOverlappedResult((HANDLE)dest,&ov,&bytesReturned, FALSE);
>> +    todo_wine ok(!bret&&  GetLastError() == ERROR_NETNAME_DELETED, "Did
>> not get disconnect event: %d, error %d\n", bret, GetLastError());
>
> Hi Mike,
>
> This one fails on Win98 and WinMe with what appears just a different last
> error:
>
> http://test.winehq.org/data/tests/ws2_32:sock.html
>
> Could you have a look?
>
> Maybe it also makes sense to add a SetLastError(0xdeadbeef) before the
> actual call as we are testing the last error afterwards. That way we are
> sure that the last error is indeed set to the expected.
>
> --
> Cheers,
>
> Paul.
>

Hey Paul,

I sent a fix for the failures, turns out win9x overlapped I/O is
broken in that case (it wakes up but says not done...). Setting the
last error would be more correct, but we check GetOverlappedResult
failure codes all over the place this way and it's probably better to
stay consistent with the rest of them.

Thanks for the heads up,
Mike.



More information about the wine-devel mailing list