Bug 139123 - REGRESSION: mozilla-tests.yaml/ecma/Date/15.9.5.8.js fails intermittently
Summary: REGRESSION: mozilla-tests.yaml/ecma/Date/15.9.5.8.js fails intermittently
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P1 Critical
Assignee: Nobody
URL:
Keywords:
: 142180 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-12-01 05:38 PST by Csaba Osztrogonác
Modified: 2019-12-02 10:10 PST (History)
13 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Csaba Osztrogonác 2014-12-01 05:39:55 PST
mozilla-tests.yaml/ecma/Date/15.9.5.8.js.mozilla: (new Date(1446364102494)).getMonth() = 10 FAILED! expected: 9
mozilla-tests.yaml/ecma/Date/15.9.5.8.js.mozilla: (new Date(1446364102495)).getMonth() = 10 FAILED! expected: 9
mozilla-tests.yaml/ecma/Date/15.9.5.8.js.mozilla: (new Date(1446364102493)).getMonth() = 10 FAILED! expected: 9
Comment 2 Csaba Osztrogonác 2014-12-01 05:41:01 PST
maybe it is related to bug138303 somehow, but it is unlikely.
Comment 3 Alexey Proskuryakov 2014-12-01 10:57:23 PST
The tests are still failing today
Comment 6 Csaba Osztrogonác 2015-03-01 23:41:28 PST
It seems this test fails only on the first day of months between 22:00-24:00.
Comment 7 Alexey Proskuryakov 2015-03-02 09:27:36 PST
The tests just failed again on all bots around 8am on March 2nd.
Comment 8 Myles C. Maxfield 2015-03-02 09:28:50 PST
Perhaps related to daylight savings?
Comment 9 Filip Pizlo 2015-03-02 10:14:08 PST
(In reply to comment #8)
> Perhaps related to daylight savings?

Yes :-)
Comment 10 Myles C. Maxfield 2015-03-02 11:12:38 PST
Looking into this now.
Comment 11 Myles C. Maxfield 2015-03-02 12:25:36 PST
This test uses the current time, then performs date math on it in JS code, and compares to the same date math being performed by the platform. However, this date math is sensitive to daylight savings code. I propose that we perform the tests on hardcoded dates and not on "now"
Comment 12 Filip Pizlo 2015-03-02 12:33:22 PST
(In reply to comment #11)
> This test uses the current time, then performs date math on it in JS code,
> and compares to the same date math being performed by the platform. However,
> this date math is sensitive to daylight savings code. I propose that we
> perform the tests on hardcoded dates and not on "now"

We could do that, but before we do, you should check what other coverage we have on the behavior of Date.now().

Also, have you checked if these tests overlap the more modern tests in sputnik and ietestcenter, or even Test262?  Fixing these ancient Mozilla tests if there is a modern test with similar coverage is probably not worthwhile.
Comment 13 Alexey Proskuryakov 2015-03-02 13:54:19 PST
*** Bug 142180 has been marked as a duplicate of this bug. ***
Comment 14 Csaba Osztrogonác 2015-03-09 04:40:55 PDT
similar bug: bug138303
Comment 15 Brent Fulgham 2015-03-09 09:56:17 PDT
The daylight-savings sensitivity is actually a useful thing to test. After all, real world code needs to deal with this stuff! However, I do think it would be better to have specific Daylight Savings Time tests so it would be very clear when these start failing that it is related to the time of year.

What makes this more difficult is that the DST logic can change from year-to-year (based on law).

But I agree that all of our stock date tests should use specific dates and times. To exercise 'now' we should probably place this in its own test with DST logic or special code to account for DST.
Comment 16 Myles C. Maxfield 2015-03-09 12:24:35 PDT
The consensus that Mark Lam and I came up with is that we should test all cases with specific test cases, but that we should not test "now." That way, we maintain our coverage without having possible future flakes if governments change DST behavior.
Comment 17 Mark Lam 2015-03-09 12:28:41 PDT
(In reply to comment #16)
> The consensus that Mark Lam and I came up with is that we should test all
> cases with specific test cases, but that we should not test "now." That way,
> we maintain our coverage without having possible future flakes if
> governments change DST behavior.

To clarify, I think Brent’s suggestion is a good one i.e. to put the DST test cases in a DST specific test.  That makes it easier to understand at a glance what could have gone wrong.  Brent’s suggestion is not in conflict with the approach Myles and I discussed.
Comment 18 Filip Pizlo 2015-03-09 12:39:18 PDT
I'm opposed to removing these tests, as they are some of the more complex pieces of code that use Date and we should at least run them for crash test coverage.  It shouldn't be hard to arrange for them to be run just for seeing that they don't crash.

I haven't seen any comments regarding overlap with sputnik.  Sputnik is a comprehensive and modern JS test suite that we run in LayoutTests.  What we do about these tests depends on whether or not sputnik has Date.now tests.  Have you looked at this, and what did you find?
Comment 19 Aakash Jain 2019-12-02 10:10:01 PST
This test flaked in https://ews-build.webkit.org/#/builders/26/builds/652 It failed in jscore-test, but passed on retry (in immediately next jscore-test-rerun step).

mozilla-tests.yaml/ecma/Date/15.9.5.8.js.mozilla-dfg-eager-no-cjit-validate-phases: (new Date(1604216191497)).getMonth() = 10 FAILED! expected: 9

mozilla-tests.yaml/ecma/Date/15.9.5.8.js.mozilla-no-ftl: (new Date(1604216191382)).getMonth() = 10 FAILED! expected: 9