Commit b9bf5abe authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

ntdll/tests: Fix share mode for some delete-on-close/delete disposition tests.

parent 35ec9211
......@@ -3155,10 +3155,13 @@ static void test_file_disposition_information(void)
todo_wine
ok( res == STATUS_OBJECT_NAME_NOT_FOUND || broken(res == STATUS_DELETE_PENDING), "got %#lx\n", res );
/* can't open the deleted file */
handle2 = CreateFileA(buffer, DELETE, FILE_SHARE_DELETE, NULL, OPEN_EXISTING, 0, 0);
handle2 = CreateFileA(buffer, DELETE, FILE_SHARE_DELETE | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, 0);
todo_wine
ok( handle2 == INVALID_HANDLE_VALUE, "CreateFile should fail\n" );
todo_wine
ok( GetLastError() == ERROR_FILE_NOT_FOUND || broken(GetLastError() == ERROR_ACCESS_DENIED), "got %lu\n", GetLastError());
if (handle2 != INVALID_HANDLE_VALUE)
CloseHandle( handle2);
CloseHandle( handle );
fileDeleted = GetFileAttributesA( buffer ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND;
ok( fileDeleted, "File should have been deleted\n" );
......
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