On Fri, Dec 01, 2017 at 10:18:19AM +0800, Dmitry Timoshkov wrote:
Andrew Eikum aeikum@codeweavers.com wrote:
- /* start read at EOF */
- memset( &ovl, 0, sizeof(ovl) );
- S(U(ovl)).OffsetHigh = 0;
- S(U(ovl)).Offset = si.dwPageSize;
- memset( fse, 0, sizeof(fse) );
- fse[0].Buffer = rbuf1;
- br = ReadFileScatter( hfile, fse, si.dwPageSize, NULL, &ovl );
- ok( br == FALSE, "ReadFileScatter should have failed\n" );
- ok( GetLastError() == ERROR_HANDLE_EOF ||
GetLastError() == ERROR_IO_PENDING, "ReadFileScatter gave wrong error %u\n", GetLastError() );
A test needs to reset last error before an API call if the error code is going to be checked after that. Existing tests also fail to do this, so they should be fixed as well.
Thanks for the review. I'll add that to the existing tests, and onto the new ones.
Andrew