Dmitry Timoshkov : kernel32: Skip the comm test if the found com port doesn 't respond.
Module: wine Branch: master Commit: dbd9c8db5157458ef2edba4bca883079449f780a URL: http://source.winehq.org/git/wine.git/?a=commit;h=dbd9c8db5157458ef2edba4bca... Author: Dmitry Timoshkov <dmitry(a)codeweavers.com> Date: Wed Sep 12 15:06:09 2007 +0900 kernel32: Skip the comm test if the found com port doesn't respond. --- dlls/kernel32/tests/comm.c | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/dlls/kernel32/tests/comm.c b/dlls/kernel32/tests/comm.c index 01ba2b9..66fc770 100644 --- a/dlls/kernel32/tests/comm.c +++ b/dlls/kernel32/tests/comm.c @@ -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);
participants (1)
-
Alexandre Julliard