feat(libkernel): implement getdtablesize and fix Windows host-tree removal #7039

Merged
nabil88 merged 2 commits from upstream-pr/7039 into main 2026-10-19 17:36:19 +00:00
nabil88 commented 2026-10-17 07:04:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by nabil88 on 2026-10-17T07:04:50Z.


What

Make the Windows test suite pass, implement one missing libkernel export, and stop removing host trees with the MinGW remove_all hang.

  • getdtablesize is implemented in libkernel: it returns the RLIMIT_NOFILE soft limit that getrlimit reports, capped at INT_MAX. The guest_getrlimit test covers it and the debt note is updated.
  • std::filesystem::remove_all in MinGW libstdc++ (GCC 15/16) never terminates on a tree that contains a symlink, because it does not treat a reparse point as a link; the libstdc++ fix is only in GCC 17. core/libs/prx/libc/include/RemoveTree.hpp removes a Windows tree itself (removes a reparse point as the link it is, clears the read-only attribute and retries, reports the first native error) and replaces remove_all in libSceSaveData.native deleteSave, libSceSaveData mount_internal/delete_internal, libSceAppContent ClearDirectory and the guest_kernel_sys temporary tree. Other hosts keep remove_all. The ShaderDiskCache eviction still uses remove_all; it is left to a follow-up because three open pull requests rewrite that file.
  • The hardware-oracle and Windows dependency-diagnostics timeouts are raised so slower hosts do not time out.

Tested

