Bug 139123

Summary: REGRESSION: mozilla-tests.yaml/ecma/Date/15.9.5.8.js fails intermittently
Product: WebKit Reporter: Csaba Osztrogonác <ossy>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Critical CC: aakash_jain, ap, bfulgham, cgarcia, fpizlo, ggaren, guijemont, gyuyoung.kim, mark.lam, mmaxfield, msaboff, ossy, pmatos
Priority: P1    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=138303
https://bugs.webkit.org/show_bug.cgi?id=142531

Attachments
Csaba Osztrogonác
Comment 1 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
Csaba Osztrogonác
Comment 2 2014-12-01 05:41:01 PST
maybe it is related to bug138303 somehow, but it is unlikely.
Alexey Proskuryakov
Comment 3 2014-12-01 10:57:23 PST
The tests are still failing today
Csaba Osztrogonác
Comment 6 2015-03-01 23:41:28 PST
It seems this test fails only on the first day of months between 22:00-24:00.
Alexey Proskuryakov
Comment 7 2015-03-02 09:27:36 PST
The tests just failed again on all bots around 8am on March 2nd.
Myles C. Maxfield
Comment 8 2015-03-02 09:28:50 PST
Perhaps related to daylight savings?
Filip Pizlo
Comment 9 2015-03-02 10:14:08 PST
(In reply to comment #8) > Perhaps related to daylight savings? Yes :-)
Myles C. Maxfield
Comment 10 2015-03-02 11:12:38 PST
Looking into this now.
Myles C. Maxfield
Comment 11 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"
Filip Pizlo
Comment 12 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.
Alexey Proskuryakov
Comment 13 2015-03-02 13:54:19 PST
*** Bug 142180 has been marked as a duplicate of this bug. ***
Csaba Osztrogonác
Comment 14 2015-03-09 04:40:55 PDT
similar bug: bug138303
Brent Fulgham
Comment 15 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.
Myles C. Maxfield
Comment 16 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.
Mark Lam
Comment 17 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.
Filip Pizlo
Comment 18 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?
Aakash Jain
Comment 19 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
Note You need to log in before you can comment on or make changes to this bug.