diff --git a/dlls/kernel32/tests/comm.c b/dlls/kernel32/tests/comm.c index 97ec79443fb..6b0c3ede60b 100644 --- a/dlls/kernel32/tests/comm.c +++ b/dlls/kernel32/tests/comm.c @@ -2151,13 +2151,9 @@ static void test_read_write(void) iob.Information = -1; offset.QuadPart = (LONGLONG)i; status = pNtReadFile(hcom, 0, NULL, NULL, &iob, buf, 0, &offset, NULL); - /* FIXME: Remove once Wine is fixed */ - if (status == STATUS_PENDING) WaitForSingleObject(hcom, TIMEOUT); if (i >= 0) { -todo_wine ok(status == STATUS_SUCCESS, "%d: expected STATUS_SUCCESS, got %#x\n", i, status); -todo_wine ok(U(iob).Status == STATUS_SUCCESS, "%d: expected STATUS_SUCCESS, got %#x\n", i, U(iob).Status); ok(iob.Information == 0, "%d: expected 0, got %lu\n", i, iob.Information); } diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c index 3883e5aa5db..46fea510298 100644 --- a/dlls/ntdll/file.c +++ b/dlls/ntdll/file.c @@ -883,6 +883,11 @@ NTSTATUS WINAPI NtReadFile(HANDLE hFile, HANDLE hEvent, status = length ? STATUS_END_OF_FILE : STATUS_SUCCESS; goto done; case FD_TYPE_SERIAL: + if (!length) + { + status = STATUS_SUCCESS; + goto done; + } break; default: status = STATUS_PIPE_BROKEN;