[PATCH 1/3] ntdll: NtReadFileScatter results are reported asynchronously

Dmitry Timoshkov dmitry at baikal.ru
Thu Nov 30 20:18:19 CST 2017


Andrew Eikum <aeikum at 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.

-- 
Dmitry.



More information about the wine-devel mailing list