fix(tests): drop the guest_freebsd_clocks check that the host zone is UTC #12660
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/12660"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-29T00:47:09Z.
What
guest_freebsd_clocksfails on any machine whose time zone isn't UTC. This PR removes the check responsible.KernelTimezoneIsUtc(added by #11546) runs first inmain(), before the test setsTZ. It requiressceKernelGettimezoneto report{0, 0}. Since #10499, that call reports the host zone's standard offset and daylight saving amount, as frankea measured on a PS5 set to US Eastern (-300,60). So on a host in another zone, the check sees the host zone and aborts. CI and the machines #11546 was tested on run in UTC, so it passed there.The check adds no coverage. Both of its assertions are already in
TimezoneReportsTheStandardOffsetAndDaylightAmount, which setsTZfirst:0x8002000E;UTC0reports{0, 0}.So this PR deletes
KernelTimezoneIsUtcand its call. No library code changes.Tested
Windows 11 set to Eastern Standard Time, WinLibs GCC 15.2.0 UCRT r7, Release,
main3a2b919816.TZmain--repeat until-fail:3)ctest -j32runEST5EDTUTC0IST-5:30CET-1CESTOn
main, a temporary line-number print inRequirelocates the abort at the zone check inKernelTimezoneIsUtc.Conventions pass.
tools/pr_overlap.py: three open PRs share the file (#9658 and #12418 among them), and all merge cleanly with this branch.Not tested: Linux and macOS. The check does the same thing there whenever the host zone isn't UTC.
Agreed landing order — 2026-10-29
Agreed: #12660 lands first, then #12418. babyhuey’s confirmation records #12418’s dependency. This PR has no dependency on #12418. Its non-UTC clock assertions need this timezone correction; #12418’s separate guest-copy fast-path prerequisite remains its author’s responsibility. This records the landing order without adding a new runtime claim.
AI-assisted: yes (Codex).
Alternative-fix overlap — 2026-10-29
The refreshed overlap review identifies #12747 (
222a178f7f) as an alternative fix for the same host-timezone assertion, rather than a prerequisite: it initializes UTC insideKernelTimezoneIsUtc, while this PR removes the redundant assertion and its call. #12809 is closed as a duplicate of #12747. These should not all land.Please choose one of #12660 and #12747 before merging; I favor the deletion here because the remaining clock/offset checks already cover the contract. I am keeping this useful reviewed PR open pending that choice. The separately agreed order with babyhuey remains #12660 first, then #12418 if this alternative is selected. No dependency on #12747 is claimed. The earlier clean merge previews do not establish that these alternatives should be combined.
AI-assisted: yes (Codex).
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by rooklz on 2026-10-29T01:38:34Z.
Review: APPROVED
Host-side review for the platforms the body lists as Not tested (Linux, macOS). I made no console measurements.
Harness. I extracted
HostZone/HostZoneAt/HostDaylightAmount/sceKernelGettimezoneverbatim fromcore/libs/prx/libkernel/Time/Time.cpp@3a2b919816(lines 763-803 and 844-849).GuestCopyOut_nid_no_patchis shimmed as a memcpy. On top of that I ran main'sKernelTimezoneIsUtcbody unchanged.TZis set from outside the process, the way the zone is set beforemain()reaches anySetTimeZone.TZ/etc/localtime= Europe/London)/etc/localtime= Etc/UTC){0,60}→ abort{0,0}passUTC0/Etc/UTC{0,0}pass{0,0}passEurope/London{0,60}→ abort{0,60}→ abortEST5EDT/America/New_York{-300,60}→ abort{-300,60}→ abortIST-5:30/Asia/Kolkata{330,0}→ abort{330,0}→ abortAfrica/Accra,Atlantic/Reykjavik{0,0}passThis confirms the body's analysis on Linux and macOS too. The deleted check passes only when the host zone has offset 0 and no daylight saving at all. A UK host fails it all year round, because
sceKernelGettimezonereports the zone's daylight amount (60), not whether daylight saving is in effect now. So a "GMT" machine is not safe. CI passes only because the runners and containers are Etc/UTC.Coverage. Nothing is lost:
0x8002000Eassertion is repeated at L309.{0,0}underUTC0is the firstRequireTimezonerow (L304), and that row now runs withTZset explicitly.TimezoneReportsTheStandardOffsetAndDaylightAmountreads the host zone. Thegettimeofdayzone check at L342 readsguestTimezone, not the host.EST5EDT/CET-1CESTrows compare the daylight amount, not the current DST state, so they don't depend on the date.Head
ab03f37893is base3a2b919816minus exactly these 7 lines. LGTM.Pull request closed