Commit dbd9c8db authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

kernel32: Skip the comm test if the found com port doesn't respond.

parent 4fb82e37
......@@ -679,7 +679,17 @@ static HANDLE test_OpenComm(BOOL doOverlap)
}
if (hcom != INVALID_HANDLE_VALUE)
{
ok(ClearCommError(hcom,&errors,&comstat), "Unexpected errors on open\n");
BOOL ret;
ret = ClearCommError(hcom, &errors, &comstat);
if (!ret && GetLastError() == ERROR_NOT_READY)
{
trace("%s doesn't respond, skipping the test\n", port_name);
CloseHandle(hcom);
return INVALID_HANDLE_VALUE;
}
ok(ret, "Unexpected error %u on open\n", GetLastError());
ok(comstat.cbInQue == 0, "Unexpected %d chars in InQueue\n",comstat.cbInQue);
ok(comstat.cbOutQue == 0, "Still pending %d charcters in OutQueue\n", comstat.cbOutQue);
ok(errors == 0, "Unexpected errors 0x%08x\n", errors);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment