(resend) [1/2] kernel32/tests: Add tests for CreateFile errors and opening volumes
Guy Albertelli
galberte at neo.rr.com
Tue Jun 2 19:06:14 CDT 2009
On Tue, 2009-06-02 at 13:17 +0200, Alexandre Julliard wrote:
> Guy Albertelli <galberte at neo.rr.com> writes:
>
> > + hFile = CreateFileA( filename, GENERIC_READ | GENERIC_WRITE,
> > + FILE_SHARE_READ | FILE_SHARE_WRITE,
> > + NULL, OPEN_EXISTING,
> > + p[i].options, NULL );
> > + if (p[i].todo_flag)
> > + todo_wine ok((hFile == INVALID_HANDLE_VALUE && p[i].err == GetLastError()) ||
> > + (hFile != INVALID_HANDLE_VALUE && p[i].err == ERROR_SUCCESS),
> > + "CreateFileA failed on %s, hFile %p, err=%u, should be %u\n",
> > + filename, hFile, GetLastError(), p[i].err);
> > + else
> > + ok((hFile == INVALID_HANDLE_VALUE && p[i].err == GetLastError()) ||
> > + (hFile != INVALID_HANDLE_VALUE && p[i].err == ERROR_SUCCESS),
> > + "CreateFileA failed on %s, hFile %p, err=%u, should be %u\n",
> > + filename, hFile, GetLastError(), p[i].err);
>
> You need to handle access denied errors here too. You can't assume that
> you can always open a drive for read/write access.
>
Thanks, will cleanup and resubmit.
Guy
More information about the wine-devel
mailing list