kernel32/tests: Add tests for deleting readonly files with NtCreateFile.

Sebastian Lackner sebastian at
Wed Apr 29 23:08:28 CDT 2015

Wine currently implements DeleteFile based on NtCreateFile with access mask
GENERIC_READ | GENERIC_WRITE | DELETE, but this is wrong. This test shows that
NtCreateFile with FILE_DELETE_ON_CLOSE should also fail without explicitly
requesting read/write access.

Related to
Test failures with "Test failed: attributes of file "" are 0x0820" are not related to this patch.

 dlls/kernel32/tests/file.c | 77 +++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 76 insertions(+), 1 deletion(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-kernel32-tests-Add-tests-for-deleting-readonly-files.patch
Type: text/x-patch
Size: 6208 bytes
Desc: not available
URL: <>

More information about the wine-patches mailing list