feat(libkernel): enumerate archived app directories #8520

Merged
qpavyros merged 6 commits from upstream-pr/8520 into main 2026-10-26 13:23:40 +00:00
qpavyros commented 2026-10-20 14:48:28 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by qpavyros on 2026-10-20T14:48:28Z.


What

Support archive-only and disk/archive merged directory enumeration through libc and libkernel, preserving disk overrides, shared directory cursors, seek/rewind and native host directories. This is separate from #7447's archive-backed stdio and does not implement console PFS.

The Windows review regressions are addressed: NativeFutimes and NativeSync retain the path-based route for native-backed directory descriptors as well as virtual placeholders. Virtual archive-directory guards remain in place. The rename regression verifies filesystem identity instead of identical path spelling, exercises different Windows drive-letter casing, and rejects the recreated replacement directory. The inode and directory-entry checks remain, while ordinary-directory chmod, timestamp and sync checks now require success explicitly.

Merged current main acb900c194325b9ee8c23c10768a9a491454f0b2 without rewriting the published branch. Merge resolutions use the canonical export headers, including the owning libSceLibcInternal declaration for fdopendir. #8116, #8591 and #9502 are merged; no open dependency remains. The combined tree retains both the pipe and virtual-directory guards from the previously coordinated #9502 overlap.

Tested

Validated source head: 9b2dd8dce9e1da356fd04eadb92b5d5c767e52e2.

  • Windows 11 Pro 10.0.26300, WinLibs GCC 15.2.0 r7, Release, bundled dependencies: 18/18 focused tests passed, including both CI failures guest_file_timestamps and guest_kernel_app_archive_plain.
  • Ubuntu under WSL, GCC 15, Release, bundled dependencies: 16/16 focused tests passed. The native build mirror's modified production and test files match the Windows checkout byte-for-byte.
  • On each host, file timestamps and the kernel archive/plain fixtures each passed 20 consecutive executions (60 executions per host). The archive fixture includes eight concurrent directory readers and validates their start positions.
  • Coverage includes archive modes, native directory identity after rename/recreation, metadata, directory streams/entries, ordinary filesystem behavior, scalar/vector I/O and stat faults. Windows additionally covers directory buffer/rewind/close; Linux covers directory link types.
  • Source conventions and whitespace checks passed. No test was disabled or skipped to bypass either regression. No full suite, title, console or performance result is claimed. A new full GitHub Build requires a maintainer's manual run; these are local focused results.

The native Windows path probe separately demonstrated that a case-variant drive prefix can compare unequal lexically while identifying the same renamed directory, and not the replacement. This proves the test assumption is unsafe; it does not assert the exact spelling observed in the earlier CI failure.

CTest selection on each configured build:

