Zebediah Figura (@zfigura) commented about dlls/kernel32/tests/file.c:
+ CreateDirectoryA(tmp_path, NULL); + + strcpy(path_src, tmp_path); + strcpy(path_dest, tmp_path); + strcat (path_src, "testfile.ext.ext2"); + strcat (path_dest, "testfile2.ext.ext2"); + + handle = CreateFileA(path_src, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0); + for (i = 0; i < 7000; i++) + { + snprintf(buffer, 70000, "%s%s", buffer, ten); + } + for (i = 0; i < 10; i++) + { + ok(WriteFile(handle, buffer, strlen(buffer), NULL, NULL), "Could not write to file"); + } Why bother filling the file with specific data if you're not going to validate it? Either it's worth validating (probably not) or you can just do e.g. SetFilePointer() + SetEndOfFile().
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/145#note_15579