Pádraig Brady wrote:
> arm64, macOS 12.7, 1 gnulib test fail:
>    FAIL: test-readutmp
>    Here are the read_utmp results.
>    Flags: B = Boot, U = User Process
>                                                                  Termi‐      
> Flags
>        Time (GMT)             User          Device        PID    nation Exit  
> B U  Host
>    ------------------- ------------------ ----------- ---------- ------ ----  
> - -  ----
>    1970-01-01 00:00:16                                         1    0     0   
> X
>    2024-12-21 13:29:52 _mbsetupuser       console            129    0     0   
>   X
>    test-readutmp.c:146: assertion 'first >= now - 157680000' failed

When read_utmp returns a boot time 16 seconds after the Epoch, that is
indeed incorrect.

The way gnulib/lib/boot-time-aux.h uses to get the boot time on macOS
is via the CTL_KERN KERN_BOOTTIME sysctl. It's the system's authoritative
info, not some heuristics.

I don't see this test failure in the macOS 13, 14, 15 machines on
GitHub. Therefore it looks like a quirk in macOS 12 that has long been
fixed.

Bruno




Reply via email to