ntdll: Return STATUS_PENDING from NtReadFile() for async read in case of no buffering.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=31954 Signed-off-by: Paul Gofman <gofmanp@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
9dc63ca981
commit
7ce2a8e0ae
|
@ -5177,9 +5177,9 @@ static void test_overlapped_read(void)
|
||||||
|
|
||||||
bytes_count = 0xffffffff;
|
bytes_count = 0xffffffff;
|
||||||
ret = ReadFile(hfile, buffer, TEST_OVERLAPPED_READ_SIZE, &bytes_count, &ov);
|
ret = ReadFile(hfile, buffer, TEST_OVERLAPPED_READ_SIZE, &bytes_count, &ov);
|
||||||
todo_wine ok(!ret && GetLastError() == ERROR_IO_PENDING,
|
ok(!ret && GetLastError() == ERROR_IO_PENDING,
|
||||||
"Unexpected ReadFile result, ret %#x, GetLastError() %u.\n", ret, GetLastError());
|
"Unexpected ReadFile result, ret %#x, GetLastError() %u.\n", ret, GetLastError());
|
||||||
todo_wine ok(!bytes_count, "Unexpected read size %u.\n", bytes_count);
|
ok(!bytes_count, "Unexpected read size %u.\n", bytes_count);
|
||||||
ret = GetOverlappedResult(hfile, &ov, &bytes_count, TRUE);
|
ret = GetOverlappedResult(hfile, &ov, &bytes_count, TRUE);
|
||||||
ok(ret, "Unexpected error %u.\n", GetLastError());
|
ok(ret, "Unexpected error %u.\n", GetLastError());
|
||||||
ok(bytes_count == TEST_OVERLAPPED_READ_SIZE, "Unexpected read size %u.\n", bytes_count);
|
ok(bytes_count == TEST_OVERLAPPED_READ_SIZE, "Unexpected read size %u.\n", bytes_count);
|
||||||
|
|
|
@ -1014,7 +1014,8 @@ err:
|
||||||
}
|
}
|
||||||
|
|
||||||
if (send_completion) NTDLL_AddCompletion( hFile, cvalue, status, total );
|
if (send_completion) NTDLL_AddCompletion( hFile, cvalue, status, total );
|
||||||
|
if (async_read && (options & FILE_NO_INTERMEDIATE_BUFFERING) && status == STATUS_SUCCESS)
|
||||||
|
return STATUS_PENDING;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -742,7 +742,7 @@ static void read_file_test(void)
|
||||||
ResetEvent(event);
|
ResetEvent(event);
|
||||||
status = pNtReadFile(handle, event, apc, &apc_count, &iosb,
|
status = pNtReadFile(handle, event, apc, &apc_count, &iosb,
|
||||||
aligned_buffer, sizeof(aligned_buffer), &offset, NULL);
|
aligned_buffer, sizeof(aligned_buffer), &offset, NULL);
|
||||||
todo_wine ok(status == STATUS_PENDING, "Wrong status %x.\n", status);
|
ok(status == STATUS_PENDING, "Wrong status %x.\n", status);
|
||||||
WaitForSingleObject(event, 1000);
|
WaitForSingleObject(event, 1000);
|
||||||
ok(U(iosb).Status == STATUS_SUCCESS, "Wrong status %x.\n", U(iosb).Status);
|
ok(U(iosb).Status == STATUS_SUCCESS, "Wrong status %x.\n", U(iosb).Status);
|
||||||
ok(iosb.Information == sizeof(aligned_buffer), "Wrong info %lu.\n", iosb.Information);
|
ok(iosb.Information == sizeof(aligned_buffer), "Wrong info %lu.\n", iosb.Information);
|
||||||
|
|
Loading…
Reference in New Issue