Bug 136363 - [JSC] Some JSC stress tests are dependent on the machine time zone.
Summary: [JSC] Some JSC stress tests are dependent on the machine time zone.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Carlos Alberto Lopez Perez
URL:
Keywords:
Depends on:
Blocks: 138303
  Show dependency treegraph
 
Reported: 2014-08-29 04:35 PDT by Carlos Alberto Lopez Perez
Modified: 2018-06-13 17:37 PDT (History)
10 users (show)

See Also:


Attachments
Patch (1.51 KB, patch)
2014-08-29 06:30 PDT, Carlos Alberto Lopez Perez
no flags Details | Formatted Diff | Diff
Patch (1.98 KB, patch)
2014-08-29 10:26 PDT, Carlos Alberto Lopez Perez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Alberto Lopez Perez 2014-08-29 04:35:09 PDT
I have noticed that some of the JSC stress tests fail if your timezone is not PDT (At least on the GTK port, didn't tested other ports).

They pass all OK if your timezone is PDT:

$ export TZ="US/Pacific"
$ Tools/Scripts/run-javascriptcore-tests --release --gtk --no-build
[...]
9887/9887         

Results for JSC stress tests:
    0 failures found.
    OK.


But some fail if you have another timezone:

$ export TZ="Europe/Madrid"
$ Tools/Scripts/run-javascriptcore-tests --release --gtk --no-build
[...]
9887/9887 (failed 4)         

** The following JSC stress test failures have been introduced:
	mozilla-tests.yaml/ecma_3/Date/15.9.5.6.js.mozilla
	mozilla-tests.yaml/ecma_3/Date/15.9.5.6.js.mozilla-baseline
	mozilla-tests.yaml/ecma_3/Date/15.9.5.6.js.mozilla-dfg-eager-no-cjit-validate-phases
	mozilla-tests.yaml/ecma_3/Date/15.9.5.6.js.mozilla-llint

Results for JSC stress tests:
    4 failures found.



To workaround this, maybe we can just export the environment variable TZ to US/Pacific on the script run-javascriptcore-tests ?
Comment 1 Andy Wingo 2014-08-29 05:35:37 PDT
(In reply to comment #0)
> I have noticed that some of the JSC stress tests fail if your timezone is not PDT (At least on the GTK port, didn't tested other ports).

Yep, a long-standing bug present in these tests since they were imported from Mozilla.  Note that these aren't the main tests for JSC -- those are in LayoutTests.

> To workaround this, maybe we can just export the environment variable TZ to US/Pacific on the script run-javascriptcore-tests ?

Sure, sounds like a good idea to me.
Comment 2 Csaba Osztrogonác 2014-08-29 05:44:16 PDT
It is a very old bug: bug4930 . The workaround for us was always 
to set TZ to Apple time zone if you want to run JSC tests. :)

+1 for adding this workaround if nobody wants to fix the buggy test.
Comment 3 Csaba Osztrogonác 2014-08-29 05:53:44 PDT
Adding $ENV{TZ}="US/Pacific"; to run-javascriptcore-tests works for me,
feel free to create a patch for it.
Comment 4 Carlos Alberto Lopez Perez 2014-08-29 06:30:48 PDT
Created attachment 237347 [details]
Patch
Comment 5 Csaba Osztrogonác 2014-08-29 06:32:43 PDT
Comment on attachment 237347 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=237347&action=review

> Tools/Scripts/run-javascriptcore-tests:237
> +    # Some tests fail if the time zone is not set to US/Pacific (<https://webkit.org/b/136363>)
> +    $ENV{TZ}="US/Pacific";

We can apply this if we only run the mozilla tests for some reason.
Comment 6 Carlos Alberto Lopez Perez 2014-08-29 06:43:25 PDT
(In reply to comment #5)
> (From update of attachment 237347 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=237347&action=review
> 
> > Tools/Scripts/run-javascriptcore-tests:237
> > +    # Some tests fail if the time zone is not set to US/Pacific (<https://webkit.org/b/136363>)
> > +    $ENV{TZ}="US/Pacific";
> 
> We can apply this if we only run the mozilla tests for some reason.

Not sure if I understand what you mean. Exporting it inside:

if ($runMozilla) {
[...]
}

Don't fixes the issue.
Comment 7 Carlos Alberto Lopez Perez 2014-08-29 06:44:31 PDT
Also, running "Tools/Scripts/run-javascriptcore-tests [...] --no-jsc-stress" don't fails
Comment 8 Csaba Osztrogonác 2014-08-29 06:47:12 PDT
I meant Tools/Scripts/run-javascriptcore-tests --no-jsc-stress 
case should be workarounded too, not only the stress test case.
Comment 9 Carlos Alberto Lopez Perez 2014-08-29 10:08:19 PDT
I see.

There are some mozilla test skipped due to this issue with the timezone. See r99580 <http://trac.webkit.org/r99580>.

I have tested to unskip them and they fail only with a non US/Pacific timezone, but pass on US/Pacific.

I'm going to unskip this tests and set the TZ environment variable on the main body of the script.
Comment 10 Carlos Alberto Lopez Perez 2014-08-29 10:26:16 PDT
Created attachment 237355 [details]
Patch
Comment 11 WebKit Commit Bot 2014-08-29 11:15:45 PDT
Comment on attachment 237355 [details]
Patch

Clearing flags on attachment: 237355

Committed r173116: <http://trac.webkit.org/changeset/173116>
Comment 12 WebKit Commit Bot 2014-08-29 11:15:49 PDT
All reviewed patches have been landed.  Closing bug.