test(libkernel_sys): remove links and the fixture without std::filesystem on Windows #7824

Merged
Rajkamalcode merged 1 commit from upstream-pr/7824 into main 2026-10-19 10:52:32 +00:00
Rajkamalcode commented 2026-10-19 09:05:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Rajkamalcode on 2026-10-19T09:05:00Z.


What

guest_kernel_sys fails on Windows: the MinGW libstdc++ std::filesystem::remove reports a dangling symbolic link as missing and clears the error, so removing the test's dangling links fails, and std::filesystem::remove_all loops forever over the fixture tree that contains them (recursive_directory_iterator::__erase keeps retrying an entry it cannot remove while the error stays clear). The test now removes reparse points with DeleteFileW or RemoveDirectoryW (a directory reparse point, which the "..." target creates, is only removed by the latter) and removes the fixture with cmd /c rd /s /q. The gap is recorded in the libs technical debt.

Overlap: #7039 replaces the same final cleanup line in this file with its new RemoveTree helper; this branch is self-contained, and if #7039 lands first I will rebase onto RemoveTree.

Tested

Windows 11, MinGW-w64 GCC 15.2.0 (winlibs), RTX 3070. guest_kernel_sys: failed before (first at the dangling-link removal, then remove_all never returned); ctest -R kernel_sys passes after (Passed, 0.15 s). Only _WIN32 paths change; other hosts keep std::filesystem. The full suite on this machine had 4 failures; the other 3 are unrelated (agc_driver_bda_device is issue #7584, guest_err and guest_math are separate).

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4918488952 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7824). Originally posted by [Rajkamalcode](https://github.com/Rajkamalcode) on 2026-10-19T09:05:00Z. --- ### What `guest_kernel_sys` fails on Windows: the MinGW libstdc++ `std::filesystem::remove` reports a dangling symbolic link as missing and clears the error, so removing the test's dangling links fails, and `std::filesystem::remove_all` loops forever over the fixture tree that contains them (`recursive_directory_iterator::__erase` keeps retrying an entry it cannot remove while the error stays clear). The test now removes reparse points with `DeleteFileW` or `RemoveDirectoryW` (a directory reparse point, which the `"..."` target creates, is only removed by the latter) and removes the fixture with `cmd /c rd /s /q`. The gap is recorded in the libs technical debt. Overlap: #7039 replaces the same final cleanup line in this file with its new `RemoveTree` helper; this branch is self-contained, and if #7039 lands first I will rebase onto `RemoveTree`. ### Tested Windows 11, MinGW-w64 GCC 15.2.0 (winlibs), RTX 3070. `guest_kernel_sys`: failed before (first at the dangling-link removal, then `remove_all` never returned); `ctest -R kernel_sys` passes after (Passed, 0.15 s). Only `_WIN32` paths change; other hosts keep `std::filesystem`. The full suite on this machine had 4 failures; the other 3 are unrelated (`agc_driver_bda_device` is issue #7584, `guest_err` and `guest_math` are separate). ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-19 09:14:58 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-19T09:14:58Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 7412 docs/dev/debt/libs.md L5

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 5021 docs/dev/debt/libs.md
PR 6044 core/libs/tests/GuestKernelSys.cpp
PR 7039 core/libs/tests/GuestKernelSys.cpp
PR 7332 core/libs/tests/GuestKernelSys.cpp
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6263805855 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7824#issuecomment-6263805855). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-19T09:14:58Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | [PR 7412](https://www.github.com/boykopovar/AnyPS5/pull/7412) | `docs/dev/debt/libs.md` [L5](https://github.com/boykopovar/AnyPS5/blob/8816fd772005585886f19b3f6c13a99931e41241/docs/dev/debt/libs.md#L5) | | | Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap. | Pull request | Shared files not compared | |---|---| | [PR 5021](https://www.github.com/boykopovar/AnyPS5/pull/5021) | `docs/dev/debt/libs.md` | | [PR 6044](https://www.github.com/boykopovar/AnyPS5/pull/6044) | `core/libs/tests/GuestKernelSys.cpp` | | [PR 7039](https://www.github.com/boykopovar/AnyPS5/pull/7039) | `core/libs/tests/GuestKernelSys.cpp` | | [PR 7332](https://www.github.com/boykopovar/AnyPS5/pull/7332) | `core/libs/tests/GuestKernelSys.cpp` |
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!7824
No description provided.