I left a few comments on the tests. Otherwise, I quite like the patch series. Force-setting the extended attributes on visible-but-starting-with-a-dot files seems like a good compromise to fix the bug at hand without requiring a ton of attribute setting and I couldn't think of any better solution.
This won't fix the case of Wine-created dot files when the show_dot_files option is enabled if the user then disables the option, which again seems like a good compromise.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1148#note_28247
Matteo Bruni (@Mystral) commented about dlls/ntdll/tests/file.c:
> }
>
> +#define lok ok_(__FILE__, line)
> +#define rename_file(h,f) rename_file_(__LINE__,(h),(f))
> +static BOOL rename_file_( int line, HANDLE h, const WCHAR *filename )
> +{
> + FILE_RENAME_INFORMATION *fri;
> + UNICODE_STRING ntpath;
> + IO_STATUS_BLOCK io;
> + NTSTATUS status;
> + BOOLEAN ret;
> + ULONG size;
> +
> + ret = pRtlDosPathNameToNtPathName_U( filename, &ntpath, NULL, NULL );
> + lok( ret, "RtlDosPathNameToNtPathName_U failed\n" );
> + if (!ret) return FALSE;
Please get rid of the ok() and if() {}, we can just assume that the RtlDosPathNameToNtPathName_U() call works correctly (i.e. if it fails we have bigger problems and arguably crashing and burning is better than reporting a failure and silently skipping the test).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1148#note_28242
Matteo Bruni (@Mystral) commented about dlls/ntdll/tests/file.c:
> CloseHandle( h );
> }
>
> +#define lok ok_(__FILE__, line)
> +#define rename_file(h,f) rename_file_(__LINE__,(h),(f))
> +static BOOL rename_file_( int line, HANDLE h, const WCHAR *filename )
I'd avoid these line shenanigans, we now have test contexts to disambiguate ok() calls from different tests.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1148#note_28241