tests: guest_filesystem's failure message reports the guest errno even when a host call failed #3178

Closed
opened 2026-10-11 00:17:48 +00:00 by reyani-dev · 1 comment
reyani-dev commented 2026-10-11 00:17:48 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by reyani-dev on 2026-10-11T00:17:48Z.


GuestFilesystem.cpp's Check (behind Require) prints Filesystem check failed at line N (guest errno E) for every failed check. When the failing expression is a host call, the guest errno is whatever an earlier guest call left behind, so the message points away from the cause. An example is the CreateSymbolicLinkW checks at line 276 on main 59a8cbab.

Concretely, on a Windows machine without the symlink privilege, CreateSymbolicLinkW failed with ERROR_PRIVILEGE_NOT_HELD (1314), and the message read (guest errno 14). #3169 skips those link checks when the privilege is missing, but it doesn't change the message.

Possible directions: print the guest errno only for checks on guest calls, or also print GetLastError()/errno on host-side checks. Other tests use the same Check pattern (GuestKernelSync, GuestDirectory, …), so a shared helper may fit better than one test at a time.

Raised by @Dextroid17's review of #3169. AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5796525587 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3178). Originally posted by [reyani-dev](https://github.com/reyani-dev) on 2026-10-11T00:17:48Z. --- `GuestFilesystem.cpp`'s `Check` (behind `Require`) prints `Filesystem check failed at line N (guest errno E)` for every failed check. When the failing expression is a host call, the guest errno is whatever an earlier guest call left behind, so the message points away from the cause. An example is the `CreateSymbolicLinkW` checks at line 276 on `main` 59a8cbab. Concretely, on a Windows machine without the symlink privilege, `CreateSymbolicLinkW` failed with `ERROR_PRIVILEGE_NOT_HELD` (1314), and the message read `(guest errno 14)`. #3169 skips those link checks when the privilege is missing, but it doesn't change the message. Possible directions: print the guest errno only for checks on guest calls, or also print `GetLastError()`/`errno` on host-side checks. Other tests use the same `Check` pattern (`GuestKernelSync`, `GuestDirectory`, …), so a shared helper may fit better than one test at a time. Raised by @Dextroid17's review of #3169. AI-assisted: yes.
MarcZX10 commented 2026-10-11 04:53:58 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-11T04:53:58Z.


Opened PR #3276 with the diagnostic update. guest_filesystem passes locally on Linux Release (GCC 12.2), and the native error is captured before reading guest errno.

I could not compile the Windows-specific branch locally because MinGW is unavailable in this environment; the PR description records that limit.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6105603872 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3178#issuecomment-6105603872). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-11T04:53:58Z. --- Opened [PR #3276](https://github.com/boykopovar/AnyPS5/pull/3276) with the diagnostic update. `guest_filesystem` passes locally on Linux Release (GCC 12.2), and the native error is captured before reading guest `errno`. I could not compile the Windows-specific branch locally because MinGW is unavailable in this environment; the PR description records that limit.
Sign in to join this conversation.
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#3178
No description provided.