Tests: guest_freebsd_clocks aborts where the host zone is not UTC #12736

Closed
opened 2026-10-29 06:04:13 +00:00 by bunbeans2-arch · 0 comments
bunbeans2-arch commented 2026-10-29 06:04:13 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by bunbeans2-arch on 2026-10-29T06:04:13Z.


What happens

guest_freebsd_clocks aborts (0xc0000409) on any machine whose zone is not UTC: KernelTimezoneIsUtc (core/libs/tests/GuestFreebsdClocks.cpp, added in bf15282ec) requires sceKernelGettimezone to report 0 and 0 before any test sets TZ.

Title, test or build step

guest_freebsd_clocks

AnyPS5 commit

main 52c09d5 (2026-10-29); the test file is unchanged on 2960e9a6e.

System

Windows 11 Pro 10.0.22631, Windows zone Eastern Standard Time, MSYS2 UCRT64 GCC 16.1.0, Release, BUILD_TESTING=ON.

Steps to reproduce

ctest --test-dir build -R '^guest_freebsd_clocks$' -V
TZ=EST5EDT ctest --test-dir build -R '^guest_freebsd_clocks$' -V
TZ=UTC0 ctest --test-dir build -R '^guest_freebsd_clocks$' -V

The first two abort in 0.1 s; the third passes.

Log

FATAL: abort() (SIGABRT) on thread 40512
    #0 0x00007ffcb6b9aa67 libc.prx+0x1aa67
    #1 0x00007ffcb6b9ac95 libc.prx+0x1ac95
    #2 0x00007ffd175ae6d5 ucrtbase.dll+0x7e6d5

With Require temporarily printing its std::source_location, the failing check is line 328, sceKernelGettimezone(&zone) == SCE_OK && zone.tz_minuteswest == 0 && zone.tz_dsttime == 0, in 3 of 3 runs.

What was checked

  • sceKernelGettimezone reports the host zone by design: the libkernel debt entry records it, and a PS5 set to US Eastern returned -300 and 60. So the implementation is right and the test assumes a UTC host, which the CI runners are.
  • TimezoneReportsTheStandardOffsetAndDaylightAmount in the same file sets TZ before each check and passes here.
  • A fix is on bunbeans2-arch:fix/clocks-test-host-zone (one line: SetTimeZone("UTC0"); at the start of KernelTimezoneIsUtc). With it the test passes with the Windows zone (Eastern), TZ=EST5EDT, TZ=UTC0 and TZ=IST-5:30. I will open it as a pull request once my open one, #12731, is merged, as the open pull request limit for new authors requires.
  • Not checked on Linux, where /etc/localtime is the default zone and the same assumption applies.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:6093960770 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/12736). Originally posted by [bunbeans2-arch](https://github.com/bunbeans2-arch) on 2026-10-29T06:04:13Z. --- ### What happens `guest_freebsd_clocks` aborts (`0xc0000409`) on any machine whose zone is not UTC: `KernelTimezoneIsUtc` (`core/libs/tests/GuestFreebsdClocks.cpp`, added in bf15282ec) requires `sceKernelGettimezone` to report 0 and 0 before any test sets `TZ`. ### Title, test or build step `guest_freebsd_clocks` ### AnyPS5 commit `main` 52c09d5 (2026-10-29); the test file is unchanged on 2960e9a6e. ### System Windows 11 Pro 10.0.22631, Windows zone Eastern Standard Time, MSYS2 UCRT64 GCC 16.1.0, Release, `BUILD_TESTING=ON`. ### Steps to reproduce ``` ctest --test-dir build -R '^guest_freebsd_clocks$' -V TZ=EST5EDT ctest --test-dir build -R '^guest_freebsd_clocks$' -V TZ=UTC0 ctest --test-dir build -R '^guest_freebsd_clocks$' -V ``` The first two abort in 0.1 s; the third passes. ### Log ``` FATAL: abort() (SIGABRT) on thread 40512 #0 0x00007ffcb6b9aa67 libc.prx+0x1aa67 #1 0x00007ffcb6b9ac95 libc.prx+0x1ac95 #2 0x00007ffd175ae6d5 ucrtbase.dll+0x7e6d5 ``` With `Require` temporarily printing its `std::source_location`, the failing check is line 328, `sceKernelGettimezone(&zone) == SCE_OK && zone.tz_minuteswest == 0 && zone.tz_dsttime == 0`, in 3 of 3 runs. ### What was checked - `sceKernelGettimezone` reports the host zone by design: the libkernel debt entry records it, and a PS5 set to US Eastern returned -300 and 60. So the implementation is right and the test assumes a UTC host, which the CI runners are. - `TimezoneReportsTheStandardOffsetAndDaylightAmount` in the same file sets `TZ` before each check and passes here. - A fix is on bunbeans2-arch:fix/clocks-test-host-zone (one line: `SetTimeZone("UTC0");` at the start of `KernelTimezoneIsUtc`). With it the test passes with the Windows zone (Eastern), `TZ=EST5EDT`, `TZ=UTC0` and `TZ=IST-5:30`. I will open it as a pull request once my open one, #12731, is merged, as the open pull request limit for new authors requires. - Not checked on Linux, where `/etc/localtime` is the default zone and the same assumption applies. AI-assisted: yes (Claude Code)
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#12736
No description provided.