ctest --test-dir <build> -R "^(guest_file_timestamps|guest_kernel_app_archive.*|guest_app_archive.*|guest_filesystem|guest_directory.*|guest_file_vector.*|guest_fstat_fault|guest_posix_scalar_io)$" --output-on-failure
ctest --test-dir <build> -R "^(guest_file_timestamps|guest_kernel_app_archive_(plain|archive))$" --repeat until-fail:20 --output-on-failure
python tools/check_conventions.py --base origin/main
git diff origin/main...HEAD --check

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 (Codex)
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4937559477 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8520). Originally posted by [qpavyros](https://github.com/qpavyros) on 2026-10-20T14:48:28Z. --- ### What Support archive-only and disk/archive merged directory enumeration through libc and libkernel, preserving disk overrides, shared directory cursors, seek/rewind and native host directories. This is separate from #7447's archive-backed stdio and does not implement console PFS. The Windows review regressions are addressed: `NativeFutimes` and `NativeSync` retain the path-based route for native-backed directory descriptors as well as virtual placeholders. Virtual archive-directory guards remain in place. The rename regression verifies filesystem identity instead of identical path spelling, exercises different Windows drive-letter casing, and rejects the recreated replacement directory. The inode and directory-entry checks remain, while ordinary-directory chmod, timestamp and sync checks now require success explicitly. Merged current main `acb900c194325b9ee8c23c10768a9a491454f0b2` without rewriting the published branch. Merge resolutions use the canonical export headers, including the owning libSceLibcInternal declaration for fdopendir. #8116, #8591 and #9502 are merged; no open dependency remains. The combined tree retains both the pipe and virtual-directory guards from the previously coordinated #9502 overlap. ### Tested Validated source head: `9b2dd8dce9e1da356fd04eadb92b5d5c767e52e2`. - Windows 11 Pro 10.0.26300, WinLibs GCC 15.2.0 r7, Release, bundled dependencies: **18/18 focused tests passed**, including both CI failures `guest_file_timestamps` and `guest_kernel_app_archive_plain`. - Ubuntu under WSL, GCC 15, Release, bundled dependencies: **16/16 focused tests passed**. The native build mirror's modified production and test files match the Windows checkout byte-for-byte. - On each host, file timestamps and the kernel archive/plain fixtures each passed 20 consecutive executions (60 executions per host). The archive fixture includes eight concurrent directory readers and validates their start positions. - Coverage includes archive modes, native directory identity after rename/recreation, metadata, directory streams/entries, ordinary filesystem behavior, scalar/vector I/O and stat faults. Windows additionally covers directory buffer/rewind/close; Linux covers directory link types. - Source conventions and whitespace checks passed. No test was disabled or skipped to bypass either regression. No full suite, title, console or performance result is claimed. A new full GitHub Build requires a maintainer's manual run; these are local focused results. The native Windows path probe separately demonstrated that a case-variant drive prefix can compare unequal lexically while identifying the same renamed directory, and not the replacement. This proves the test assumption is unsafe; it does not assert the exact spelling observed in the earlier CI failure. CTest selection on each configured build: ```text ctest --test-dir <build> -R "^(guest_file_timestamps|guest_kernel_app_archive.*|guest_app_archive.*|guest_filesystem|guest_directory.*|guest_file_vector.*|guest_fstat_fault|guest_posix_scalar_io)$" --output-on-failure ctest --test-dir <build> -R "^(guest_file_timestamps|guest_kernel_app_archive_(plain|archive))$" --repeat until-fail:20 --output-on-failure python tools/check_conventions.py --base origin/main git diff origin/main...HEAD --check ``` <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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 <!-- #PR, or none --> - [x] Fixes: none <!-- issue it closes as Fixes #N, or none --> - [x] Unblocks: none <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> - [x] GPUs tested: n/a <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> - [x] AI-assisted: yes (Codex) <!-- yes / no -->
copilot-pull-request-reviewer[bot] commented 2026-10-20 14:48:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by copilot-pull-request-reviewer[bot] on 2026-10-20T14:48:37Z.

Review: COMMENTED


Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5586797236 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8520#pullrequestreview-5586797236). Originally posted by [copilot-pull-request-reviewer[bot]](https://github.com/apps/copilot-pull-request-reviewer) on 2026-10-20T14:48:37Z. **Review:** COMMENTED --- Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
oneandonlydean commented 2026-10-20 15:28:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-20T15:28:34Z.


Thanks, this reads well, and the stacked #8116 part is unchanged. I reviewed only this PR's own share (main + #8116 vs main + this head). Two small things before it can go in:

  1. File number 0 for large inodes. MakeEntry (libc/src/Directory.cpp) and Add (libkernel/File/src/DirectoryDescriptor.cpp) store inode <= UINT32_MAX ? inode : 0. FreeBSD 11's readdir skips any entry whose d_fileno is 0 (lib/libc/gen/readdir.c:83, if (dp->d_ino == 0 && skip) continue;). So on a Linux host whose filesystem hands out 64-bit inode numbers (XFS with inode64, for example), a guest that reads a merged directory through getdents and its own FreeBSD-style readdir silently loses those entries. #8116 already solved this for Windows: WindowsFileNumber_nid_no_patch(std::uint64_t) folds the high half in and never returns 0, and its test requires a nonzero number. Using that same fold, or a shared helper, in both places would keep the two paths consistent.

  2. The g_directoryCount fast path. On main, IsDirectoryDescriptor, ForgetDirectoryDescriptor, DuplicateDirectoryDescriptor and SeekDirectoryDescriptor return before taking g_mutex while no directory descriptor is open (DirectoryDescriptor.cpp:96, :105). This PR removes that and, at the same time, calls IsDirectoryDescriptor at the top of every read/write/pread/pwrite/readv/writev/preadv/pwritev, plus lseek, close and the AIO pread/pwrite, on Linux as well as Windows. So every guest file read now takes one process-wide mutex, even in titles that never open a directory. Keeping the atomic count (incremented in OpenDirectoryDescriptor and DuplicateDirectoryDescriptor, decremented on erase) and checking it before Find restores the old cost.

Neither changes the archive behaviour your tests cover. Please also keep "merge #8116 first" in the description, since this head contains its commit.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6294533126 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8520#issuecomment-6294533126). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-20T15:28:34Z. --- Thanks, this reads well, and the stacked #8116 part is unchanged. I reviewed only this PR's own share (main + #8116 vs main + this head). Two small things before it can go in: 1. **File number 0 for large inodes.** `MakeEntry` (`libc/src/Directory.cpp`) and `Add` (`libkernel/File/src/DirectoryDescriptor.cpp`) store `inode <= UINT32_MAX ? inode : 0`. FreeBSD 11's `readdir` skips any entry whose `d_fileno` is 0 (`lib/libc/gen/readdir.c:83`, `if (dp->d_ino == 0 && skip) continue;`). So on a Linux host whose filesystem hands out 64-bit inode numbers (XFS with inode64, for example), a guest that reads a merged directory through `getdents` and its own FreeBSD-style `readdir` silently loses those entries. #8116 already solved this for Windows: `WindowsFileNumber_nid_no_patch(std::uint64_t)` folds the high half in and never returns 0, and its test requires a nonzero number. Using that same fold, or a shared helper, in both places would keep the two paths consistent. 2. **The `g_directoryCount` fast path.** On main, `IsDirectoryDescriptor`, `ForgetDirectoryDescriptor`, `DuplicateDirectoryDescriptor` and `SeekDirectoryDescriptor` return before taking `g_mutex` while no directory descriptor is open (`DirectoryDescriptor.cpp:96`, `:105`). This PR removes that and, at the same time, calls `IsDirectoryDescriptor` at the top of every `read`/`write`/`pread`/`pwrite`/`readv`/`writev`/`preadv`/`pwritev`, plus `lseek`, `close` and the AIO pread/pwrite, on Linux as well as Windows. So every guest file read now takes one process-wide mutex, even in titles that never open a directory. Keeping the atomic count (incremented in `OpenDirectoryDescriptor` and `DuplicateDirectoryDescriptor`, decremented on erase) and checking it before `Find` restores the old cost. Neither changes the archive behaviour your tests cover. Please also keep "merge #8116 first" in the description, since this head contains its commit.
MarcZX10 commented 2026-10-20 18:42:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-20T18:42:26Z.


One concurrency detail in the Windows sceKernelGetdirentries path: the new code calls SeekDirectoryDescriptor(fd, 0, 1) to set basep, then calls ReadDirectoryDescriptor; those take the directory-state mutex separately. Two threads reading the same descriptor can both observe the same cursor for basep, while the second read consumes entries after the first and should report the advanced start position. Could you add a concurrent-read regression or capture basep from inside ReadDirectoryDescriptor while it holds the state mutex? PR #8591 proposes an optional base out-parameter on that helper, which would make the reported position atomic with the read.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6298459647 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8520#issuecomment-6298459647). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-20T18:42:26Z. --- One concurrency detail in the Windows `sceKernelGetdirentries` path: the new code calls `SeekDirectoryDescriptor(fd, 0, 1)` to set `basep`, then calls `ReadDirectoryDescriptor`; those take the directory-state mutex separately. Two threads reading the same descriptor can both observe the same cursor for `basep`, while the second read consumes entries after the first and should report the advanced start position. Could you add a concurrent-read regression or capture `basep` from inside `ReadDirectoryDescriptor` while it holds the state mutex? PR #8591 proposes an optional base out-parameter on that helper, which would make the reported position atomic with the read.
MarcZX10 commented 2026-10-20 19:30:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-20T19:30:01Z.


Coordination update from #8591: its author says they are happy to rebase onto whichever PR lands first and have no objection to #8520 adopting the ReadDirectoryDescriptor base out-parameter. If you choose to use that helper, they would then reduce #8591 to the Windows test-registration change. Either merge order remains possible; this just gives you the option without duplicating the concurrency-sensitive cursor read.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6299495770 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8520#issuecomment-6299495770). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-20T19:30:01Z. --- Coordination update from #8591: its author says they are happy to rebase onto whichever PR lands first and have no objection to #8520 adopting the `ReadDirectoryDescriptor` base out-parameter. If you choose to use that helper, they would then reduce #8591 to the Windows test-registration change. Either merge order remains possible; this just gives you the option without duplicating the concurrency-sensitive cursor read.
adriadam10 commented 2026-10-21 11:31:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-21T11:31:46Z.

Review: CHANGES_REQUESTED


Thanks for the work. #8116 is merged, and this head now conflicts with main in libkernel/File/src/DirectoryDescriptor.cpp, libkernel/File/src/Stdio.cpp and docs/dev/debt/libkernel.md. These need a real resolution, so please rebase. Three points are still open:

  • File number 0 for large inodes (@oneandonlydean's point, still present): libc/src/Directory.cpp:253 and libkernel/File/src/DirectoryDescriptor.cpp:92 store inode <= UINT32_MAX ? inode : 0. FreeBSD's readdir skips entries with d_fileno == 0 (lib/libc/gen/readdir.c), so entries on filesystems with 64-bit inodes disappear. Reuse the fold from WindowsFileNumber_nid_no_patch (never returns 0), or a shared helper, in both places, and add a test row with an inode above 2^32.
  • g_directoryCount fast path removed: IsDirectoryDescriptor, Forget, Duplicate and Seek used to return before taking g_mutex while no directory was open. Now every read/write/pread/pwrite/readv/writev/lseek/close and the AIO paths take the process-wide mutex. Keep the atomic count (incremented on open/duplicate, decremented on erase) and check it before Find.
  • basep race on Windows (@MarcZX10's point): SeekDirectoryDescriptor(fd, 0, 1) followed by ReadDirectoryDescriptor takes the state mutex twice, so two threads can report the same start position. Capture the base inside the read while the mutex is held (see the out-parameter proposed in #8591), and add a concurrent-read test.

Please keep "merge #8116 first" out of the description now that it has landed, and update Depends on accordingly.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5598996391 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8520#pullrequestreview-5598996391). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-21T11:31:46Z. **Review:** CHANGES_REQUESTED --- Thanks for the work. #8116 is merged, and this head now conflicts with `main` in `libkernel/File/src/DirectoryDescriptor.cpp`, `libkernel/File/src/Stdio.cpp` and `docs/dev/debt/libkernel.md`. These need a real resolution, so please rebase. Three points are still open: - **File number 0 for large inodes** (@oneandonlydean's point, still present): `libc/src/Directory.cpp:253` and `libkernel/File/src/DirectoryDescriptor.cpp:92` store `inode <= UINT32_MAX ? inode : 0`. FreeBSD's `readdir` skips entries with `d_fileno == 0` (`lib/libc/gen/readdir.c`), so entries on filesystems with 64-bit inodes disappear. Reuse the fold from `WindowsFileNumber_nid_no_patch` (never returns 0), or a shared helper, in both places, and add a test row with an inode above 2^32. - **`g_directoryCount` fast path removed**: `IsDirectoryDescriptor`, `Forget`, `Duplicate` and `Seek` used to return before taking `g_mutex` while no directory was open. Now every `read`/`write`/`pread`/`pwrite`/`readv`/`writev`/`lseek`/`close` and the AIO paths take the process-wide mutex. Keep the atomic count (incremented on open/duplicate, decremented on erase) and check it before `Find`. - **`basep` race on Windows** (@MarcZX10's point): `SeekDirectoryDescriptor(fd, 0, 1)` followed by `ReadDirectoryDescriptor` takes the state mutex twice, so two threads can report the same start position. Capture the base inside the read while the mutex is held (see the out-parameter proposed in #8591), and add a concurrent-read test. Please keep "merge #8116 first" out of the description now that it has landed, and update `Depends on` accordingly.
qpavyros commented 2026-10-21 22:57:17 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by qpavyros on 2026-10-21T22:57:17Z.


Addressed in c5e28b09a, after merging main a6dcea927 without force-pushing.

  • Both listing builders and the Windows wrapper use the shared nonzero file-number fold; synthetic >2^32 and zero-fold rows were added.
  • Restored the atomic empty-directory-table fast path and count updates on open, duplication and erase.
  • Retained main's base out-parameter and capture it under the directory-state mutex, including the virtual Linux path. Added an eight-reader regression; the archive fixture passed 20 repetitions on each host.
  • Removed the obsolete #8116 merge-order/dependency instructions; #8116 and #8591 are merged.

Focused validation: Windows 17/17 and WSL Linux 13/13; conventions and diff checks pass. No full-suite or console validation is claimed. The description now contains the current evidence and limits.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6328408313 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8520#issuecomment-6328408313). Originally posted by [qpavyros](https://github.com/qpavyros) on 2026-10-21T22:57:17Z. --- Addressed in c5e28b09a, after merging main a6dcea927 without force-pushing. - Both listing builders and the Windows wrapper use the shared nonzero file-number fold; synthetic >2^32 and zero-fold rows were added. - Restored the atomic empty-directory-table fast path and count updates on open, duplication and erase. - Retained main's base out-parameter and capture it under the directory-state mutex, including the virtual Linux path. Added an eight-reader regression; the archive fixture passed 20 repetitions on each host. - Removed the obsolete #8116 merge-order/dependency instructions; #8116 and #8591 are merged. Focused validation: Windows 17/17 and WSL Linux 13/13; conventions and diff checks pass. No full-suite or console validation is claimed. The description now contains the current evidence and limits.
MarcZX10 commented 2026-10-22 01:29:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T01:29:50Z.


The current overlap scan flags #9502’s sceKernelFchmod pipe guard against your virtual-directory guard in the same function. I reviewed both hunks: the checks are distinct and should compose, but the shared function region needs the repository-required author coordination. Please coordinate with #9502’s author on rebase/merge order and have the dependent PR document Depends on if one must land first.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6330472129 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8520#issuecomment-6330472129). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-22T01:29:50Z. --- The current overlap scan flags #9502’s `sceKernelFchmod` pipe guard against your virtual-directory guard in the same function. I reviewed both hunks: the checks are distinct and should compose, but the shared function region needs the repository-required author coordination. Please coordinate with #9502’s author on rebase/merge order and have the dependent PR document `Depends on` if one must land first.
adriadam10 commented 2026-10-25 06:46:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-25T06:46:46Z.

Review: CHANGES_REQUESTED


The full Build on the exact head (run 40124700259) fails two Windows tests that main does not fail:

  • guest_file_timestamps: update later modification time (guest errno 13) on a directory. Stdio.cpp:190 (NativeFutimes) now takes the path-based route only for IsVirtualDirectoryDescriptor; on main any descriptor with a DirectoryDescriptorPath took it. A native-backed directory descriptor on Windows now falls through to ReOpenFile and fails with EACCES. NativeSync (Stdio.cpp:210) has the same change and probably the same problem. Fix: keep the path-based route for native-backed directory descriptors on Windows too.
  • guest_kernel_app_archive_plain: app0.zar kernel check failed at line 498 (GuestKernelAppArchive.cpp:498, File::DirectoryDescriptorPath(fd) == renamed after renaming an open directory). It holds on Linux (/proc/self/fd) but not on Windows with a native-backed descriptor. Please check what WindowsDescriptorPath_nid_no_patch returns for that descriptor, or relax the check to what Windows can guarantee.

Both tests ran in 0.01-0.03 s, so this is not a timeout or runner problem. The branch also conflicts with current main now, so it needs a rebase on top of the fix. A local Linux run does not cover either path; the Windows job does.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5641901322 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8520#pullrequestreview-5641901322). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-25T06:46:46Z. **Review:** CHANGES_REQUESTED --- The full Build on the exact head (run 40124700259) fails two Windows tests that `main` does not fail: - `guest_file_timestamps`: `update later modification time (guest errno 13)` on a directory. `Stdio.cpp:190` (`NativeFutimes`) now takes the path-based route only for `IsVirtualDirectoryDescriptor`; on `main` any descriptor with a `DirectoryDescriptorPath` took it. A native-backed directory descriptor on Windows now falls through to `ReOpenFile` and fails with EACCES. `NativeSync` (`Stdio.cpp:210`) has the same change and probably the same problem. Fix: keep the path-based route for native-backed directory descriptors on Windows too. - `guest_kernel_app_archive_plain`: `app0.zar kernel check failed at line 498` (`GuestKernelAppArchive.cpp:498`, `File::DirectoryDescriptorPath(fd) == renamed` after renaming an open directory). It holds on Linux (`/proc/self/fd`) but not on Windows with a native-backed descriptor. Please check what `WindowsDescriptorPath_nid_no_patch` returns for that descriptor, or relax the check to what Windows can guarantee. Both tests ran in 0.01-0.03 s, so this is not a timeout or runner problem. The branch also conflicts with current `main` now, so it needs a rebase on top of the fix. A local Linux run does not cover either path; the Windows job does.
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!8520
No description provided.