Subject: Re: [bug#77782] [PATCH 2/2] gnu: mozjs: Work around DST affected tests.

From: Hilton Chain <[email-masked]>
Date: Mon, 14 Apr 2025 09:46:06 +0800

On Mon, 14 Apr 2025 06:12:45 +0800,
Clément Lassieur wrote:
>
> On Sun, Apr 13 2025, Hilton Chain wrote:
>
> > * gnu/packages/gnuzilla.scm (mozjs)[arguments]<#:phases>: Use UTC for timezone
> > related tests.
> >
> > Change-Id: I480c78d208ccecda8a5467461a0e5c7228262f9d
> > ---
> >  gnu/packages/gnuzilla.scm | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
> > index 76d5ab1d29..6bcff1c348 100644
> > --- a/gnu/packages/gnuzilla.scm
> > +++ b/gnu/packages/gnuzilla.scm
> > @@ -178,6 +178,10 @@ (define-public mozjs
> >                    ((".*killed process should not have exitStatus.*")
> >                     ""))
> >
> > +                ;; FIXME: Affected by DST.
> > +                (substitute* "non262/Date/15.9.5.7.js"
> > +                  (("PST") "UTC"))
> > +
> >                  ;; This was fixed sometime between 102.15.1 and 115.11.0.
> >                  ;; These tests are supposed to be skipped on all 64-bit systems.
> >                  #$@(if (target-riscv64?)
>
> Hello!  Could you please explain a bit more what this patch fixes?

The test suite currently fails:
--8<---------------cut here---------------start------------->8---
TEST-UNEXPECTED-FAIL | non262/Date/15.9.5.7.js | (args: "") | d = new Date(1744545315400); d == new Date(d.toDateString() + " " + d.toLocaleTimeString()) = Sun Apr 13 2025 03:55:15 GMT-0700 (Pacific Daylight Time) expected: Sun Apr 13 2025 04:55:15 GMT-0700 (Pacific Daylight Time) [0.0 s]
TEST-UNEXPECTED-FAIL | non262/Date/15.9.5.7.js | (args: "") | d = new Date(1744574115400); d == new Date(d.toDateString() + " " + d.toLocaleTimeString()) = Sun Apr 13 2025 11:55:15 GMT-0700 (Pacific Daylight Time) expected: Sun Apr 13 2025 12:55:15 GMT-0700 (Pacific Daylight Time) [0.0 s]
TEST-UNEXPECTED-FAIL | non262/Date/15.9.5.7.js | (args: "") [0.0 s]
--8<---------------cut here---------------end--------------->8---

You can reproduce this by rebuilding mozjs on master.