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

Message ID 1e929d92cbab025e4c692064652c3e443d2734e2.1744558458.git.hako@ultrarare.space
State New
Headers
Series [bug#77782,1/2] gnu: Remove mozjs-102. |

Commit Message

Hilton Chain April 13, 2025, 3:38 p.m. UTC
  * 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(+)
  

Comments

Clément Lassieur April 13, 2025, 10:12 p.m. UTC | #1
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?

Thanks,
Clément
  
Hilton Chain April 14, 2025, 1:46 a.m. UTC | #2
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.
  
Clément Lassieur April 14, 2025, 11:06 a.m. UTC | #3
On Mon, Apr 14 2025, Hilton Chain wrote:

> 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:
>
> 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]
>
> You can reproduce this by rebuilding mozjs on master.

And does the test still make sense with this patch?  Wouldn't it be
wiser to just disable the non-working test?
  

Patch

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?)