Commit 7ce2a8e0 authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

ntdll: Return STATUS_PENDING from NtReadFile() for async read in case of no buffering.

parent 9dc63ca9
......@@ -5177,9 +5177,9 @@ static void test_overlapped_read(void)
bytes_count = 0xffffffff;
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());
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);
ok(ret, "Unexpected error %u.\n", GetLastError());
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 (async_read && (options & FILE_NO_INTERMEDIATE_BUFFERING) && status == STATUS_SUCCESS)
return STATUS_PENDING;
return status;
}
......
......@@ -742,7 +742,7 @@ static void read_file_test(void)
ResetEvent(event);
status = pNtReadFile(handle, event, apc, &apc_count, &iosb,
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);
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);
......
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