Looks like the parameter validation I added (based on the documentation) breaks a bunch of tests in obscure places - presumably because they were using the API incorrectly.
Do you think it's worth going through and fixing all usages, or should I just remove the validation?
If the tests are breaking, and they currently pass on Windows, presumably the validation is wrong. Microsoft's documentation is not always truthful. Any validation like this that's user-visible should have tests anyway. ``` + if (options & FILE_SYNCHRONOUS_IO_NONALERT) flags |= O_SYNC; + if (options & FILE_SYNCHRONOUS_IO_ALERT) flags |= O_SYNC; ``` That's not the same semantics. FILE_SYNCHRONOUS_IO_* is about whether the I/O operation will return STATUS_SUCCESS or STATUS_PENDING (and we already implement it). It doesn't guarantee that the data will be written to disk. I think the corresponding flag there is actually FILE_WRITE_THROUGH. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9809#note_125974