Repository navigation
Conversation
Under Wine 11.20 the test aborted with exit 3 before its summary and left a folder that broke the next run, and three checks failed: - The RT-257 unlistable-marker-folder check put the old DACL back through the folder's name. Wine maps the deny to the folder's unix mode (the read bits go) and opens a folder with open(O_RDONLY), so the restore could not open it again; the closing remove_all threw. The deny and the restore now go through one handle opened before the deny (FolderDeny), the restore is checked, the folder name carries a per-run counter next to the process id (Wine reuses small ids in a fresh prefix), and the closing cleanup no longer throws; an exception from a check is reported as a failure and the summary is still printed. - CopyFile2 with a cancel flag already set: Wine's CopyFile2 ignores pfCancel. The shim answered it only in its CopyFileExW fallback; it now answers it before the host's CopyFile2 too. - A case-only rename of an overlay entry: Wine's rename finds the file itself and returns success without changing the case. The test probes the host's MoveFileW and checks the new spelling only where the host changes it; the "listed once" part is checked everywhere. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RT-451 (claim: #5934 (comment), finding: #5934 (comment)).
Under Wine 11.20 on main
561b65a83,file_system_testfails 3 checks besides the 6 MAXIMUM_ALLOWED ones that #5617 fixes. It then exits with code 3 before its summary line and leaves its folder behind, and that folder breaks the next run.Causes
1. Exit 3, and the leftover folder.
FILE_LIST_DIRECTORYonoverlay/.gta6rt-deleted/acl(runtime/test/file_system_test.cpp:292-333on main).sd_to_modeinserver/file.cdrops the owner and group read bits, so the folder becomesd-wx-wxr-x.open(name, O_RDONLY)(server/fd.c,open_fd), which now fails with EACCES. The restore through the folder's name (SetNamedSecurityInfoW,:330) therefore can't open the folder again, and the mode stays as it is.std::filesystem::remove_all(root)(:1159) then throws, so the process ends with exit 3 and prints no summary.remove_allat:121throws too, with no output at all.2.
a cancel flag set before the copy cancels it (host CopyFile2 ...)(:624): a shim gap.CopyFile2ignorespfCancel.dlls/kernelbase/file.c,copy_filelogsFIXME("pfCancel is not supported\n")and copies the file anyway.runtime/shims/file_system.cpp:1228-1229). On a host that hasCopyFile2the call went straight to the host.3.
the listing shows the new case, once(:1137) andthe listing shows the folder's new case(:1152): Wine behaves differently from Windows.MoveFileExW(file_system.cpp:1028-1029).set_fd_name(server/fd.c) sees the same inode and returns success without renaming, so the old spelling stays.Fix
FolderDenyRAII guard opens oneREAD_CONTROL | WRITE_DAChandle before the deny. It applies the deny and restores the old DACL through that handle (GetSecurityInfo/SetSecurityInfo), and the destructor restores it on every way out of the check. A new check confirms the folder can be listed again once the old DACL is back. Windows checks access when a handle is opened, so the handle keepsWRITE_DACthere as well.leonida_file_system_<pid>_<QueryPerformanceCounter>, so an earlier run's folder can't collide with it.remove_allcalls take anerror_code. A folder that can't be removed prints aNOTE.run_checks(). An exception from one of them counts as a failure, and the folder is still removed and the summary still printed.copy_file2answers a cancel flag that is already set withERROR_REQUEST_ABORTEDbefore it calls the host'sCopyFile2, as the fallback did. The duplicate check is removed from the fallback. Windows returns the same, so nothing changes there.host_renames_case()renames a scratch file with the host's ownMoveFileWand lists the folder.SKIP the host's MoveFileW keeps the old case on a case-only rename (Wine): ...and checks only that the entry is listed once.#5617 also edits this test file. This PR doesn't depend on it, and the touched regions are separate:
git merge-treeof the two heads is clean.Tested
All on Linux: clang-cl/lld-link cross-build against xwin, Wine 11.20, fresh prefix, CPU only. Not run on native Windows. A native run of
file_system_testwould confirm that theFolderDenyrestore and the case-rename probe behave as described there.561b65a83:file_system_test: 251 PASS, 9 FAIL, then exit 3 and no summary line.leonida_file_system_32/overlay/.gta6rt-deleted/aclbehind at moded-wx-wxr-x.ctest -R '^file_system$'twice in a row in the same prefix:261 check(s), 6 failure(s). The 6 are the MAXIMUM_ALLOWED checks that file_system: a MAXIMUM_ALLOWED open of the overlay copy can write under Wine (RT-414) #5617 fixes.leonida_file_system_*folder is left behind.267 check(s), 0 failure(s), exit 0, twice in a row.ctest(serial,--timeout 600):vk_pipeline_check_cli.vk_pipeline_check_clithen failed the same way on main when re-run ("expected usage error, got Process terminated due to timeout": Wine's startup hit the 5 s limit). Its binary contains no file this PR changes.shims/file_system.cpp(gta6rt,xgameruntime_*_test) pass.AI-assisted (Claude Code).
🤖 Generated with Claude Code