Windows, WinLibs GCC 15.2.0 (the supported toolchain), full build-full suite.

  • 1243 passed, 44 skipped, 14 failed. All 14 failures are AGC/Vulkan execution tests that assert AMD RDNA2/PS5 results; this host only has an Intel HD 620, so they are host compatibilities, not regressions.
  • guest_getrlimit, guest_kernel_sys (0.27 s), guest_savedata_delete, guest_savedata_search and guest_appcontent pass; the conventions and registration checks pass 18/18.

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
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4898127970 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7039). Originally posted by [nabil88](https://github.com/nabil88) on 2026-10-17T07:04:50Z. --- ### What Make the Windows test suite pass, implement one missing libkernel export, and stop removing host trees with the MinGW `remove_all` hang. - `getdtablesize` is implemented in `libkernel`: it returns the `RLIMIT_NOFILE` soft limit that `getrlimit` reports, capped at `INT_MAX`. The `guest_getrlimit` test covers it and the debt note is updated. - `std::filesystem::remove_all` in MinGW libstdc++ (GCC 15/16) never terminates on a tree that contains a symlink, because it does not treat a reparse point as a link; the libstdc++ fix is only in GCC 17. `core/libs/prx/libc/include/RemoveTree.hpp` removes a Windows tree itself (removes a reparse point as the link it is, clears the read-only attribute and retries, reports the first native error) and replaces `remove_all` in `libSceSaveData.native` `deleteSave`, `libSceSaveData` `mount_internal`/`delete_internal`, `libSceAppContent` `ClearDirectory` and the `guest_kernel_sys` temporary tree. Other hosts keep `remove_all`. The `ShaderDiskCache` eviction still uses `remove_all`; it is left to a follow-up because three open pull requests rewrite that file. - The hardware-oracle and Windows dependency-diagnostics timeouts are raised so slower hosts do not time out. ### Tested Windows, WinLibs GCC 15.2.0 (the supported toolchain), full `build-full` suite. - 1243 passed, 44 skipped, 14 failed. All 14 failures are AGC/Vulkan execution tests that assert AMD RDNA2/PS5 results; this host only has an Intel HD 620, so they are host compatibilities, not regressions. - `guest_getrlimit`, `guest_kernel_sys` (0.27 s), `guest_savedata_delete`, `guest_savedata_search` and `guest_appcontent` pass; the conventions and registration checks pass 18/18. ### 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] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
oneandonlydean commented 2026-10-17 07:14:32 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-17T07:14:32Z.


Thanks. The force-push to 0a43b89da dropped the AGC alignas commit (GpuIndirectArgumentsMisalignedWriterAhead), but the PR description still mentions it. Could you update the description to match what the PR now contains? Full CI is running on 0a43b89da.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6231090503 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7039#issuecomment-6231090503). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-17T07:14:32Z. --- Thanks. The force-push to 0a43b89da dropped the AGC alignas commit (GpuIndirectArgumentsMisalignedWriterAhead), but the PR description still mentions it. Could you update the description to match what the PR now contains? Full CI is running on 0a43b89da.
nabil88 commented 2026-10-17 07:20:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by nabil88 on 2026-10-17T07:20:34Z.


Updated when the template was filled in - the description no longer mentions the AGC alignas commit. That fix already landed on main, so it is not part of this PR; the description matches the three commits on 0a43b89da.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6231141704 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7039#issuecomment-6231141704). Originally posted by [nabil88](https://github.com/nabil88) on 2026-10-17T07:20:34Z. --- Updated when the template was filled in - the description no longer mentions the AGC alignas commit. That fix already landed on `main`, so it is not part of this PR; the description matches the three commits on 0a43b89da.
github-actions[bot] commented 2026-10-17 07:30:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-17T07:30:31Z.


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 6819 docs/dev/debt/libc.md L88-89
PR 7780 core/libs/prx/libSceSaveData/SaveDataCore.hpp L1-1326

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 674 CMakeLists.txt
PR 1835 CMakeLists.txt
PR 5021 CMakeLists.txt
docs/dev/debt/libc.md
PR 6044 CMakeLists.txt
core/libs/tests/GuestKernelSys.cpp
PR 6226 docs/dev/debt/libc.md
PR 6469 docs/dev/debt/libc.md
PR 6565 docs/dev/debt/libc.md
PR 6746 CMakeLists.txt
PR 6879 CMakeLists.txt
core/libs/prx/libSceSaveData.native/Export.cpp
PR 6946 CMakeLists.txt
PR 6947 CMakeLists.txt
PR 6977 core/libs/prx/libSceSaveData.native/Export.cpp
PR 7081 docs/dev/debt/libc.md
PR 7201 CMakeLists.txt
PR 7332 CMakeLists.txt
docs/dev/debt/libc.md
PR 7417 docs/dev/debt/libc.md
PR 7473 docs/dev/debt/libc.md
PR 7642 CMakeLists.txt
PR 7715 docs/dev/debt/libc.md
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6231231164 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7039#issuecomment-6231231164). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-17T07:30:31Z. --- <!-- 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 6819](https://www.github.com/boykopovar/AnyPS5/pull/6819) | `docs/dev/debt/libc.md` [L88-89](https://github.com/boykopovar/AnyPS5/blob/ea3e930003fc7931ea274e8cae68a5d87213c987/docs/dev/debt/libc.md#L88-L89) | | | | [PR 7780](https://www.github.com/boykopovar/AnyPS5/pull/7780) | `core/libs/prx/libSceSaveData/SaveDataCore.hpp` [L1-1326](https://github.com/boykopovar/AnyPS5/blob/ea3e930003fc7931ea274e8cae68a5d87213c987/core/libs/prx/libSceSaveData/SaveDataCore.hpp#L1-L1326) | | | 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 674](https://www.github.com/boykopovar/AnyPS5/pull/674) | `CMakeLists.txt` | | [PR 1835](https://www.github.com/boykopovar/AnyPS5/pull/1835) | `CMakeLists.txt` | | [PR 5021](https://www.github.com/boykopovar/AnyPS5/pull/5021) | `CMakeLists.txt`<br>`docs/dev/debt/libc.md` | | [PR 6044](https://www.github.com/boykopovar/AnyPS5/pull/6044) | `CMakeLists.txt`<br>`core/libs/tests/GuestKernelSys.cpp` | | [PR 6226](https://www.github.com/boykopovar/AnyPS5/pull/6226) | `docs/dev/debt/libc.md` | | [PR 6469](https://www.github.com/boykopovar/AnyPS5/pull/6469) | `docs/dev/debt/libc.md` | | [PR 6565](https://www.github.com/boykopovar/AnyPS5/pull/6565) | `docs/dev/debt/libc.md` | | [PR 6746](https://www.github.com/boykopovar/AnyPS5/pull/6746) | `CMakeLists.txt` | | [PR 6879](https://www.github.com/boykopovar/AnyPS5/pull/6879) | `CMakeLists.txt`<br>`core/libs/prx/libSceSaveData.native/Export.cpp` | | [PR 6946](https://www.github.com/boykopovar/AnyPS5/pull/6946) | `CMakeLists.txt` | | [PR 6947](https://www.github.com/boykopovar/AnyPS5/pull/6947) | `CMakeLists.txt` | | [PR 6977](https://www.github.com/boykopovar/AnyPS5/pull/6977) | `core/libs/prx/libSceSaveData.native/Export.cpp` | | [PR 7081](https://www.github.com/boykopovar/AnyPS5/pull/7081) | `docs/dev/debt/libc.md` | | [PR 7201](https://www.github.com/boykopovar/AnyPS5/pull/7201) | `CMakeLists.txt` | | [PR 7332](https://www.github.com/boykopovar/AnyPS5/pull/7332) | `CMakeLists.txt`<br>`docs/dev/debt/libc.md` | | [PR 7417](https://www.github.com/boykopovar/AnyPS5/pull/7417) | `docs/dev/debt/libc.md` | | [PR 7473](https://www.github.com/boykopovar/AnyPS5/pull/7473) | `docs/dev/debt/libc.md` | | [PR 7642](https://www.github.com/boykopovar/AnyPS5/pull/7642) | `CMakeLists.txt` | | [PR 7715](https://www.github.com/boykopovar/AnyPS5/pull/7715) | `docs/dev/debt/libc.md` |
oneandonlydean commented 2026-10-17 10:02:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-17T10:02:24Z.


Thanks for the update. The getdtablesize and timeout commits are unchanged from the reviewed head, and the Windows symlink/junction handling in RemoveTree.hpp looks right. One fix is needed before merge:

The one-argument RemoveTree(path) swallows errors on every host, Linux included (RemoveTree.hpp:55-57 passes an ignored error_code). It replaces a throwing std::filesystem::remove_all in libSceSaveData.native/Export.cpp (deleteSave, ~:259) and in AppContent's ClearDirectory. So when a save delete fails, sceSaveDataDelete now returns SAVE_DATA_OK with the data still on disk. That means the description's "other hosts keep remove_all" holds only for the call sites that pass an error_code.
Fix: make the one-argument overload throw std::filesystem::filesystem_error when the error is set (the old remove_all behaviour), or return the error to the caller the way delete_internal does.

Minor (Windows): in the error_code overload, the range-for over directory_iterator can still throw while incrementing. Iterating with increment(ec) would keep it non-throwing.

Also, the commit message for 557e777cb mentions shader disk cache coverage, which the change doesn't include. Please drop that line.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6232589485 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7039#issuecomment-6232589485). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-17T10:02:24Z. --- Thanks for the update. The getdtablesize and timeout commits are unchanged from the reviewed head, and the Windows symlink/junction handling in `RemoveTree.hpp` looks right. One fix is needed before merge: **The one-argument `RemoveTree(path)` swallows errors on every host, Linux included** (`RemoveTree.hpp:55-57` passes an `ignored` error_code). It replaces a throwing `std::filesystem::remove_all` in `libSceSaveData.native/Export.cpp` (`deleteSave`, ~:259) and in AppContent's `ClearDirectory`. So when a save delete fails, `sceSaveDataDelete` now returns `SAVE_DATA_OK` with the data still on disk. That means the description's "other hosts keep remove_all" holds only for the call sites that pass an error_code. Fix: make the one-argument overload throw `std::filesystem::filesystem_error` when the error is set (the old `remove_all` behaviour), or return the error to the caller the way `delete_internal` does. Minor (Windows): in the error_code overload, the range-for over `directory_iterator` can still throw while incrementing. Iterating with `increment(ec)` would keep it non-throwing. Also, the commit message for 557e777cb mentions shader disk cache coverage, which the change doesn't include. Please drop that line.
screamm commented 2026-10-17 10:03:42 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by screamm on 2026-10-17T10:03:42Z.


Windows 11 Pro 26220, Ryzen 7 5700X, MinGW GCC 15.2.0 (WinLibs r7), Developer Mode on, shell not elevated: head 0a43b89da merged on main 5f61879a9. The PR has since moved to 557e777cb; the getdtablesize and timeout commits are the same there, and the remove_all change moved from the test into RemoveTree.hpp, which I have not built or run. The hang observations below are about the toolchain, so they should still apply.

  • Full default build and libs: pass. guest_kernel_sys, --repeat until-fail:3: 3 of 3 pass (1.35, 0.42, 0.39 s); guest_getrlimit: 3 of 3 pass.
  • The remove_all hang does not reproduce here. On main guest_kernel_sys passes (2 of 2, 0.6 and 1.3 s), and with the remove_all change reverted (everything else from the PR kept, rebuilt, --timeout 120) it passes 3 of 3 again (1.3 to 1.4 s). In this libstdc++, std::filesystem::create_symlink returns "Function not implemented", but the guest symlink path creates real links with ALLOW_UNPRIVILEGED_CREATE, so the test does leave file, dangling, directory and absolute links in the tree when it calls remove_all. A separate probe of remove_all over a tree holding each of those kinds of link (and a two-link loop) also terminates. Two kinds do not hang but return an error and leave the tree behind (a directory link to .: ec=22; a dangling directory link: ec=2); guest_kernel_sys creates neither on Windows. So I cannot confirm the hang on this toolchain, and the negative control shows no difference; if it depends on a specific libstdc++ build or link kind, a note on which would help.
  • ctest -j8 --timeout 120 -E '^agc_driver_|^video_out_flip': 876 listed, 854 pass, 2 skipped, 20 time out on a host that was heavily loaded by other builds (757 s). All 20 pass on serial reruns; none touches the changed files. With the raised limits, conventions_function_bodies* still timed out at 60 s in five of six shards under that load (14 to 47 s serially); hardware_oracle_compare passed in 107 s (limit 120 s) and windows_dependency_diagnostics in 17 s.
  • Timeout raises look justified by the timings above (the old 20 s for hardware_oracle_compare was below its measured 68 s direct run).
  • tools/check_conventions.py --base origin/main and git diff --check pass on 0a43b89da.
  • getdtablesize is NID sZuwaDPATKs in aerolib and the export already existed in libkernel.prx. Local relinked registries: PPSA85300 and PPSA97358 import it; neither calls it on a path that runs, so no title run was done. The new test expects the same formula the implementation uses, so it would not catch a missing host bound.
  • Overlap: #6201 (open, head 873fbe99a) also implements getdtablesize: the same function in Process.cpp, the same assertion in GuestGetrlimit.cpp, the same line in libkernel.md. Each merges cleanly into current main alone; together they conflict in those three files in either order. On Windows both return 8192. They differ elsewhere: #6201 bounds the result by the host getdtablesize() on non-Windows (the macOS case from its review), this PR returns the guest RLIMIT_NOFILE soft limit. CONTRIBUTING allows one open PR per function; I take no position on which one should carry it.

Not checked: 557e777cb itself (RemoveTree.hpp, the save-data and AppContent call sites), macOS and Linux, GPU tests, any title run, the hang on another toolchain.

Written with Claude Code assistance (validation by a subagent, reviewed in this session).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6232602701 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7039#issuecomment-6232602701). Originally posted by [screamm](https://github.com/screamm) on 2026-10-17T10:03:42Z. --- Windows 11 Pro 26220, Ryzen 7 5700X, MinGW GCC 15.2.0 (WinLibs r7), Developer Mode on, shell not elevated: head `0a43b89da` merged on main `5f61879a9`. The PR has since moved to `557e777cb`; the `getdtablesize` and timeout commits are the same there, and the `remove_all` change moved from the test into `RemoveTree.hpp`, which I have not built or run. The hang observations below are about the toolchain, so they should still apply. - Full default build and `libs`: pass. `guest_kernel_sys`, `--repeat until-fail:3`: 3 of 3 pass (1.35, 0.42, 0.39 s); `guest_getrlimit`: 3 of 3 pass. - The `remove_all` hang does not reproduce here. On `main` `guest_kernel_sys` passes (2 of 2, 0.6 and 1.3 s), and with the `remove_all` change reverted (everything else from the PR kept, rebuilt, `--timeout 120`) it passes 3 of 3 again (1.3 to 1.4 s). In this libstdc++, `std::filesystem::create_symlink` returns "Function not implemented", but the guest `symlink` path creates real links with `ALLOW_UNPRIVILEGED_CREATE`, so the test does leave file, dangling, directory and absolute links in the tree when it calls `remove_all`. A separate probe of `remove_all` over a tree holding each of those kinds of link (and a two-link loop) also terminates. Two kinds do not hang but return an error and leave the tree behind (a directory link to `.`: `ec=22`; a dangling directory link: `ec=2`); `guest_kernel_sys` creates neither on Windows. So I cannot confirm the hang on this toolchain, and the negative control shows no difference; if it depends on a specific libstdc++ build or link kind, a note on which would help. - `ctest -j8 --timeout 120 -E '^agc_driver_|^video_out_flip'`: 876 listed, 854 pass, 2 skipped, 20 time out on a host that was heavily loaded by other builds (757 s). All 20 pass on serial reruns; none touches the changed files. With the raised limits, `conventions_function_bodies*` still timed out at 60 s in five of six shards under that load (14 to 47 s serially); `hardware_oracle_compare` passed in 107 s (limit 120 s) and `windows_dependency_diagnostics` in 17 s. - Timeout raises look justified by the timings above (the old 20 s for `hardware_oracle_compare` was below its measured 68 s direct run). - `tools/check_conventions.py --base origin/main` and `git diff --check` pass on `0a43b89da`. - `getdtablesize` is NID `sZuwaDPATKs` in aerolib and the export already existed in `libkernel.prx`. Local relinked registries: PPSA85300 and PPSA97358 import it; neither calls it on a path that runs, so no title run was done. The new test expects the same formula the implementation uses, so it would not catch a missing host bound. - Overlap: #6201 (open, head `873fbe99a`) also implements `getdtablesize`: the same function in `Process.cpp`, the same assertion in `GuestGetrlimit.cpp`, the same line in `libkernel.md`. Each merges cleanly into current main alone; together they conflict in those three files in either order. On Windows both return 8192. They differ elsewhere: #6201 bounds the result by the host `getdtablesize()` on non-Windows (the macOS case from its review), this PR returns the guest `RLIMIT_NOFILE` soft limit. CONTRIBUTING allows one open PR per function; I take no position on which one should carry it. Not checked: `557e777cb` itself (`RemoveTree.hpp`, the save-data and AppContent call sites), macOS and Linux, GPU tests, any title run, the hang on another toolchain. Written with Claude Code assistance (validation by a subagent, reviewed in this session).
jotitadev commented 2026-10-18 10:09:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by jotitadev on 2026-10-18T10:09:54Z.

Review: COMMENTED


Linux run, since the description lists only Windows. getdtablesize and the remove_all fallback of RemoveTree are the parts that run on Linux.

Machine: Linux x86_64, i7-8700, Ubuntu 26.04, GCC 15.2, Release, BUILD_TESTING=ON, full build.
Head 3b744c269 merged onto main 9caecfd2d (clean merge).

  • guest_getrlimit, guest_kernel_sys, the savedata and appcontent tests and windows_dependency_diagnostics pass (ctest -R "getrlimit|kernel_sys|savedata|appcontent|dependency_diag|windows_dep", 16 tests).
  • GuestGetrlimit.cpp only, on main: aborts with getdtablesize_nid_postfix not implemented, so the updated check exercises the new code.
  • Non-GPU suite (ctest -E "^agc|gpu|vulkan|video_out"): 712/712, same as main.

Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5562496036 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7039#pullrequestreview-5562496036). Originally posted by [jotitadev](https://github.com/jotitadev) on 2026-10-18T10:09:54Z. **Review:** COMMENTED --- Linux run, since the description lists only Windows. `getdtablesize` and the `remove_all` fallback of `RemoveTree` are the parts that run on Linux. Machine: Linux x86_64, i7-8700, Ubuntu 26.04, GCC 15.2, Release, `BUILD_TESTING=ON`, full build. Head `3b744c269` merged onto `main` `9caecfd2d` (clean merge). - `guest_getrlimit`, `guest_kernel_sys`, the savedata and appcontent tests and `windows_dependency_diagnostics` pass (`ctest -R "getrlimit|kernel_sys|savedata|appcontent|dependency_diag|windows_dep"`, 16 tests). - `GuestGetrlimit.cpp` only, on `main`: aborts with `getdtablesize_nid_postfix not implemented`, so the updated check exercises the new code. - Non-GPU suite (`ctest -E "^agc|gpu|vulkan|video_out"`): 712/712, same as `main`. Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
oneandonlydean commented 2026-10-18 10:21:58 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-18T10:21:58Z.


Thanks for the rebase. It's a clean rebase with no code changes, so the two points from our review are still open:

  • the one-argument RemoveTree(path) still drops errors silently, on every host including Linux;
  • on Windows the error_code overload can still throw mid-walk, because the range-for over directory_iterator uses the throwing operator++.

Could you push a fix for both? We'll re-review and run CI as soon as it lands.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6248703332 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7039#issuecomment-6248703332). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-18T10:21:58Z. --- Thanks for the rebase. It's a clean rebase with no code changes, so the two points from our review are still open: - the one-argument `RemoveTree(path)` still drops errors silently, on every host including Linux; - on Windows the `error_code` overload can still throw mid-walk, because the range-for over `directory_iterator` uses the throwing `operator++`. Could you push a fix for both? We'll re-review and run CI as soon as it lands.
oneandonlydean commented 2026-10-18 22:51:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-18T22:51:55Z.


A friendly check-in: the two points from our review are still open on 3b744c269b:

  • the one-argument RemoveTree(path) still drops errors silently, on every host including Linux;
  • on Windows the error_code overload can still throw mid-walk, because the range-for over directory_iterator uses the throwing operator++.

The branch also conflicts with main now, so it needs a rebase too. Could you push the fix together with the rebase? We'll re-review and run CI as soon as it lands.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6256164845 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7039#issuecomment-6256164845). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-18T22:51:55Z. --- A friendly check-in: the two points from our review are still open on 3b744c269b: - the one-argument `RemoveTree(path)` still drops errors silently, on every host including Linux; - on Windows the `error_code` overload can still throw mid-walk, because the range-for over `directory_iterator` uses the throwing `operator++`. The branch also conflicts with `main` now, so it needs a rebase too. Could you push the fix together with the rebase? We'll re-review and run CI as soon as it lands.
Rajkamalcode commented 2026-10-19 09:05:33 +00:00 (Migrated from github.com)

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


Overlap note: I've opened #7824, which fixes the Windows failures in GuestKernelSys.cpp (dangling symbolic link removals) and replaces the same final std::filesystem::remove_all(root) cleanup this PR handles with RemoveTree. No dependency either way; if this lands first I'll rebase #7824 onto RemoveTree.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6263637597 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7039#issuecomment-6263637597). Originally posted by [Rajkamalcode](https://github.com/Rajkamalcode) on 2026-10-19T09:05:33Z. --- Overlap note: I've opened #7824, which fixes the Windows failures in `GuestKernelSys.cpp` (dangling symbolic link removals) and replaces the same final `std::filesystem::remove_all(root)` cleanup this PR handles with `RemoveTree`. No dependency either way; if this lands first I'll rebase #7824 onto `RemoveTree`.
adriadam10 commented 2026-10-19 17:37:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-19T17:37:39Z.


Rebased onto current main and addressed both open review points as our own commit on your branch:

  • Dropped the getdtablesize commit: it landed in #6201.
  • RemoveTree(path) (one argument) now throws std::filesystem::filesystem_error on failure on every host, like the remove_all it replaces, so sceSaveDataDelete no longer reports success when the delete failed.
  • The Windows walk uses directory_iterator::increment(error_code&), so the error_code overload no longer throws mid-walk.
  • The GuestKernelSys cleanup calls RemoveTree instead of the cmd /c rd workaround from #7824.

Full ctest passes after the rebase; the Build run covers Windows; merged.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6273357466 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7039#issuecomment-6273357466). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-19T17:37:39Z. --- Rebased onto current `main` and addressed both open review points as our own commit on your branch: - Dropped the `getdtablesize` commit: it landed in #6201. - `RemoveTree(path)` (one argument) now throws `std::filesystem::filesystem_error` on failure on every host, like the `remove_all` it replaces, so `sceSaveDataDelete` no longer reports success when the delete failed. - The Windows walk uses `directory_iterator::increment(error_code&)`, so the `error_code` overload no longer throws mid-walk. - The `GuestKernelSys` cleanup calls `RemoveTree` instead of the `cmd /c rd` workaround from #7824. Full ctest passes after the rebase; the Build run covers Windows; merged.
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!7039
No description provided.